xgo/vm/vm_not_operator_test.go
2019-01-08 23:17:42 -08:00

15 lines
303 B
Go

package vm_test
import (
"testing"
)
func TestBangOperator(t *testing.T) {
expect(t, `out = !true`, false)
expect(t, `out = !false`, true)
expect(t, `out = !0`, true)
expect(t, `out = !5`, false)
expect(t, `out = !!true`, true)
expect(t, `out = !!false`, false)
expect(t, `out = !!5`, true)
}