zig icon indicating copy to clipboard operation
zig copied to clipboard

Behavior tests should avoid `expectEqual` and friends

Open alexrp opened this issue 6 months ago • 1 comments

See discussion on #24360; these functions depend too much on the standard library.

alexrp avatar Jul 07 '25 18:07 alexrp

Would adding a select few simplified (no printing etc) versions of these functions to test/behavior.zig be a satisfactory solution to the more complicated tests?

For example, we could add simpleExpectEqualStrings() to test/behavior.zig to replace instances of std.testing.expectEqualStrings in test/behavior/**

Alternative would be to carefully refactor the remaining 300-ish instances of more complicated tests some other way.

jeffective avatar Nov 06 '25 01:11 jeffective