]> Pileus Git - ~andy/gtk/commitdiff
tests: Add a test for border-radius handling
authorBenjamin Otte <otte@redhat.com>
Sat, 28 May 2011 02:30:45 +0000 (04:30 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 2 Jun 2011 00:03:52 +0000 (02:03 +0200)
tests/css/parser/Makefile.am
tests/css/parser/border-radius.css [new file with mode: 0644]
tests/css/parser/border-radius.errors [new file with mode: 0644]
tests/css/parser/border-radius.ref.css [new file with mode: 0644]

index 3a07b226225a643a09b4afd7847750d24045c4a4..6131b016a3b6f64e61b1e1b785fe6e31d60f478e 100644 (file)
@@ -31,6 +31,9 @@ EXTRA_DIST += \
        border.css \
        border.errors \
        border.ref.css \
+       border-radius.css \
+       border-radius.errors \
+       border-radius.ref.css \
        close-at-end-of-file.css \
        close-at-end-of-file.errors \
        close-at-end-of-file.ref.css \
diff --git a/tests/css/parser/border-radius.css b/tests/css/parser/border-radius.css
new file mode 100644 (file)
index 0000000..72e26b3
--- /dev/null
@@ -0,0 +1,117 @@
+a {
+  border-radius: 1;
+}
+
+b {
+  border-radius: 1 2;
+}
+
+c {
+  border-radius: 1 2 3;
+}
+
+d {
+  border-radius: 1 2 3 4;
+}
+
+e {
+  border-radius: 1 2 3 4 / 5;
+}
+
+f {
+  border-radius: 1 2 3 4 / 5 6;
+}
+
+g {
+  border-radius: 1 2 3 4 / 5 6 7;
+}
+
+h {
+  border-radius: 1 2 3 4 / 5 6 7 8;
+}
+
+i {
+  border-radius: none;
+}
+
+j {
+  border-radius: 1.125 / 5.5;
+}
+
+k {
+  border-radius: 1 2.25 / 5;
+}
+
+l {
+  border-radius: 1 2 3.5 / 5.5 6.75;
+}
+
+m {
+  border-radius: 0 / 0;
+}
+
+n {
+  border-radius: 0;
+}
+
+o {
+  border-radius: 0 / 1;
+}
+
+p {
+  border-radius: 1 / 0;
+}
+
+/* errors go here */
+
+ea {
+  border-radius: -1 1 1 1 / 1 1 1 1;
+}
+
+eb {
+  border-radius: 1 -1 1 1 / 1 1 1 1;
+}
+
+ec {
+  border-radius: 1 1 -1 1 / 1 1 1 1;
+}
+
+ed {
+  border-radius: 1 1 1 -1 / 1 1 1 1;
+}
+
+ee {
+  border-radius: 1 1 1 1 / -1 1 1 1;
+}
+
+ef {
+  border-radius: 1 1 1 1 / 1 -1 1 1;
+}
+
+eg {
+  border-radius: 1 1 1 1 / 1 1 -1 1;
+}
+
+eh {
+  border-radius: 1 1 1 1 / 1 1 1 -1;
+}
+
+ei {
+  border-radius: /;
+}
+
+ej {
+  border-radius: ;
+}
+
+ek {
+  border-radius: 1 /;
+}
+
+el {
+  border-radius: 1 2 3 4 5;
+}
+
+em {
+  border-radius: 1 2 / 1 2 3 4 5;
+}
diff --git a/tests/css/parser/border-radius.errors b/tests/css/parser/border-radius.errors
new file mode 100644 (file)
index 0000000..e6e1134
--- /dev/null
@@ -0,0 +1,13 @@
+border-radius.css:68: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:72: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:76: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:80: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:84: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:88: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:92: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:96: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:100: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:104: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:108: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:112: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+border-radius.css:116: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/tests/css/parser/border-radius.ref.css b/tests/css/parser/border-radius.ref.css
new file mode 100644 (file)
index 0000000..a4567e3
--- /dev/null
@@ -0,0 +1,111 @@
+a {
+  border-bottom-left-radius: 1;
+  border-bottom-right-radius: 1;
+  border-top-left-radius: 1;
+  border-top-right-radius: 1;
+}
+
+b {
+  border-bottom-left-radius: 2;
+  border-bottom-right-radius: 1;
+  border-top-left-radius: 1;
+  border-top-right-radius: 2;
+}
+
+c {
+  border-bottom-left-radius: 2;
+  border-bottom-right-radius: 3;
+  border-top-left-radius: 1;
+  border-top-right-radius: 2;
+}
+
+d {
+  border-bottom-left-radius: 4;
+  border-bottom-right-radius: 3;
+  border-top-left-radius: 1;
+  border-top-right-radius: 2;
+}
+
+e {
+  border-bottom-left-radius: 4 5;
+  border-bottom-right-radius: 3 5;
+  border-top-left-radius: 1 5;
+  border-top-right-radius: 2 5;
+}
+
+f {
+  border-bottom-left-radius: 4 6;
+  border-bottom-right-radius: 3 5;
+  border-top-left-radius: 1 5;
+  border-top-right-radius: 2 6;
+}
+
+g {
+  border-bottom-left-radius: 4 6;
+  border-bottom-right-radius: 3 7;
+  border-top-left-radius: 1 5;
+  border-top-right-radius: 2 6;
+}
+
+h {
+  border-bottom-left-radius: 4 8;
+  border-bottom-right-radius: 3 7;
+  border-top-left-radius: 1 5;
+  border-top-right-radius: 2 6;
+}
+
+i {
+  border-bottom-left-radius: none;
+  border-bottom-right-radius: none;
+  border-top-left-radius: none;
+  border-top-right-radius: none;
+}
+
+j {
+  border-bottom-left-radius: 1.125 5.5;
+  border-bottom-right-radius: 1.125 5.5;
+  border-top-left-radius: 1.125 5.5;
+  border-top-right-radius: 1.125 5.5;
+}
+
+k {
+  border-bottom-left-radius: 2.25 5;
+  border-bottom-right-radius: 1 5;
+  border-top-left-radius: 1 5;
+  border-top-right-radius: 2.25 5;
+}
+
+l {
+  border-bottom-left-radius: 2 6.75;
+  border-bottom-right-radius: 3.5 5.5;
+  border-top-left-radius: 1 5.5;
+  border-top-right-radius: 2 6.75;
+}
+
+m {
+  border-bottom-left-radius: 0;
+  border-bottom-right-radius: 0;
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+
+n {
+  border-bottom-left-radius: 0;
+  border-bottom-right-radius: 0;
+  border-top-left-radius: 0;
+  border-top-right-radius: 0;
+}
+
+o {
+  border-bottom-left-radius: 0 1;
+  border-bottom-right-radius: 0 1;
+  border-top-left-radius: 0 1;
+  border-top-right-radius: 0 1;
+}
+
+p {
+  border-bottom-left-radius: 1 0;
+  border-bottom-right-radius: 1 0;
+  border-top-left-radius: 1 0;
+  border-top-right-radius: 1 0;
+}