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)))