diff --git a/tests/step4_if_fn_do.mal b/tests/step4_if_fn_do.mal index 49613e73..aab02b59 100644 --- a/tests/step4_if_fn_do.mal +++ b/tests/step4_if_fn_do.mal @@ -446,12 +446,6 @@ nil ( (fn* [f x] (f x)) (fn* [a] (+ 1 a)) 7) ;=>8 -;; -;; -------- Soft tests -------- -;; (when most implementations will implement these tests correctly this section -;; will be modified to hard failures) -;>>> soft=True - ;; Nested vector/list equality (= [(list)] (list [])) ;=>true diff --git a/tests/step9_try.mal b/tests/step9_try.mal index d418d7bc..c1b3b761 100644 --- a/tests/step9_try.mal +++ b/tests/step9_try.mal @@ -268,6 +268,28 @@ (dissoc {:cde nil :fgh 456} :cde) ;=>{:fgh 456} +;; Testing equality of hash-maps +(= {} {}) +;=>true +(= {:a 11 :b 22} (hash-map :b 22 :a 11)) +;=>true +(= {:a 11 :b [22 33]} (hash-map :b [22 33] :a 11)) +;=>true +(= {:a 11 :b {:c 33}} (hash-map :b {:c 33} :a 11)) +;=>true +(= {:a 11 :b 22} (hash-map :b 23 :a 11)) +;=>false +(= {:a 11 :b 22} (hash-map :a 11)) +;=>false +(= {:a [11 22]} {:a (list 11 22)}) +;=>true +(= {:a 11 :b 22} (list :a 11 :b 22)) +;=>false +(= {} []) +;=>false +(= [] {}) +;=>false + ;; ;; Additional str and pr-str tests @@ -300,28 +322,3 @@ (apply (fn* (a & more) (list? more)) [1]) ;=>true -;; ------- Optional Functionality -------------- -;; ------- (Not needed for self-hosting) ------- -;>>> soft=True - -;; Testing equality of hash-maps -(= {} {}) -;=>true -(= {:a 11 :b 22} (hash-map :b 22 :a 11)) -;=>true -(= {:a 11 :b [22 33]} (hash-map :b [22 33] :a 11)) -;=>true -(= {:a 11 :b {:c 33}} (hash-map :b {:c 33} :a 11)) -;=>true -(= {:a 11 :b 22} (hash-map :b 23 :a 11)) -;=>false -(= {:a 11 :b 22} (hash-map :a 11)) -;=>false -(= {:a [11 22]} {:a (list 11 22)}) -;=>true -(= {:a 11 :b 22} (list :a 11 :b 22)) -;=>false -(= {} []) -;=>false -(= [] {}) -;=>false