Merge branch 'maint'
[platform/upstream/isl.git] / isl_test.c
index a0173b3..59a81fe 100644 (file)
@@ -69,6 +69,15 @@ void test_parse_pwqp(isl_ctx *ctx, const char *str)
        isl_pw_qpolynomial_free(pwqp);
 }
 
+static void test_parse_pwaff(isl_ctx *ctx, const char *str)
+{
+       isl_pw_aff *pwaff;
+
+       pwaff = isl_pw_aff_read_from_str(ctx, str);
+       assert(pwaff);
+       isl_pw_aff_free(pwaff);
+}
+
 void test_parse(struct isl_ctx *ctx)
 {
        isl_map *map, *map2;
@@ -144,8 +153,13 @@ void test_parse(struct isl_ctx *ctx)
        str2 = "{ [x] : x-0 >= 0 }";
        test_parse_map_equal(ctx, str, str2);
 
+       str = "{ [i] : ((i > 10)) }";
+       str2 = "{ [i] : i >= 11 }";
+       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 }");
+       test_parse_pwaff(ctx, "{ [i] -> [i + 1] : i > 0; [a] -> [a] : a < 0 }");
 }
 
 void test_read(struct isl_ctx *ctx)