Bracken
c3915e850a
Merge branch 'master' into refactor/simplify-with-sprintf-q
2025-03-23 14:22:18 +01:00
Bracken
1e7fb5865a
Merge pull request #1709 from techfg/chore/issue-1621-update-docs
...
chore: update docs for Unset #1621
2025-03-22 12:44:25 +01:00
techfg
c6ac9bb91d
chore: update per PR feedback
2025-03-21 06:25:01 -07:00
Grégoire Paris
b1c9368f81
Improve existing docs
2025-03-21 13:21:25 +01:00
Grégoire Paris
89086b0757
Document consequences of calling t.FailNow()
...
These comments are adapted from t.FailNow()'s own documentation.
Closes #1701
2025-03-19 20:50:44 +01:00
techfg
098128fd10
chore: update docs for Unset #1621
2025-03-18 12:48:09 -07:00
Oleksandr Redko
30f3cef5ad
Apply suggestions from code review
...
Co-authored-by: Olivier Mengué <dolmen@cpan.org>
2024-12-10 14:08:46 +02:00
Oleksandr Redko
d57bac8721
refactor: use %q to simplify fmt.Sprintf
2024-11-24 18:28:03 +02:00
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
sikehish
716de8dff4
Increase timeouts in Test_Mock_Called_blocks to reduce flakiness in CI
2024-10-29 00:00:56 +05:30
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
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
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
Oleksandr Redko
ba3e7c34d5
mock: fix doc comment for NotBefore
2024-10-04 18:06:40 +03:00
Bracken
85a526818c
Merge branch 'master' into master
2024-10-02 17:21:55 +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
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
Reynier Ortiz
7268a5bc0b
mock: in order mock calls
2024-09-06 09:18:07 -04:00
Joseph Dallago
da63673a11
Now properly record the ReturnArguments as part of the call.
2024-08-29 22:05:04 +03:00
Bracken
8d4dcbbccb
Merge pull request #1569 from stretchr/mock-more-AnythingOfTypeArgument-alternatives
...
mock: document more alternatives to deprecated AnythingOfTypeArgument
2024-04-23 16:15:28 +00:00
Olivier Mengué
8c324a0bbd
mock: simpler deprecation doc for AnythingOfTypeArgument
...
Co-authored-by: Bracken <abdawson@gmail.com>
2024-04-23 15:23:21 +02:00
Olivier Mengué
d4a63f5b89
mock: simplify implementation of FunctionalOptions
...
Remove unnecessary use of reflect in the implementation of
mock.FunctionalOptions().
2024-04-22 23:10:37 +02:00
Snir Yehuda
da1e1476cb
Merge branch 'master' into master
2024-03-18 09:47:57 +02:00
Olivier Mengué
3c302f75ae
mock: improve doc ( #1570 )
...
## Summary
Improve API doc of package
[`mock`](https://pkg.go.dev/github.com/stretchr/testify/mock ):
- add godoc links
- indent example code
## Motivation
Readability.
2024-03-10 11:42:04 +01:00
Olivier Mengué
aca1890ec1
mock: document more alternatives to deprecated AnythingOfTypeArgument
2024-03-07 11:59:12 +01:00
Snir Yehuda
f1b5324b90
assert.FunctionalOptions: fix go doc
2024-03-06 11:28:50 +03:00
Tom Wright
cab2acc70f
Do not get argument again unnecessarily in Arguments.Error()
2024-03-06 03:03:10 +01:00
Bracken
c719de3088
Merge pull request #1331 from ianrose14/ianrose/assertexpectations-skipped
...
Ensure AssertExpectations does not fail in skipped tests
2024-02-17 17:50:13 +00:00
Sean Marciniak
648a7937c5
Merge pull request #1416 from stretchr/mock-simplify-matcher-check
...
mock: optimize argument matching checks
2024-01-22 08:48:09 +10:30
Sean Marciniak
24e57f1a77
Merge pull request #1444 from stretchr/mock-refactor-TestIsArgsEqual
...
mock: refactor TestIsArgsEqual
2024-01-22 08:44:43 +10:30
Ian Rose
1837f62a5f
Ensure AssertExpectations does not fail in skipped tests
2023-10-31 00:00:55 +01:00
Olivier Mengué
307c9344b8
mock: refactor IsType
...
Reduce calls to reflect.Type in implementation of mock.IsType by
extracting the type early.
This also avoids to keep alive references to the argument value.
2023-10-16 13:57:23 +02:00
Olivier Mengué
413628c0f4
mock: simplify Arguments.Diff
...
Use a type switch instead of reflect.TypeOf comparisons.
2023-10-16 13:57:23 +02:00
Olivier Mengué
f24f3ba986
mock: deprecate AnythingOfTypeArgument ( #1434 )
...
Deprecate mock.AnythingOfTypeArgument which should never have been
publicly exposed.
AnythingOfTypeArgument is now a type alias to the private
anythingOfTypeArgument and is marked as Deprecated in godoc.
The AnythingOfType constructor is still available.
The aim is to completely remove that alias.
2023-08-08 11:05:09 +02:00
Anant Vyas
a23f5db224
mock: move regexp compilation outside of Called ( #631 )
...
Co-authored-by: Olivier Mengué <dolmen@cpan.org>
2023-08-01 10:07:29 +02:00
Olivier Mengué
c740480fc1
mock: refactor TestIsArgsEqual
...
Refactor tests to use 'append' to build copies of slices instead of
manual loops.
Thanks golangci-lint.
2023-07-30 20:51:12 +02:00
Olivier Mengué
862e41010c
Merge pull request #1360 from hikyaru-suzuki/feature/update_logging_output
...
mock: AssertExpectations log reason only on failure
2023-07-29 05:52:15 +02:00
Oleksandr Redko
37814a1755
docs: Fix typos in tests and comments
2023-07-06 13:14:39 +03:00
Ed
9f0f17fe64
Correct spelling/grammar
2023-05-26 10:38:59 +01:00