summaryrefslogtreecommitdiff
path: root/tests/run.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run.scm')
-rw-r--r--tests/run.scm33
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/run.scm b/tests/run.scm
index 4d15ea7..571a7fe 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -154,6 +154,37 @@
(test-assert (clean? '(a b c z)))))
(test-group "finally, all symbols used in any test are still clean"
- (test-assert (clean? all-symbols))))
+ (test-assert (clean? all-symbols)))
+
+ (test-group "reified slsets"
+ (let ((result (with-reified-slset '(a b c d a c e)
+ (lambda (r)
+ (test #t (reified-slset-contains? r 'a))
+ (test #t (reified-slset-contains? r 'b))
+ (test #t (reified-slset-contains? r 'e))
+ (test #f (reified-slset-contains? r 'i))
+ (test #f (reified-slset-contains? r 'x))
+
+ (reified-slset-delete! r 'b)
+ (test '(a c d a c e)
+ (reified-slset->slset r))
+
+ (reified-slset-adjoin! r 'x)
+ (test #t (reified-slset-contains? r 'x))
+
+ (reified-slset-delete! r 'a 'e 'i)
+ (test '(x c d c)
+ (reified-slset->slset r))
+
+ ;; Extra check to ensure we unmark these
+ (test #f (reified-slset-contains? r 'a))
+
+ ;; Basic sanity check, remaining contents still in there
+ (test #t (reified-slset-contains? r 'c))))))
+ ;; Put it in an extra list to avoid test form complaining
+ (test '((x c d c)) (list result)))
+
+ (test-group "all symbols used here still clean"
+ (test-assert (clean? '(a b c d e i x))))))
(test-exit)