Added more test files from lectures.
This commit is contained in:
@@ -28,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 = 2)
|
||||
bi5 = BoundedInt(2, min = 0, max = -1)
|
||||
try:
|
||||
bi6 = bi4 - bi5 # 1 - 2 = (-1), which is less than min = 0
|
||||
print(f"❌ Test 3 failed!")
|
||||
|
||||
Reference in New Issue
Block a user