prefix expressions
This commit is contained in:
@@ -119,6 +119,10 @@ func TestIntegerArithmetic(t *testing.T) {
|
||||
{"(1 < 2) == false", false},
|
||||
{"(1 > 2) == true", false},
|
||||
{"(1 > 2) == false", true},
|
||||
{"-5", -5},
|
||||
{"-10", -10},
|
||||
{"-50 + 100 + -50", 0},
|
||||
{"(5 + 10 * 2 + 15 / 3) * 2 + -10", 50},
|
||||
}
|
||||
|
||||
runVmTests(t, tests)
|
||||
@@ -128,6 +132,12 @@ func TestBooleanExpressions(t *testing.T) {
|
||||
tests := []vmTestCase{
|
||||
{"true", true},
|
||||
{"false", false},
|
||||
{"!true", false},
|
||||
{"!false", true},
|
||||
{"!5", false},
|
||||
{"!!true", true},
|
||||
{"!!false", false},
|
||||
{"!!5", true},
|
||||
}
|
||||
|
||||
runVmTests(t, tests)
|
||||
|
||||
Reference in New Issue
Block a user