Skip to content

Reduce usage of expectEqual in behavior tests - #25791

Closed
jeffective wants to merge 1 commit into
ziglang:masterfrom
jeffective:24361-reduce-expect-equal-behavior-tests
Closed

Reduce usage of expectEqual in behavior tests#25791
jeffective wants to merge 1 commit into
ziglang:masterfrom
jeffective:24361-reduce-expect-equal-behavior-tests

Conversation

@jeffective

@jeffective jeffective commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Does not fully close #24361 (this is only a first, simple change set)

Summary:

  • where the type of the operands allows, change expectEqual(x, y) to expect(x == y) for files in test/behavior/**
# without these changes (master branch)
$ git grep expectEqual test/behavior | wc -l
1018

# with these changes
$ git grep expectEqual test/behavior | wc -l
314

My editor was configured to re-order imports on save. Hope that isn't a huge issue.

Verification evidence:

  • the CI should pass, no new tests are introduced, only changes to existing tests

note: I had closed my previous PR to prevent unintended CI runs during rebase etc #24389

note to self: use this for testing if you have to rebase again:

zig build test-behavior -Dskip-release -Dskip-non-native -Dskip-llvm=true -Dskip-libc -Dskip-single-threaded --watch

@jeffective

jeffective commented Nov 3, 2025

Copy link
Copy Markdown
Contributor Author

Looks like windows CI failure is #22510 ?

@alexrp

alexrp commented May 21, 2026

Copy link
Copy Markdown
Member

This'll need a rebase and fresh CI results. If at some point you feel like resurrecting this, please reopen it on Codeberg.

@alexrp alexrp closed this May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Behavior tests should avoid expectEqual and friends

2 participants