tests: Add case for filters' padding_set
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 25 Mar 2014 08:47:20 +0000 (17:47 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 26 Mar 2014 01:48:12 +0000 (10:48 +0900)
Test that the padding is correct and the instruction is valid.

src/tests/evas/evas_test_filters.c

index 8500840..19d9271 100644 (file)
@@ -118,6 +118,8 @@ START_TEST(evas_filter_parser)
    CHKBAAD("blend(invalid=hello);");
    CHKBAAD("buffer:a(alpha);buffer:a(rgba);blend();");
    CHKBAAD("buffer:a(alpha,src=partname);");
+   CHKGOOD("padding_set(0);blend();");
+   CHKGOOD("padding_set(l=1,r=2,t=3,b=4);blend();");
 
    // Case sensitivity
    CHKGOOD("BLEND();");
@@ -302,7 +304,10 @@ static struct Filter_Test_Case _test_cases[] = {
    { 0, 0, 0, 0, "buffer:m(src=rect);mask(m,fillmode=repeat_x_stretch_y);", "rect" },
    { 0, 0, 0, 0, "buffer:m(src=rect);mask(m,fillmode=repeat);", "rect" },
    { 0, 0, 0, 0, "buffer:m(src=rect);mask(m,fillmode=stretch);", "rect" },
-   { 0, 0, 0, 0, "buffer:m(src=rect);buffer:b(rgba);blend(m,dst=b,fillmode=repeat_x_stretch_y);blend();", "rect" }
+   { 0, 0, 0, 0, "buffer:m(src=rect);buffer:b(rgba);blend(m,dst=b,fillmode=repeat_x_stretch_y);blend();", "rect" },
+
+   // Padding_set
+   { 11, 22, 33, 44, "padding_set(11,22,33,44);blend();"}
 };
 
 static const int _test_cases_count = sizeof(_test_cases) / sizeof(_test_cases[0]);