summaryrefslogtreecommitdiffstats
path: root/tests/016
diff options
context:
space:
mode:
Diffstat (limited to 'tests/016')
-rw-r--r--tests/016/arith.tl18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/016/arith.tl b/tests/016/arith.tl
index f1f34c4f..eaa7fe2f 100644
--- a/tests/016/arith.tl
+++ b/tests/016/arith.tl
@@ -39,3 +39,21 @@
(vtest (mod c b) 0)
(vtest (mod (pred c) a) (pred a))
(vtest (mod (pred c) b) (pred b))))
+
+(test (digits 0) (0))
+(test (digits 1) (1))
+(test (digits 9) (9))
+(test (digits 10) (1 0))
+(test (digits 19) (1 9))
+(test (digits 20) (2 0))
+(test (digits 37) (3 7))
+(test (digits 100) (1 0 0))
+(test (digits 101) (1 0 1))
+(test (digits 999) (9 9 9))
+(test (digits 1000) (1 0 0 0))
+(test (digits 0 2) (0))
+(test (digits 1 2) (1))
+(test (digits 2 2) (1 0))
+(test (digits 3 2) (1 1))
+(test (digits 7 2) (1 1 1))
+(test (digits 8 2) (1 0 0 0))