cli: bootstrap verified std bytes and math with source imports
This commit is contained in:
52 files changed
+1000
-22
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// expect: run
|
||||
// result: 0
|
||||
// phase: 6
|
||||
// spec: docs/spec/16-standard-library.md; docs/spec/15-source-language.md §13
|
||||
module test.standard
|
||||
import std.math;
|
||||
|
||||
fn main() -> u64
|
||||
effects []
|
||||
{
|
||||
assert(std.math.min_u64(0, 18446744073709551615) == 0);
|
||||
assert(std.math.min_u64(7, 7) == 7);
|
||||
assert(std.math.min_u64(9, 4) == 4);
|
||||
assert(std.math.max_u64(0, 18446744073709551615) == 18446744073709551615);
|
||||
assert(std.math.max_u64(7, 7) == 7);
|
||||
assert(std.math.max_u64(9, 4) == 9);
|
||||
assert(std.math.clamp_u64(0, 4, 9) == 4);
|
||||
assert(std.math.clamp_u64(20, 4, 9) == 9);
|
||||
assert(std.math.clamp_u64(7, 4, 9) == 7);
|
||||
assert(std.math.clamp_u64(7, 4, 4) == 4);
|
||||
assert(std.math.clamp_u64(18446744073709551615, 0, 18446744073709551615) == 18446744073709551615);
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user