optimizations
Some checks failed
Build / build (push) Successful in 10m47s
Publish Image / publish (push) Failing after 33s
Test / build (push) Failing after 6m42s

This commit is contained in:
Chuck Smith
2024-04-02 14:54:08 -04:00
parent 88e3330856
commit f08b458325
9 changed files with 313 additions and 355 deletions

View File

@@ -257,6 +257,24 @@ func TestFloatingPointArithmetic(t *testing.T) {
runVmTests(t, tests)
}
func TestMixedArithmetic(t *testing.T) {
tests := []vmTestCase{
{"1 + 2.1", 3.1},
{"2 - 0.5", 1.5},
{"2 * 2.5", 5.0},
{"5 / 2.0", 2.5},
{"5 % 2.0", 1.0},
{"2.1 + 1", 3.1},
{"2.5 - 2", 0.5},
{"2.5 * 2", 5.0},
{"5.0 / 2", 2.5},
{"5.0 % 2", 1.0},
}
runVmTests(t, tests)
}
func TestBooleanExpressions(t *testing.T) {
tests := []vmTestCase{
{"true", true},