From 8a5a1eea27311d6ed8623cf59d0986712f4a8a1a Mon Sep 17 00:00:00 2001 From: Tuukka Turto Date: Mon, 21 Apr 2014 13:21:11 +0300 Subject: [PATCH] test for doto macro relates #567 --- tests/native_tests/core.hy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/native_tests/core.hy b/tests/native_tests/core.hy index 15debf4..fec1316 100644 --- a/tests/native_tests/core.hy +++ b/tests/native_tests/core.hy @@ -478,3 +478,10 @@ (assert-equal (list res) [4 4 4]) (setv res (zipwith operator.sub [3 7 9] [1 2 4])) (assert-equal (list res) [2 5 5])) + +(defn test-doto [] + "NATIVE: testing doto macro" + (setv collection []) + (doto collection (.append 1) (.append 2) (.append 3)) + (assert-equal collection [1 2 3])) +