hy/tests/native_tests/language.hy
2013-03-08 18:18:43 -05:00

15 lines
246 B
Hy

;
(defn test_lists []
"NATIVE: test lists work right"
(assert (= [1 2 3 4] (+ [1 2] [3 4]))))
(defn test_for_loop []
"NATIVE: test for loops?"
(def count 0)
(for [x [1 2 3 4 5]]
(def count (+ count x)))
(assert (= count 15)))