Commit Graph

1054 Commits (89cbdd9e7b39eb58896d316a7495597d3aba4371)

Author SHA1 Message Date
Bracken 89cbdd9e7b
Merge pull request #1626 from arjun-1/fix-functional-options-diff-indirect-calls
fix: compare functional option names for indirect calls
2024-11-12 22:58:45 +00:00
Bracken 07bac606be
Merge pull request #1667 from sikehish/flaky
Increase timeouts in Test_Mock_Called_blocks to reduce flakiness in CI
2024-10-28 20:19:38 +00:00
sikehish 716de8dff4 Increase timeouts in Test_Mock_Called_blocks to reduce flakiness in CI 2024-10-29 00:00:56 +05:30
Hisham Akmal 118fb83466
NotSame should fail if args are not pointers #1661 (#1664)
## Summary
Reduces the confusion assosciated with NotSame that previously would
check nothing if any of the values is not a pointer. The changes made
were tested using TestSame, TestNotSame, and Test_samePointers tests,
and the changes did clear the tests.

## Changes
1. Modified samePointers to return another bool value(ok) that would
determine if the 2 values are of pointer type or not, while the returned
"same" bool value would determine if the 2 pointers are same.
2. Modified assert.NotSame to call Fail() if the 2 values are either
i)pointers pointing to the same address or ii)either/both of the values
are not pointers.
3. Modified assert.Same to call Fail() if the 2 values are either
i)pointers not pointing to the same address or ii)either/both of the
values are not pointers.
4. Modified Test_samePointers to handle the new behavior of samePointers
by checking both if the inputs are pointers (ok) and if they point to
the same object (same).

## Motivation
Ensure NotSame accurately verifies pointer sameness by handling
non-pointer inputs explicitly, improving clarity and reducing potential
misuse.

## Related issues
Closes #1661

---------

