-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure Numbat integration tests
- Loading branch information
Showing
18 changed files
with
286 additions
and
171 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
examples/assert_eq_success.nbt → examples/tests/assert_eq.nbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
let length = 2 m | ||
assert_eq(length, 1 m + 1 m) | ||
assert_eq(1.0 m, 1.001 m, 0.01 m) | ||
|
||
assert_eq(2 min + 30 s, 2.5 min, 0.01 s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
assert_eq((0b0 -> bin), "0b0") | ||
assert_eq((0b1 -> bin), "0b1") | ||
assert_eq((0b10 -> bin), "0b10") | ||
assert_eq((0b11 -> bin), "0b11") | ||
assert_eq((0b10101010101010101010101010101010 -> bin), "0b10101010101010101010101010101010") | ||
assert_eq((-0b11110000 -> bin), "-0b11110000") | ||
|
||
assert_eq((0o0 -> oct), "0o0") | ||
assert_eq((0o1 -> oct), "0o1") | ||
assert_eq((0o7 -> oct), "0o7") | ||
assert_eq((0o10 -> oct), "0o10") | ||
assert_eq((0o77 -> oct), "0o77") | ||
assert_eq((0o12345670 -> oct), "0o12345670") | ||
assert_eq((-0o12345670 -> oct), "-0o12345670") | ||
|
||
assert_eq((0x0 -> hex), "0x0") | ||
assert_eq((0x1 -> hex), "0x1") | ||
assert_eq((0x9 -> hex), "0x9") | ||
assert_eq((0xa -> hex), "0xa") | ||
assert_eq((0xf -> hex), "0xf") | ||
assert_eq((0xabc1234567890 -> hex), "0xabc1234567890") | ||
assert_eq((-0xc0ffee -> hex), "-0xc0ffee") |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# unit_of | ||
|
||
assert_eq(unit_of(0), 1) | ||
|
||
assert_eq(unit_of(1), 1) | ||
assert_eq(unit_of(1.2345), 1) | ||
|
||
assert_eq(unit_of(1 m), m) | ||
assert_eq(unit_of(1.2345 m), m) | ||
|
||
assert_eq(unit_of(1 m^2/s), m^2/s) | ||
assert_eq(unit_of(1.2345 m^2/s), m^2/s) | ||
|
||
# value_of | ||
|
||
assert_eq(value_of(0), 0) | ||
|
||
assert_eq(value_of(1), 1) | ||
assert_eq(value_of(1.2345), 1.2345) | ||
|
||
assert_eq(value_of(1 m), 1) | ||
assert_eq(value_of(1.2345 m), 1.2345) | ||
|
||
assert_eq(value_of(1 m^2/s), 1) | ||
assert_eq(value_of(1.2345 m^2/s), 1.2345) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.