zig icon indicating copy to clipboard operation
zig copied to clipboard

Reduce usage of expectEqual in behavior tests

Open jeffective opened this issue 2 months ago • 1 comments

Does not fully close https://github.com/ziglang/zig/issues/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 https://github.com/ziglang/zig/pull/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 avatar Nov 03 '25 03:11 jeffective

Looks like windows CI failure is https://github.com/ziglang/zig/issues/22510 ?

jeffective avatar Nov 03 '25 07:11 jeffective