Fix the NOT instruction. Includes test case.

This commit is contained in:
Ian Farmer
2007-07-21 04:08:28 +00:00
parent c0f054549b
commit b4ac032fd7
4 changed files with 36 additions and 1 deletions

31
src/test/res/boolean.lua Normal file
View File

@@ -0,0 +1,31 @@
t = true
f = false
n = nil
s = "Hello"
z = 0
one = 1
print(t)
print(f)
print(not t)
print(not f)
print(not n)
print(not z)
print(not s)
print(not(not(t)))
print(not(not(z)))
print(not(not(n)))
print(t and f)
print(t or f)
print(f and t)
print(f or t)
print(f or one)
print(f or z)
print(f or n)
print(t and one)
print(t and z)
print(t and n)

BIN
src/test/res/boolean.luac Normal file

Binary file not shown.