-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Organize and improve testing: math.zig #10930
Copy link
Copy link
Open
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Background: Tests are separated in
test/behavior/math.zig,lib/std/math.zigand (to mention for completeness) now for implementing stage2 alsotest/behaviror/int_div.zig.This is not documented and it would be nice to be consistent with "tests to show usage" with "extensive tests for edge cases" per file.
Thus there are 3 solutions, if math.zig should remain like it is:
test/behavior/math.zigand document it somewherelib/std/math/and document it somewhereAside of that, the following (reoccuring) possibly incomplete list of problems exist regarding test coverage:
general edge cases for division:
div:divExact, edge cases not tested:divFloor-0xis unnecessary complex and unfortunately the default output of std.fmtsimilar problems exist for
remandmod