| 1 | package typesscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/ |
| 2 | |
| 3 | import ( |
| 4 | "contextscip-go gomod github.com/golang/go/src go1.24.0 context/" |
| 5 | "timescip-go gomod github.com/golang/go/src go1.24.0 time/" |
| 6 | ) |
| 7 | |
| 8 | type GomegaFailHandlerscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaFailHandler# func(message string, callerSkip ...int) |
| 9 | |
| 10 | // A simple *testing.T interface wrapper |
| 11 | type GomegaTestingTscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaTestingT# interface { |
| 12 | Helperscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaTestingT#Helper.() |
| 13 | Fatalfscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaTestingT#Fatalf.(format string, args ...any) |
| 14 | } |
| 15 | |
| 16 | // Gomega represents an object that can perform synchronous and asynchronous assertions with Gomega matchers |
| 17 | type Gomegascip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega# interface { |
| 18 | Ωscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#`Ω`.(actual any, extra ...any) Assertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion# |
| 19 | Expectscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#Expect.(actual any, extra ...any) Assertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion# |
| 20 | ExpectWithOffsetscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#ExpectWithOffset.(offset int, actual any, extra ...any) Assertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion# |
| 21 | |
| 22 | Eventuallyscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#Eventually.(actualOrCtx any, args ...any) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 23 | EventuallyWithOffsetscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#EventuallyWithOffset.(offset int, actualOrCtx any, args ...any) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 24 | |
| 25 | Consistentlyscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#Consistently.(actualOrCtx any, args ...any) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 26 | ConsistentlyWithOffsetscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#ConsistentlyWithOffset.(offset int, actualOrCtx any, args ...any) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 27 | |
| 28 | SetDefaultEventuallyTimeoutscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#SetDefaultEventuallyTimeout.(timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) |
| 29 | SetDefaultEventuallyPollingIntervalscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#SetDefaultEventuallyPollingInterval.(timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) |
| 30 | SetDefaultConsistentlyDurationscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#SetDefaultConsistentlyDuration.(timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) |
| 31 | SetDefaultConsistentlyPollingIntervalscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#SetDefaultConsistentlyPollingInterval.(timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) |
| 32 | EnforceDefaultTimeoutsWhenUsingContextsscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#EnforceDefaultTimeoutsWhenUsingContexts.() |
| 33 | DisableDefaultTimeoutsWhenUsingContextscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Gomega#DisableDefaultTimeoutsWhenUsingContext.() |
| 34 | } |
| 35 | |
| 36 | // All Gomega matchers must implement the GomegaMatcher interface |
| 37 | // |
| 38 | // For details on writing custom matchers, check out: http://onsi.github.io/gomega/#adding-your-own-matchers |
| 39 | type GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher# interface { |
| 40 | Matchscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#Match.(actual any) (success bool, err error) |
| 41 | FailureMessagescip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#FailureMessage.(actual any) (message string) |
| 42 | NegatedFailureMessagescip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#NegatedFailureMessage.(actual any) (message string) |
| 43 | } |
| 44 | |
| 45 | /* |
| 46 | GomegaMatchers that also match the OracleMatcher interface can convey information about |
| 47 | whether or not their result will change upon future attempts. |
| 48 | |
| 49 | This allows `Eventually` and `Consistently` to short circuit if success becomes impossible. |
| 50 | |
| 51 | For example, a process' exit code can never change. So, gexec's Exit matcher returns `true` |
| 52 | for `MatchMayChangeInTheFuture` until the process exits, at which point it returns `false` forevermore. |
| 53 | */ |
| 54 | type OracleMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/OracleMatcher# interface { |
| 55 | MatchMayChangeInTheFuturescip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/OracleMatcher#MatchMayChangeInTheFuture.(actual any) bool |
| 56 | } |
| 57 | |
| 58 | func MatchMayChangeInTheFuturescip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/MatchMayChangeInTheFuture().(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, value any) bool { |
| 59 | oracleMatcher, ok := matcher.(OracleMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/OracleMatcher#) |
| 60 | if !ok { |
| 61 | return true |
| 62 | } |
| 63 | |
| 64 | return oracleMatcher.MatchMayChangeInTheFuturescip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/OracleMatcher#MatchMayChangeInTheFuture.(value) |
| 65 | } |
| 66 | |
| 67 | // AsyncAssertions are returned by Eventually and Consistently and enable matchers to be polled repeatedly to ensure |
| 68 | // they are eventually satisfied |
| 69 | type AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# interface { |
| 70 | Shouldscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#Should.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 71 | ShouldNotscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#ShouldNot.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 72 | |
| 73 | // equivalent to above |
| 74 | Toscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#To.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 75 | ToNotscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#ToNot.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 76 | NotToscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#NotTo.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 77 | |
| 78 | WithOffsetscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#WithOffset.(offset int) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 79 | WithTimeoutscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#WithTimeout.(interval timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 80 | WithPollingscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#WithPolling.(interval timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 81 | Withinscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#Within.(timeout timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 82 | ProbeEveryscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#ProbeEvery.(interval timescip-go gomod github.com/golang/go/src go1.24.0 time/.Durationscip-go gomod github.com/golang/go/src go1.24.0 time/Duration#) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 83 | WithContextscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#WithContext.(ctx contextscip-go gomod github.com/golang/go/src go1.24.0 context/.Contextscip-go gomod github.com/golang/go/src go1.24.0 context/Context#) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 84 | WithArgumentsscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#WithArguments.(argsToForward ...any) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 85 | MustPassRepeatedlyscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion#MustPassRepeatedly.(count int) AsyncAssertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/AsyncAssertion# |
| 86 | } |
| 87 | |
| 88 | // Assertions are returned by Ω and Expect and enable assertions against Gomega matchers |
| 89 | type Assertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion# interface { |
| 90 | Shouldscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion#Should.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 91 | ShouldNotscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion#ShouldNot.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 92 | |
| 93 | Toscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion#To.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 94 | ToNotscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion#ToNot.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 95 | NotToscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion#NotTo.(matcher GomegaMatcherscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/GomegaMatcher#, optionalDescription ...any) bool |
| 96 | |
| 97 | WithOffsetscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion#WithOffset.(offset int) Assertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion# |
| 98 | |
| 99 | Errorscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion#Error.() Assertionscip-go gomod github.com/onsi/gomega . `github.com/onsi/gomega/types`/Assertion# |
| 100 | } |