WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.2% of users enabled 2FA.

Commit 5873b545 authored by qinsoon's avatar qinsoon
Browse files

separating the failed tests into smaller tests

parent 805502fe
......@@ -55,7 +55,7 @@ def test_rpython_int_cmp_zero():
assert mu_int_cmp_zero(-9223372036854775808) == -1
@may_spawn_proc
def test_rpython_int_cmp_const():
def test_rpython_int_cmp_const_zero_eq_zero():
# these may get optimized away by Rpython compiler
def int_cmp_zero_eq_zero():
......@@ -64,32 +64,50 @@ def test_rpython_int_cmp_const():
else:
return 0
mu_int_cmp_zero_eq_zero, _ = fncptr_from_rpy_func(int_cmp_zero_eq_zero, [], rffi.LONGLONG)
assert mu_int_cmp_zero_eq_zero() == 1
@may_spawn_proc
def test_rpython_int_cmp_const_zero_ne_zero():
# these may get optimized away by Rpython compiler
def int_cmp_zero_ne_zero():
if 0 != 0:
return 0
else:
return 1
mu_int_cmp_zero_ne_zero, _ = fncptr_from_rpy_func(int_cmp_zero_ne_zero, [], rffi.LONGLONG)
assert mu_int_cmp_zero_ne_zero() == 1
@may_spawn_proc
def test_rpython_int_cmp_const_zero_eq_one():
# these may get optimized away by Rpython compiler
def int_cmp_zero_eq_one():
if 0 == 1:
return 0
else:
return 1
mu_int_cmp_zero_eq_one , _ = fncptr_from_rpy_func(int_cmp_zero_eq_one , [], rffi.LONGLONG)
assert mu_int_cmp_zero_eq_one () == 1
@may_spawn_proc
def test_rpython_int_cmp_const_zero_ne_one():
# these may get optimized away by Rpython compiler
def int_cmp_zero_ne_one():
if 0 != 1:
return 1
else:
return 0
mu_int_cmp_zero_eq_zero, _ = fncptr_from_rpy_func(int_cmp_zero_eq_zero, [], rffi.LONGLONG)
mu_int_cmp_zero_ne_zero, _ = fncptr_from_rpy_func(int_cmp_zero_ne_zero, [], rffi.LONGLONG)
mu_int_cmp_zero_eq_one , _ = fncptr_from_rpy_func(int_cmp_zero_eq_one , [], rffi.LONGLONG)
mu_int_cmp_zero_ne_one , _ = fncptr_from_rpy_func(int_cmp_zero_ne_one , [], rffi.LONGLONG)
assert mu_int_cmp_zero_eq_zero() == 1
assert mu_int_cmp_zero_ne_zero() == 1
assert mu_int_cmp_zero_eq_one () == 1
assert mu_int_cmp_zero_ne_one () == 1
@may_spawn_proc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment