add isl_mat_initial_non_zero_cols
[platform/upstream/isl.git] / isl_test.c
index 46177d6..01839c3 100644 (file)
@@ -73,6 +73,11 @@ void test_parse(struct isl_ctx *ctx)
        str2 = "{ [x, y] : 2y >= 6 - x }";
        test_parse_map_equal(ctx, str, str2);
 
+       test_parse_map_equal(ctx, "{ [x,y] : x <= min(y, 2*y+3) }",
+                                 "{ [x,y] : x <= y, 2*y + 3 }");
+       str = "{ [x, y] : (y <= x and y >= -3) or (2y <= -3 + x and y <= -4) }";
+       test_parse_map_equal(ctx, "{ [x,y] : x >= min(y, 2*y+3) }", str);
+
        str = "{[new,old] -> [new+1-2*[(new+1)/2],old+1-2*[(old+1)/2]]}";
        map = isl_map_read_from_str(ctx, str, -1);
        str = "{ [new, old] -> [o0, o1] : "
@@ -92,7 +97,12 @@ void test_parse(struct isl_ctx *ctx)
        isl_map_free(map);
        isl_map_free(map2);
 
+       str = "[n] -> { [c1] : c1>=0 and c1<=floord(n-4,3) }";
+       str2 = "[n] -> { [c1] : c1 >= 0 and 3c1 <= -4 + n }";
+       test_parse_map_equal(ctx, str, str2);
+
        test_parse_pwqp(ctx, "{ [i] -> i + [ (i + [i/3])/2 ] }");
+       test_parse_map(ctx, "{ S1[i] -> [([i/10]),i%10] : 0 <= i <= 45 }");
 }
 
 void test_read(struct isl_ctx *ctx)