diff options
author | bd <bdunahu@operationnull.com> | 2024-06-09 00:16:27 -0600 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-06-09 00:16:27 -0600 |
commit | cd47b52a406ebed5b3f82e51168ead27af3795d9 (patch) | |
tree | 78ad89d67dc77e49636634c1237edf6389c5b2d8 /iterative-add/iterative-add-test.scm | |
parent | 6b40eb033d9c0bda4006f23426c34ef8fda4a0d5 (diff) |
AoC 2020.1 p1
Diffstat (limited to 'iterative-add/iterative-add-test.scm')
-rw-r--r-- | iterative-add/iterative-add-test.scm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/iterative-add/iterative-add-test.scm b/iterative-add/iterative-add-test.scm new file mode 100644 index 0000000..d318570 --- /dev/null +++ b/iterative-add/iterative-add-test.scm @@ -0,0 +1,20 @@ +;; -*- compile-command: "guile -L . iterative-add-test.scm"; -*- +(use-modules (srfi srfi-64) + (iterative-add)) + + +(test-begin "harness") + +(test-equal "add 0 to 1" + 1 + (iterative-add-generator 1)) + +(test-equal "add 1 to 2" + 3 + (iterative-add-generator 2)) + +(test-equal "add 2 to 6" + 8 + (iterative-add-generator 6)) + +(test-end "harness") |