Skip to content

Commit

Permalink
add test function
Browse files Browse the repository at this point in the history
  • Loading branch information
lahirumenik committed Oct 16, 2023
1 parent 05af306 commit b6029c0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Driver/src/KeyDecoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,12 @@ def decode(self, code):
talk("Special character mode")
self.speciaclChMode = True

def test():

test_decoder = KeyDecoder()
assert test_decoder.decode(0) =="a"
assert test_decoder.decode(1)=="b"
assert test_decoder.decode(2)=="c"
test_decoder.decode(-1)
assert test_decoder.decode(0) == "A"
test()

0 comments on commit b6029c0

Please sign in to comment.