Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stretchr/testify
base: v1.8.2
Choose a base ref
...
head repository: stretchr/testify
compare: v1.8.4
Choose a head ref
  • 6 commits
  • 19 files changed
  • 9 contributors

Commits on Mar 14, 2023

  1. Compare public elements of struct (#1309)

    * Implement checking only exported fields
    
    Co-authored-by: Anthony Chang <[email protected]>
    
    * Update comment
    
    * Run go generate
    
    * Make compatiable with Go 1.16.5
    
    * Fix go generate files
    
    * Fix white space changes
    
    * Fix whitespace changes
    
    * Fix whitespace changes in gogenerate files
    
    ---------
    
    Co-authored-by: Anthony Chang <[email protected]>
    mchlp and anthony-chang committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    c5fc9d6 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2023

  1. assert: fix error message formatting for NotContains (#1362)

    * assert: rename and refactor TestContainsFailMessage
    
    I've renamed it to TestContainsNotContains and added a test case
    structure so that I can use this test to validate the failure messages
    from both Contains and NotContains,
    
    There are no functional changes here, strictly refactoring. A new test
    case will be added in a subsequent change.
    
    * assert: fix error message formatting for NotContains
    
    It was using "%s" to format the s and contains arguments, but these
    could be any type that supports iteration such as a map. In this case
    of NotContains failing against a map, it would print something like:
    
       "map[one:%!s(int=1)]" should not contain "one"
    
    Fix this using "%#v" as was already done for Contains and added test
    cases covering both the "len()" / iterable failure messages as well as
    the Contains/NotContains failure case.
    
    The new message for this example map would be something like:
    
        map[string]int{"one":1} should not contain "one"
    wwade committed May 5, 2023
    Configuration menu
    Copy the full SHA
    437071b View commit details
    Browse the repository at this point in the history

Commits on May 9, 2023

  1. allow testing for functional options (#1023)

    * allow testing for functional options
    
    * add linting docs
    
    * use reflect magic to obtain FunctionalOption name
    
    Co-authored-by: dillonstreator <[email protected]>
    
    ---------
    
    Co-authored-by: dillonstreator <[email protected]>
    nbaztec and dillonstreator committed May 9, 2023
    Configuration menu
    Copy the full SHA
    b3106d7 View commit details
    Browse the repository at this point in the history
  2. add EventuallyWithT assertion (#1264)

    * add EventuallyWithT assertion
    
    * Change "EventuallyWithT" condition acceptance to no-errors raised
    
    This change updates the "EventuallyWithT" assertion variants (regular, formatted,
    requirement) to consider a condition as "met" if no assertion errors were raised
    in a tick.
    
    This allows to write easier conditions which simply contain assertions, without
    needing to return a bool. The equivalent of a condition returning true in the
    previous implementation would be a a condition with a single "assert.True(..)" call.
    
    * Declare the "Collect.Copy(T)" method as a testing helper
    
    * run go generate
    
    ---------
    
    Co-authored-by: Arik Kfir <[email protected]>
    tobikris and arikkfir committed May 9, 2023
    Configuration menu
    Copy the full SHA
    4b2f4d2 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

  1. EqualExportedValues: Handle nested pointer, slice and map fields (#1379)

    * EqualExportedValues: Handle pointer and slice fields
    
    * Update assert/assertions.go
    
    Co-authored-by: Michael Pu <[email protected]>
    
    * Reduce redundant calls to 'copyExportedFields'
    
    * Update comments
    
    * Add support for maps
    
    * Update Go version support to 1.19 and onward
    
    * Re-generate after rebasing
    
    ---------
    
    Co-authored-by: Michael Pu <[email protected]>
    HaraldNordgren and mchlp committed May 10, 2023
    1 Configuration menu
    Copy the full SHA
    4c93d8f View commit details
    Browse the repository at this point in the history

Commits on May 30, 2023

  1. Configuration menu
    Copy the full SHA
    f97607b View commit details
    Browse the repository at this point in the history