Co-authored-by: Bracken <abdawson@gmail.com>
2024-10-28 11:08:04 +00:00
Arjun Dhawan 7d99b2b43d attempt 2 2024-10-27 08:07:57 +01:00
Arjun Dhawan 05f87c0160 more similar 2024-10-27 08:05:00 +01:00
Arjun Dhawan ea7129e006 better fmt 2024-10-27 08:02:53 +01:00
Bracken a1b9c9efe3
Merge pull request #1663 from ybrustin/master
Fix issue #1662 (comparing infs should fail)
2024-10-26 19:43:05 +01:00
Bracken 8302de98b1
Merge branch 'master' into master 2024-10-26 19:41:18 +01:00
Bracken 89352f7958
Merge pull request #1518 from hendrywiranto/adjust-readme-remove-v2
README: replace Testify V2 notice with @dolmen's V2 manifesto
2024-10-26 19:33:39 +01:00
hendry.wiranto 2780579e15 review: use proper github md 2024-10-26 23:18:03 +07:00
hendry.wiranto 8f049b0122 link maintainer manifesto on readme instead of v2 notice 2024-10-26 23:18:03 +07:00
Arjun Dhawan be992afabf trial 2024-10-24 13:28:30 +02:00
Arjun Dhawan fb67df6392 no regression 2024-10-24 11:40:45 +02:00
Arjun Dhawan 55bac84354 reword tests 2024-10-24 11:30:00 +02:00
Arjun Dhawan 822223ec34 fix name regression 2024-10-24 11:30:00 +02:00
Arjun Dhawan 22d3bd5def in order to remain compatible with go1..19, don't compare function names (but do include them in the diff output) 2024-10-24 11:30:00 +02:00
Arjun Dhawan 9c174eb41c fix: compare functional option names for indirect calls
Closes Functional Options testing broken for indirect calls #1380
2024-10-24 11:30:00 +02:00
Bracken 7efaf15f33
Merge pull request #1586 from redachl/fix/equal-exported-values-accepts-everything
assert.EqualExportedValues: accepts everything
2024-10-23 23:39:08 +01:00
Bracken dce9e58ee3
Merge branch 'master' into fix/equal-exported-values-accepts-everything 2024-10-23 23:37:57 +01:00
Bracken 75a239b2fd
Merge pull request #1610 from Neokil/generate-better-comments-for-require-package
Generate better comments for require package
2024-10-23 23:37:20 +01:00
Bracken f9ccf14f6f
Merge branch 'master' into generate-better-comments-for-require-package 2024-10-23 23:36:08 +01:00
Yaroslav Brustinov 6555fd4da6 Fix issue #1662 (comparing infs should fail) 2024-10-16 17:25:23 +03:00
Bracken a012e45d18
Merge pull request #1636 from rainhq/jayd3e.fix_return_arguments
Record Return Arguments of a Call
2024-10-16 14:07:58 +01:00
Simon Schulte 3b2754b72f remove failure note on require-comments 2024-10-15 13:54:51 +02:00
Bracken 2fc4e39394
Merge pull request #1421 from stevenh/fix/suite-test-failures
suite: fix test failures
2024-10-06 16:49:23 +01:00
Bracken f2227519d6
Merge branch 'master' into fix/suite-test-failures 2024-10-06 16:48:07 +01:00
Bracken 50d5b7e695
Merge pull request #1651 from alexandear/mock-fix-not-before-comment
mock: fix doc comment for NotBefore
2024-10-04 16:15:03 +01:00
Bracken 55ebaca027
Merge pull request #1650 from alexandear/assert-fix-comment-typos
assert: fix typos in comments
2024-10-04 16:12:39 +01:00
Oleksandr Redko ba3e7c34d5 mock: fix doc comment for NotBefore 2024-10-04 18:06:40 +03:00
Oleksandr Redko 2063e81696 assert: fix typos in comments 2024-10-04 18:02:45 +03:00
Bracken 7f489726a5
Merge pull request #1129 from palsivertsen/not-error-as
Add assertion for NotErrorAs
2024-10-04 13:38:32 +01:00
Pål Sivertsen f844b269df Review: Expand NotErrorAs func docs
https://github.com/stretchr/testify/pull/1129#discussion_r1787490770
2024-10-04 12:43:45 +02:00
Pål Sivertsen dc100b1be3 Review: Drop doc line and fix typo
Review feedback:
https://github.com/stretchr/testify/pull/1129#discussion_r1786495803
2024-10-04 12:43:45 +02:00
Pal Sivertsen aade8450b3 Improve tests for ErrorIs/ErrorAs
Checks that the assertion result matches what's set in `testing.T`.
2024-10-04 12:43:45 +02:00
Pal Sivertsen 3380867632 Add NotErrorAs assertion
The library already had assertions for `ErrorIs`, `NotErrorIs` and
`ErrorAs`. This commit adds the `NotErrorAs` assertion which is the
inverse of `ErrorAs`.
2024-10-04 12:43:45 +02:00
Olivier Mengué 95d1f9c2ad
Merge pull request #1645 from brackendawson/no-parallel-suite
Document suite's lack of support for t.Parallel
2024-10-04 12:26:06 +02:00
Bracken Dawson fed9ee68dc Document suite's lack of support for t.Parallel 2024-10-04 12:24:15 +02:00
Bracken 5dc934f9aa
Merge pull request #1629 from HaraldNordgren/patch-1
.github/workflows: Run tests for Go 1.22
2024-10-03 17:22:59 +01:00
Bracken c4b8421a1f
Merge pull request #1637 from ReyOrtiz/master
mock: in order mock calls
2024-10-02 17:23:18 +01:00
Bracken 85a526818c
Merge branch 'master' into master 2024-10-02 17:21:55 +01:00
Bracken 16a09b7086
Merge pull request #1644 from spirin/unexpected-method-caller-info
mock: caller information for unexpected method call
2024-10-01 10:31:37 +01:00
Spirin f3f7181b01
Merge branch 'master' into unexpected-method-caller-info 2024-10-01 02:22:07 +03:00
spirin d62ca68bf5 tests 2024-10-01 02:21:38 +03:00
Bracken 428847e363
Merge pull request #1571 from stretchr/mock-simplify-FunctionalOptions-impl
mock: simplify implementation of FunctionalOptions
2024-09-30 23:30:50 +01:00
Bracken 72e3b61028
Merge branch 'master' into mock-simplify-FunctionalOptions-impl 2024-09-30 23:28:38 +01:00
spirin ea6964c2e9 mock: caller information for unexpected method call 2024-09-30 21:33:46 +03:00
Reynier Ortiz f17409f81f mock: in order mock calls
(requested changes applied)
2024-09-25 12:03:55 -04:00
Reynier Ortiz bdb1271ed8 mock: in order mock calls 2024-09-25 11:26:01 -04:00
Steven Hartland e943930404 fix(suite): test failures
Fix TestFailfastSuite when run with go test flag -count=X where X
greater than 1.
2024-09-09 10:09:18 +01:00