summaryrefslogtreecommitdiffstats
path: root/tests/dimension/directives.pov
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-04-22 18:24:59 -0400
committerTavian Barnes <tavianator@gmail.com>2011-04-22 18:25:09 -0400
commit13e11b2fafe60cad7d04d80c602adc12d6080036 (patch)
treea36a93bc780b9b9e0eec30a486d8a4a9a6ddbd24 /tests/dimension/directives.pov
parent4e3c3918450d004bc00de4ad58eb7b707156f9aa (diff)
downloaddimension-13e11b2fafe60cad7d04d80c602adc12d6080036.tar.xz
Handle symbol aliases in dmnsn_find_symbol() directly.
Fixes infinite loops when macro arguments have the same name as existing symbols.
Diffstat (limited to 'tests/dimension/directives.pov')
-rw-r--r--tests/dimension/directives.pov12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/dimension/directives.pov b/tests/dimension/directives.pov
index 089622c..5c3cfa3 100644
--- a/tests/dimension/directives.pov
+++ b/tests/dimension/directives.pov
@@ -64,6 +64,18 @@
Inc(Counter)
#end
+// Test macro parameters with the same name as existing variables
+#declare Test1 = 0;
+#declare Test2 = 1;
+#declare Test3 = 2;
+#macro ScopeTest(Test1, Test2, Test3)
+ #declare Test1 = Test2 - Test3;
+#end
+ScopeTest(Test1, Test3, Test2)
+sphere {
+ 0, Test1
+}
+
#declare Box =
box {
<-1, -1, -1>, <1, 1, 1>