summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2024-05-18 14:47:46 -0600
committerbd <bdunahu@operationnull.com>2024-05-18 18:48:46 -0600
commit05a303de6c8cf8e8acb00b2107f7a66c363140b3 (patch)
tree7caee8ff1708d2669131ae0d7abc109ba2430528
parent6eb36d8a2f317f2eb49832f3ee06f24204c9e4fb (diff)
Booleans-test file, tests
-rw-r--r--booleans/booleans-test.scm16
-rw-r--r--booleans/booleans.scm6
2 files changed, 22 insertions, 0 deletions
diff --git a/booleans/booleans-test.scm b/booleans/booleans-test.scm
new file mode 100644
index 0000000..78a78be
--- /dev/null
+++ b/booleans/booleans-test.scm
@@ -0,0 +1,16 @@
+(use-modules (srfi srfi-64)
+ (booleans))
+
+(test-begin "harness")
+
+
+(test-equal "test-true-inverted-is-false"
+ #f
+ (boolean-invert #t))
+
+(test-equal "test-true-inverted-is-false"
+ #t
+ (boolean-invert #f))
+
+
+(test-end "harness")
diff --git a/booleans/booleans.scm b/booleans/booleans.scm
new file mode 100644
index 0000000..6b2fe07
--- /dev/null
+++ b/booleans/booleans.scm
@@ -0,0 +1,6 @@
+(define-module (booleans))
+
+(define-public (boolean-invert bool)
+ "Returns the opposite value of the
+passed in boolean."
+ (not bool))