hy/tests/native_tests/language.hy

15 lines
254 B
Hy
Raw Normal View History

2013-03-06 04:08:53 +01:00
;
2013-03-07 00:57:21 +01:00
2013-03-06 04:08:53 +01:00
(def test_lists (fn []
2013-03-06 04:15:45 +01:00
"NATIVE: test lists work right"
2013-03-06 04:08:53 +01:00
(assert (= [1 2 3 4] (+ [1 2] [3 4])))))
2013-03-08 04:52:47 +01:00
(def test_for_loop (fn []
"NATIVE: test for loops?"
(def count 0)
(for [x [1 2 3 4 5]]
(def count (+ count x)))
(assert (= count 15))))