From efb4865c81bfef747428303d5388fb1889db5769 Mon Sep 17 00:00:00 2001 From: bd Date: Sun, 9 Jun 2024 23:20:44 -0600 Subject: Cleanup repository --- spellcheck/spellcheck-test.scm | 57 +----------------------------------------- 1 file changed, 1 insertion(+), 56 deletions(-) (limited to 'spellcheck/spellcheck-test.scm') diff --git a/spellcheck/spellcheck-test.scm b/spellcheck/spellcheck-test.scm index 438384d..55fce48 100644 --- a/spellcheck/spellcheck-test.scm +++ b/spellcheck/spellcheck-test.scm @@ -1,61 +1,6 @@ (use-modules (srfi srfi-64) - (dictionary) - (mutate)) + (mutate)) -(define simple-dict (create-dictionary '("word"))) -(define complex-dict (create-dictionary '("Again" "the" "thirst" - "quencher" "of" "wolves" - "embarked" "on" "a" "well" - "prepared" "expedition" - "eastward" "the" "generous" - "ruler" "moved" "the" "bitter" - "heart" "of" "the" "snake" - "across" "the" "fire"))) - -(test-begin "dictionary") - - -(test-assert "create-dictionary returns hashtable" - (hash-table? - (create-dictionary '()))) - -(define dict (create-dictionary '("word"))) - -(test-equal "list-keys-single" - '("word") - (dict-keys-ref simple-dict)) - -(test-equal "count-values-single" - 1 - (dict-values-ref simple-dict)) - - -(test-equal "retrieve single" - 1 - (dict-occur-ref complex-dict "wolves")) - -(test-equal "retrieve double" - 2 - (dict-occur-ref complex-dict "of")) - -(test-equal "retrieve quintuple" - 5 - (dict-occur-ref complex-dict "the")) - -(test-equal "retrieve zero" - 0 - (dict-occur-ref complex-dict "king")) - -(test-equal "list-keys-sentence" - '("Again" "a" "across" "bitter" "eastward" "embarked" "expedition" "fire" "generous" "heart" "moved" "of" "on" "prepared" "quencher" "ruler" "snake" "the" "thirst" "well" "wolves") - (sort (dict-keys-ref complex-dict) string