diff options
Diffstat (limited to 'graphics/asymptote/tests/io/csv.asy')
-rw-r--r-- | graphics/asymptote/tests/io/csv.asy | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/graphics/asymptote/tests/io/csv.asy b/graphics/asymptote/tests/io/csv.asy new file mode 100644 index 0000000000..d0ef00b21f --- /dev/null +++ b/graphics/asymptote/tests/io/csv.asy @@ -0,0 +1,18 @@ +import TestLib; + +StartTest("csv"); +{ + real[] a=input("io/input_with_nan.csv").csv(); + assert(a.length == 20); + for (int i=0; i<4; ++i) + assert(a[i] == i); + for (int i=4; i<8; ++i) + assert(isnan(a[i])); + for (int i=8; i<12; ++i) + assert(isnan(a[i])); + for (int i=12; i<16; ++i) + assert(a[i] == inf); + for (int i=16; i<20; ++i) + assert(a[i] == -inf); +} +EndTest(); |