tests: Updated test for binops
authorLucas Bajolet <r4pass@hotmail.com>
Mon, 15 Jun 2015 15:06:14 +0000 (11:06 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Mon, 15 Jun 2015 15:06:14 +0000 (11:06 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

tests/sav/test_binariesop.res
tests/test_binariesop.nit

index d4bc55f..fc9141f 100644 (file)
@@ -1,6 +1,22 @@
 5
 5
 0
+5
+5
+0
+0
+5
+5
 0
 5
 5
+-1
+-1
+0x05
+0x05
+0x00
+0x05
+0x05
+0x00
+0xfa
+0xfa
index 3e78914..3661e49 100644 (file)
@@ -4,10 +4,32 @@ var b = 5
 print a.bin_and(b) # 5
 print a.bin_or(b)  # 5
 print a.bin_xor(b) # 0
+print a & b
+print a | b
+print a ^ b
 
 a = 0
 b = 5
 
 print a.bin_and(b) # 0
 print a.bin_or(b)  # 5
-print a.bin_xor(b) # 5
\ No newline at end of file
+print a.bin_xor(b) # 5
+print a & b
+print a | b
+print a ^ b
+
+print a.bin_not
+print ~a
+
+var c = 5u8
+var d = 5u8
+
+print c.bin_and(d) # 0
+print c.bin_or(d)  # 5
+print c.bin_xor(d) # 5
+print c & d
+print c | d
+print c ^ d
+
+print c.bin_not
+print ~c