summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/tests
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-07-05 22:26:04 +0000
committerKarl Berry <karl@freefriends.org>2010-07-05 22:26:04 +0000
commit648027bec248a7b000741a507b507f6d89941ce5 (patch)
treece3b82b43a8b17403eda43db782bbf2e5bf0e161 /Build/source/utils/asymptote/tests
parent5ff8f96c8ab3bd3aeb8fed8d512c57134fb2a6cc (diff)
asy 2.00
git-svn-id: svn://tug.org/texlive/trunk@19250 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/tests')
-rw-r--r--Build/source/utils/asymptote/tests/array/fields.asy22
1 files changed, 22 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/tests/array/fields.asy b/Build/source/utils/asymptote/tests/array/fields.asy
index 8435551aceb..7845ef2de64 100644
--- a/Build/source/utils/asymptote/tests/array/fields.asy
+++ b/Build/source/utils/asymptote/tests/array/fields.asy
@@ -76,4 +76,26 @@ StartTest("fields");
// TODO: Test inserting/deleting lengths more seriously.
}
+{
+ // Test extended for.
+ int[] a = {1,4,6,2,7,4,8,9,1,3,-1};
+ int i = 0;
+ for (int x : a) {
+ assert(x == a[i]);
+ ++i;
+ }
+ assert(i == a.length);
+}
+
+{
+ // Test extended for.
+ int[] a = {1,4,6,2,7,4,8,9,1,3,-1};
+ int i = 0;
+ for (var x : a) {
+ assert(x == a[i]);
+ ++i;
+ }
+ assert(i == a.length);
+}
+
EndTest();