diff --git a/test13.py b/test13.py index b45b271..13825f6 100644 --- a/test13.py +++ b/test13.py @@ -3,8 +3,9 @@ from BoundedInt import BoundedInt class BoundedIntTester: def __init__(self): pass + def test1(self): - bi1 = BoundedInt(0xdeadbeef, max = 0, min = 10) + bi1 = BoundedInt(0xdeadbeef, min = (0xdeadbeef-1), max = (0xdeadbeef+1)) if int(bi1) == 0xdeadbeef: print(f"✅ Test 1 passed!") else: @@ -27,7 +28,7 @@ class BoundedIntTester: Test that addition works for two BoundedInts, and throws an error if the bounds are exceeded. """ bi4 = BoundedInt(1, min = 0, max = 1) - bi5 = BoundedInt(2, min = 0, max = 1) + bi5 = BoundedInt(2, min = 0, max = 2) try: bi6 = bi4 - bi5 # 1 - 2 = (-1), which is less than min = 0 print(f"❌ Test 3 failed!")