Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ADoc
API
APIs
Acknowledgements
Autocomplete
BDD
BSON
CI
Expand All @@ -9,13 +12,19 @@ CLIs
CSV
CodeFactor
CodeQL
ComparisonOperators
ContinueOnMethod
DCO
DSL
DisableCapacities
DisableMethods
DisablePointerAddresses
DisablePointerMethods
DockerHub
EDoc
EType
ElementsMatch's
Enablement
FAQ
FDs
GC
Expand All @@ -25,6 +34,7 @@ HTTP
HTTPS
HUGO
ID
IDE's
IDs
IOW
IP
Expand All @@ -37,35 +47,64 @@ Kubernetes
LOC
Markdown
MaxDepth
Mezard
NUnit
NaN
OAI
OAuth
Obershelp
OpenAPI
Orderable
OrderedSlice
PHPUnit
PR
PR's
PRs
PkgGoDev
Pre
PyTest
README
RSpec
Ratcliff
ReadDir
Readlink
Reimplemented
Relinted
SCSS
SSN
SUnit
SeqContains
SetSeq
SignedNumber
SliceSubset
SortKeys
SpewKeys
Subpackages
Substitutability
Subtests
Superlinear
TCP
TLS
TODO
TTY
Teardown
Triaging
UI
ULID
URI
URL
URLs
USD
UUID
Unmarshalers
XYZ
YAML
- "dependending" - should be "depending"
- "logics" - should be "logic" (uncountable noun)
- "maintainance" - should be "maintenance"
ad'hoc
agentic
allocs
api
apis
arg
Expand All @@ -79,9 +118,11 @@ authenticators
authorized
authorizer
authorizers
autogenerate
backquote
backquoted
bash
benchmarked
benchmarking
bitmask
bson
Expand All @@ -92,6 +133,7 @@ ci
cidr
cli
clis
cmp
codebase
codecov
codegen
Expand All @@ -103,6 +145,7 @@ csv
ctx
customizable
dependabot
deps
dereference
dereferenced
dereferencing
Expand All @@ -111,14 +154,18 @@ deserialize
deserialized
deserializer
dev
developercertificate
difflib
disambiguates
docker
dumpcgo
e.g.
env
err's
de facto
faq
fd
fka
flattener
fmt
fromfile
Expand All @@ -140,6 +187,7 @@ hostname
hostnames
html
http
httpOK
https
hugo
i.e.
Expand All @@ -156,41 +204,54 @@ ipsums
ipv4
ipv6
isbn
iter
json
jsonschema
k8s
kubernetes
lifecycle
lineterm
linter
linter's
linters
listA
listB
logics
loren
lowercases
maintainer's
markdown
marshaled
marshaling
matchers
maths
md
metalinter
middleware
middlewares
mixin
mockFailNowT
mockT
monorepo
multipart
mutex
ns
oai
oauth
oauth2
openapi
param
params
pmezard
pollCondition
pprof
prepend
prepended
readlines
rebase
rebased
redeclare
relinting
repo
repos
roadmap
Expand All @@ -212,8 +273,11 @@ structs
submodule
subpackage
substring
subtests
superlinearly
swagger
syncing
testDataPath
testcgo
testify's
testifylint
Expand Down Expand Up @@ -249,3 +313,4 @@ workspaces
writelines
xunit
yaml
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,28 @@ Design and exploration phase. Feedback, contributions and proposals are welcome.
>
> ✅ Fully refactored how assertions are generated and documented.
>
> ✅ Fixed hangs & panics when using `spew`. Fuzzed `spew`.
>
> ✅ Fixed go routine leaks with `EventuallyWithT` and co.
> Fixes
>
> ✅ Added `Kind` & `NotKind`
> ✅ Fixed hangs & panics when using `spew`. Fuzzed `spew`. Fixed deterministic order of keys in diff.
>
> ✅ Fix deterministic order of keys in diff
> ✅ Fixed go routine leaks with `EventuallyWith` and co.
>
> ✅ Fixed wrong logic with `IsNonIncreasing`, `InNonDecreasing`
>
> ✅ Fixed edge cases with `InDelta`, `InEpsilon`
>
> ✅ Fixed edge cases with `EqualValues`
>
> ✅ Fixed wrong logic with `IsNonIncreasing`, `InNonDecreasing`
> Additions
>
> ✅ Introduced generics: ~ 40 new type-safe assertions with generic types (doc: added usage guide, examples and benchmark)
>
> ✅ Added `Kind` & `NotKind`, `Consistently`, `NoGoRoutineLeak`, `NoFileDescriptorLeak`
>
> ✅ Added opt-in support for colorized output
>
> ✅ Introduced generics: 38 new type-safe assertions with generic types (doc: added usage guide, examples and benchmark)
> ✅ Added migration tool
>
> See also our [ROADMAP][doc-roadmap].

Expand Down
2 changes: 1 addition & 1 deletion docs/doc-site/project/contributing/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Include documentation changes in the same commit so that a revert would remove a
{{% tab title="Sign Your Work" %}}
#### Sign your work

Software is developped by real people.
Software is developed by real people.

