summaryrefslogtreecommitdiff
path: root/t/util.lisp
diff options
context:
space:
mode:
authorSiddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com>2025-04-08 10:17:09 -0400
committerGitHub <noreply@github.com>2025-04-08 10:17:09 -0400
commitcc1e5892a25949b996d69a0b07f151a276ef2570 (patch)
tree643d37db692c19d1ef64223eadcac7a28dbbd7db /t/util.lisp
parent19d13c8339ee990fba358417a54aa6f1c94c7bca (diff)
parentb85c10ba1c53f1b442fea6bde4c2a2f73cfe5d6b (diff)
Merge pull request #1 from bdunahu/bdunahu
Add logic to open file, full lexer and tests.
Diffstat (limited to 't/util.lisp')
-rw-r--r--t/util.lisp12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/util.lisp b/t/util.lisp
index ef59fbb..c2dafab 100644
--- a/t/util.lisp
+++ b/t/util.lisp
@@ -14,3 +14,15 @@
(test asm-extension?-returns-true-obvious-case
(is (util:asm-extension? "quux.asm")))
+
+(test format-as-binary-unsigned-no-pad
+ (is (string= (util:format-as-binary 0 0)
+ "0")))
+
+(test format-as-binary-unsigned-no-pad-fourty-two
+ (is (string= (util:format-as-binary 42 0)
+ "101010")))
+
+(test format-as-binary-unsigned-pad-fourty-two
+ (is (string= (util:format-as-binary 42 10)
+ "0000101010")))