From ce5dd4137c8f88f9449e78ea4e02081bb589432e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 20 Apr 2014 22:56:10 +0000 Subject: asy 2.25 sources git-svn-id: svn://tug.org/texlive/trunk@33565 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/utils/asymptote/tests/types/guide.asy | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Build/source/utils/asymptote/tests') 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(); -- cgit v1.2.3