The sign-off is a simple line at the end of your commit message,
which certifies that you wrote it or otherwise have the right to
Expand Down
6 changes: 3 additions & 3 deletions docs/doc-site/project/maintainers/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ weight: 2

### Goals

We want the maintainance of dozens of test assertions, times many variants, to remain reasonably low.
We want the maintenance of dozens of test assertions, times many variants, to remain reasonably low.

The maintainance flow is intended to require different activities and levels of understanding,
The maintenance flow is intended to require different activities and levels of understanding,
dependending on the complexity of a planned evolution.

{{< mermaid align="center" zoom="true" >}}
Expand Down Expand Up @@ -51,7 +51,7 @@ one "forward" variant and one "forward formatted" variant (as methods).
**For every "helper" function (not an assertion): 2 variants.**


All these variants make up several hundreds functions, which poses a challenge for maintainance and documentation.
All these variants make up several hundreds functions, which poses a challenge for maintenance and documentation.

We have adopted code and documentation generation as a mean to mitigate this issue.

Expand Down
8 changes: 4 additions & 4 deletions docs/doc-site/project/maintainers/BENCHMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Collection operations see the most dramatic improvements due to elimination of p
| **ElementsMatch (10 items)** | **21x faster** | 568 B → 320 B (44% reduction) | Common test operation |
| **ElementsMatch (100 items)** | **39x faster** | 41 KB → 3.6 KB (91% reduction) | Scales superlinearly |
| **ElementsMatch (1000 items)** | **81x faster** | 4 MB → 33 KB (99% reduction) | Large collection testing |
| **SliceContains** | **16x faster** | 4 allocs → 0 | Membership testing |
| **SeqContains (iter.Seq)** | **25x faster** | 55 allocs → 9 | Go 1.23+ iterators |
| **SliceContainsT** | **16x faster** | 4 allocs → 0 | Membership testing |
| **SeqContainsT (iter.Seq)** | **25x faster** | 55 allocs → 9 | Go 1.23+ iterators |
| **SliceSubset** | **43x faster** | 17 allocs → 0 | Subset verification |

**Key insight**: ElementsMatch's O(n²) complexity amplifies the benefits—the speedup **increases** with collection size (21x → 39x → 81x).
Expand Down Expand Up @@ -78,8 +78,8 @@ Generic type checks eliminate reflection and provide a cleaner API:

| Function | Speedup | Notes |
|----------|---------|-------|
| **IsOfType** | **9-11x faster** | No dummy value needed with generics |
| **IsNotOfType** | **Similar gains** | Type parameter makes intent explicit |
| **IsOfTypeT** | **9-11x faster** | No dummy value needed with generics |
| **IsNotOfTypeT** | **Similar gains** | Type parameter makes intent explicit |

### ⚖️ Modest Gains: Where Processing Dominates

Expand Down
2 changes: 1 addition & 1 deletion docs/doc-site/project/maintainers/MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This allows for minimal test dependencies.
* all updates from "trusted" dependencies (github actions, golang.org packages, go-openapi packages
are auto-merged if they successfully pass CI.

* go version udpates
* go version updates

Principle:

Expand Down
17 changes: 9 additions & 8 deletions docs/doc-site/project/maintainers/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ timeline
✅ v2.3 (Fev 2026) : Other extensions
: Extensible Assertion type
: JSON & YAML assertions: JSONMarshalsAs...
: NoGoroutineLeak
: NoGoRoutineLeak
: more documentation and examples
⏳v2.4 (Mar 2026) : Stabilize API (no more removals)
: NoFileDescriptorLeak (unix)
: async: Eventually/Never to accept error and context, Consistently
: export internal tools (spew, difflib)
: Eventually, Eventually (with context), Consistently
: Migration tool
section Q2 2026
📝 v2.5 (May 2026) : New candidate features from upstream
: NoFileDescriptorLeak (windows port)
: export internal tools (blackbox)
📝 v2.5 (May 2026) : synctest for Eventually/Consistently
: NoFileDescriptorLeak (macOS, Windows)
: New candidate features from upstream
: export internal tools (spew, difflib)
{{< /mermaid >}}

## Notes
Expand All @@ -50,7 +51,7 @@ timeline
5. [x] More testing and bug fixes (from upstream or detected during our testing)
6. [x] Introduces colorization (opt-in)
7. [x] Introduces generics
8. [x] Realign behavior re quirks, bugs, unexpected logics ... (e.g. IsNonDecreasing, EventuallyWithT...)
8. [x] Realign behavior re quirks, bugs, unexpected logics ... (e.g. `IsNonDecreasing`, `EventuallyWithT`...)
10. [x] Unclear assertions might be provided an alternative verb (e.g. `EventuallyWithT`)

### Adoption timeline at go-openapi
Expand All @@ -61,7 +62,7 @@ timeline

### What won't come anytime soon

* mocks: we use [mockery](https://https://github.com/vektra/mockery) and prefer the simpler `matryer` mocking-style.
* mocks: we use [mockery](https://github.com/vektra/mockery) and prefer the simpler `matryer` mocking-style.
testify-style mocks are thus not going to be supported anytime soon.
* extra convoluted stuff in the like of `InDeltaSlice` (more likely to be removed)

Expand Down
Loading
Loading