diff --git a/src/iloveponies/tests/structured_data.clj b/src/iloveponies/tests/structured_data.clj index 4ba1de7..1035781 100644 --- a/src/iloveponies/tests/structured_data.clj +++ b/src/iloveponies/tests/structured_data.clj @@ -143,7 +143,7 @@ (title-length cities) => 21 (title-length wild-seed) => 9 (title-length little-schemer) => 18) - + (facts "author-count" {:exercise 11 :points 1} (author-count cities) => 1 @@ -155,7 +155,7 @@ (multiple-authors? cities) => false (multiple-authors? wild-seed) => false (multiple-authors? little-schemer) => true) - + (facts "add-author" {:exercise 13 :points 1} (add-author little-schemer {:name "Gerald J. Sussman"}) @@ -165,22 +165,22 @@ {:name "Gerald J. Sussman"}]} (add-author {:authors [{:name "Juhana"}]} {:name "Jani"}) => {:authors [{:name "Juhana"} {:name "Jani"}]}) - + (facts "alive?" {:exercise 14 :points 1} (alive? china) => true (alive? octavia) => false) - + (facts "element-lengths" {:exercise 15 :points 1} (element-lengths ["foo" "bar" "" "quux"]) => [3 3 0 4] (element-lengths ["x" [:a :b :c] {:y 42}]) => [1 3 1]) - + (facts "second-elements" {:exercise 16 :points 1} (second-elements [[1 2] [2 3] [3 4]]) => [2 3 4] (second-elements [[1 2 3 4] [1] ["a" "s" "d" "f"]]) => [2 nil "s"]) - + (facts "titles" {:exercise 17 :points 1} (titles [cities]) => ["The City and the City"] @@ -307,7 +307,7 @@ => "Wild Seed, written by Octavia E. Butler (1947 - 2006)" (book->string little-schemer) => (every-checker (has-prefix "The Little Schemer, written by ") - (has-suffix #"Daniel Friedman \(1944 - \), Matthias Felleisen|Matthias Felleisen, Daniel Friedman \(1944 - \)"))) + (has-suffix #"Daniel Friedman (1944 - ), Matthias Felleisen|Matthias Felleisen, Daniel Friedman (1944 - )"))) (facts "books->string" {:exercise 29 :points 1} @@ -315,7 +315,7 @@ (books->string [cities]) => "1 book. The City and the City, written by China Miéville (1972 - )." (books->string [little-schemer, cities, wild-seed]) - => #"3 books. The Little Schemer, written by (Daniel Friedman \(1944 - \), Matthias Felleisen|Matthias Felleisen, Daniel Friedman \(1944 - \)). The City and the City, written by China Miéville \(1972 - \). Wild Seed, written by Octavia E. Butler \(1947 - 2006\).") + => #"3 books. The Little Schemer, written by (Daniel Friedman (1944 - ), Matthias Felleisen|Matthias Felleisen, Daniel Friedman (1944 - )). The City and the City, written by China Miéville (1972 - ). Wild Seed, written by Octavia E. Butler (1947 - 2006).") (facts "books-by-author" {:exercise 30 :points 1} @@ -342,7 +342,7 @@ (has-a-living-author? little-schemer) => true (has-a-living-author? cities) => true (has-a-living-author? deus-irae) => false) - + (facts "books-by-living-authors" {:exercise 34 :points 1} (books-by-living-authors books) => (just #{little-schemer cities embassytown})