Skip to content

Commit

Permalink
Add tokens test
Browse files Browse the repository at this point in the history
  • Loading branch information
kg583 committed Dec 19, 2024
1 parent 05208f9 commit 17aa6d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/tivars.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from decimal import Decimal

from tivars.models import *
from tivars.tokenizer import *
from tivars.types import *
from tivars import TIHeader, TIVar, TIFlashHeader

Expand Down Expand Up @@ -170,6 +171,8 @@ def test_load_from_string(self):
test_program.load_string(string := "setDate(1")
self.assertEqual(test_program.string(), string)
self.assertEqual(f"{test_program:02d: }", f"00: {string}")
self.assertEqual(test_program.tokens(), [TI_84PCE.tokens.bytes[b'\xef\x00'],
TI_84PCE.tokens.bytes[b'1']])

# Version is wrong(?)
test_program.version = 0x04
Expand Down

0 comments on commit 17aa6d7

Please sign in to comment.