Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: print value type for interface{} containers #409

Merged
merged 1 commit into from Feb 3, 2021

Commits on Feb 2, 2021

  1. fix: print value type for interface{} containers

    When a value is contained in an interface{} we should show the type of
    the value as well as the interface{} type
    
    Consider the test:
    
      Expect([]interface{}{1}).To(Equal([]interface{}{uint(1)}))
    
    Previous message:
    
      Expected
        <[]interface {} | len:1, cap:1>: [1]
      to equal
        <[]interface {} | len:1, cap:1>: [1]
    
    New message:
    
      Expected
        <[]interface {} | len:1, cap:1>: [<int>1]
      to equal
        <[]interface {} | len:1, cap:1>: [<uint>1]
    
    By showing the type, it's much easier to work out what is going on
    blgm committed Feb 2, 2021
    Copy the full SHA
    5f9ab56 View commit details
    Browse the repository at this point in the history