diff options
Diffstat (limited to 'Build/source/utils/asymptote/tests/array/slice.asy')
-rw-r--r-- | Build/source/utils/asymptote/tests/array/slice.asy | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/Build/source/utils/asymptote/tests/array/slice.asy b/Build/source/utils/asymptote/tests/array/slice.asy index 709263504ce..9010f0b5d8e 100644 --- a/Build/source/utils/asymptote/tests/array/slice.asy +++ b/Build/source/utils/asymptote/tests/array/slice.asy @@ -18,14 +18,14 @@ assert(all(x[3:3] == new int[] {} )); assert(all(x[3:4] == new int[] {3} )); assert(all(x[98:99] == new int[] {} )); -assert(x[:].cyclicflag == false); -assert(x[2:].cyclicflag == false); -assert(x[:7].cyclicflag == false); -assert(x[3:3].cyclicflag == false); -assert(x[2:9].cyclicflag == false); +assert(x[:].cyclic == false); +assert(x[2:].cyclic == false); +assert(x[:7].cyclic == false); +assert(x[3:3].cyclic == false); +assert(x[2:9].cyclic == false); // Cyclic cases -x.cyclic(true); +x.cyclic=true; assert(all(x[:] == new int[] {0,1,2,3,4,5,6,7,8,9} )); assert(all(x[0:4] == new int[] {0,1,2,3} )); @@ -46,12 +46,12 @@ assert(all(x[-15:15] == new int[] {5,6,7,8,9,0,1,2,3,4,5,6,7,8,9, assert(all(x[6728:6729] == new int[] {8} )); assert(all(x[-6729:-6728] == new int[] {1} )); -assert(x[:].cyclicflag == false); -assert(x[2:].cyclicflag == false); -assert(x[:7].cyclicflag == false); -assert(x[3:3].cyclicflag == false); -assert(x[2:9].cyclicflag == false); -assert(x[5:100].cyclicflag == false); +assert(x[:].cyclic == false); +assert(x[2:].cyclic == false); +assert(x[:7].cyclic == false); +assert(x[3:3].cyclic == false); +assert(x[2:9].cyclic == false); +assert(x[5:100].cyclic == false); pair[] z={(1,2), (3,4), (5,6)}; assert(all(z[1:1] == new pair[] {})); @@ -72,12 +72,12 @@ assert(all(z[1:2] == new pair[] {(3,4)})); { int[] y={0,1,2,3,4,5,6,7,8,9}; int[] z={56,67,78}; - z.cyclic(true); + z.cyclic=true; y[:] = z; assert(all(y == z)); assert(!alias(y,z)); - assert(y.cyclicflag == false); + assert(y.cyclic == false); } { int[] y={0,1,2,3,4,5,6,7,8,9}; @@ -99,91 +99,91 @@ assert(all(z[1:2] == new pair[] {(3,4)})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; int[] z={56,67,78}; y[:] = z; assert(all(y == z)); assert(!alias(y,z)); - assert(y.cyclicflag == true); + assert(y.cyclic == true); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; int[] z={56,67,78}; - z.cyclic(true); + z.cyclic=true; y[:] = z; assert(all(y == z)); assert(!alias(y,z)); - assert(y.cyclicflag == true); + assert(y.cyclic == true); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[2:3] = y[5:6] = new int[] {77}; assert(all(y == new int[] {0,1,77,3,4,77,6,7,8,9})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[:3] = y[7:] = new int[] {}; assert(all(y == new int[] {3,4,5,6})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[8:] = new int[] {18,19,20,21,22}; assert(all(y == new int[] {0,1,2,3,4,5,6,7,18,19,20,21,22})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[-2:0] = new int[] {18,19,20,21,22}; assert(all(y == new int[] {0,1,2,3,4,5,6,7,18,19,20,21,22})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[18:20] = new int[] {18,19,20,21,22}; assert(all(y == new int[] {0,1,2,3,4,5,6,7,18,19,20,21,22})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[3:5] = new int[] {13,14,15,16,17}; assert(all(y == new int[] {0,1,2,13,14,15,16,17,5,6,7,8,9})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[13:15] = new int[] {13,14,15,16,17}; assert(all(y == new int[] {0,1,2,13,14,15,16,17,5,6,7,8,9})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[3-10:5-10] = new int[] {13,14,15,16,17}; assert(all(y == new int[] {0,1,2,13,14,15,16,17,5,6,7,8,9})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[8:12] = new int[] {18,19,20,21}; assert(all(y == new int[] {20,21,2,3,4,5,6,7,18,19})); } { int[] y={0,1,2,3,4,5,6,7,8,9}; - y.cyclic(true); + y.cyclic=true; y[-2:2] = new int[] {18,19,20,21}; assert(all(y == new int[] {20,21,2,3,4,5,6,7,18,19})); |