summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/tests
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-20 22:56:10 +0000
committerKarl Berry <karl@freefriends.org>2014-04-20 22:56:10 +0000
commitce5dd4137c8f88f9449e78ea4e02081bb589432e (patch)
tree1482a78c9484fb143211d3c1bb56d6c95f8393a1 /Build/source/utils/asymptote/tests
parentd7e9f3fbc05b16e08afeb5b2569cb39a9b03e661 (diff)
asy 2.25 sources
git-svn-id: svn://tug.org/texlive/trunk@33565 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/tests')
-rw-r--r--Build/source/utils/asymptote/tests/types/guide.asy16
1 files changed, 16 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/tests/types/guide.asy b/Build/source/utils/asymptote/tests/types/guide.asy
index 77400fcfbbf..ec16e0ed7ce 100644
--- a/Build/source/utils/asymptote/tests/types/guide.asy
+++ b/Build/source/utils/asymptote/tests/types/guide.asy
@@ -140,5 +140,21 @@ pair[] z=controlSpecifier(g,0);
assert(close(z[0],(4,6)));
assert(close(z[1],(3,5)));
+// Test building guides in loops.
+int N = 100;
+guide g;
+for (int i = 0; i < N; ++i)
+ g = g--(i,i^2);
+path p=g;
+for (int i = 0; i < N; ++i)
+ assert(point(p, i) == (i,i^2));
+
+int N = 100;
+guide g;
+for (int i = 0; i < N; ++i)
+ g = (i,i^2)--g;
+path p=g;
+for (int i = N-1, j = 0; i >= 0; --i, ++j)
+ assert(point(p, j) == (i,i^2));
EndTest();