From c7e4d4cd6e0b68daa030ff474ac500a7a8bd6c92 Mon Sep 17 00:00:00 2001 From: Ryan Gonzalez Date: Fri, 14 Nov 2014 14:21:16 -0600 Subject: [PATCH] Add tests --- tests/native_tests/with_decorator.hy | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/native_tests/with_decorator.hy b/tests/native_tests/with_decorator.hy index dc6ad6e..867c63a 100644 --- a/tests/native_tests/with_decorator.hy +++ b/tests/native_tests/with_decorator.hy @@ -7,6 +7,15 @@ (* 2 2))) +(defn bardec [cls] + (setv cls.my_attr 123)) + +(with-decorator bardec + (defclass cls [] + [[my_attr 456]])) + + (defn test-decorators [] "NATIVE: test decorators." - (assert (= (tfunction) 2))) + (assert (= (tfunction) 2)) + (assert (= cls.my_attr 123)))