diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-04-10 18:37:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-10 18:37:40 -0400 |
commit | 5dbf0b63988b42c112ca0087cbbbb090566df5c1 (patch) | |
tree | ce8ee03b9d25b739a2e687c69b14d9221420e4fa /t/util.lisp | |
parent | cc1e5892a25949b996d69a0b07f151a276ef2570 (diff) | |
parent | df508744ec2975cec0ba05e8a4358c1c41265c4c (diff) |
Merge pull request #2 from bdunahu/bdunahu
Finish parser, add .text and .data directives, variable names, label processing
Diffstat (limited to 't/util.lisp')
-rw-r--r-- | t/util.lisp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/t/util.lisp b/t/util.lisp index c2dafab..e15e142 100644 --- a/t/util.lisp +++ b/t/util.lisp @@ -16,13 +16,17 @@ (is (util:asm-extension? "quux.asm"))) (test format-as-binary-unsigned-no-pad - (is (string= (util:format-as-binary 0 0) - "0"))) + (is (string= "0" + (util:format-as-binary 0 0)))) (test format-as-binary-unsigned-no-pad-fourty-two - (is (string= (util:format-as-binary 42 0) - "101010"))) + (is (string= "101010" + (util:format-as-binary 42 6)))) (test format-as-binary-unsigned-pad-fourty-two - (is (string= (util:format-as-binary 42 10) - "0000101010"))) + (is (string= "0000101010" + (util:format-as-binary 42 10)))) + +(test format-as-binary-overflow + (is (string= "10" + (util:format-as-binary 10 2)))) |