Added more test files from lectures.

This commit is contained in:
cheezedoodle2
2023-04-06 17:03:21 -07:00
parent c610762522
commit 0dd1348601
13 changed files with 311 additions and 7 deletions
+1 -1
View File
@@ -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!")