[gtk+/parser: 36/57] tests: Add CSS integer parsing tests



commit a844f59e63ea416019cdce43683ad1557cc9b956
Author: Benjamin Otte <otte redhat com>
Date:   Sat Apr 9 13:49:41 2011 +0200

    tests: Add CSS integer parsing tests

 tests/css/parser/Makefile.am     |    3 ++
 tests/css/parser/integer.css     |   42 ++++++++++++++++++++++++++++++++++++++
 tests/css/parser/integer.errors  |    8 +++++++
 tests/css/parser/integer.ref.css |   23 ++++++++++++++++++++
 4 files changed, 76 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am
index e0668fd..934d95a 100644
--- a/tests/css/parser/Makefile.am
+++ b/tests/css/parser/Makefile.am
@@ -34,6 +34,9 @@ EXTRA_DIST += \
 	does-not-exist.css \
 	does-not-exist.errors \
 	does-not-exist.ref.css \
+	integer.css \
+	integer.errors \
+	integer.ref.css \
 	no-semicolon.css \
 	no-semicolon.ref.css \
 	simple.css
diff --git a/tests/css/parser/integer.css b/tests/css/parser/integer.css
new file mode 100644
index 0000000..79f2984
--- /dev/null
+++ b/tests/css/parser/integer.css
@@ -0,0 +1,42 @@
+a {
+  int-property: 0;
+}
+b {
+  int-property: 1;
+}
+c {
+  int-property: -1;
+}
+d {
+  int-property: 2147483647;
+}
+e {
+  int-property: -2147483648;
+}
+f {
+  int-property: 1.0;
+}
+g {
+  int-property: 3px;
+}
+h {
+  int-property: 0xFF;
+}
+i {
+  int-property: 0377;
+}
+j {
+  int-property: nonumber;
+}
+k {
+  int-property: "42";
+}
+l {
+  int-property: +3;
+}
+m {
+  int-property: --5;
+}
+n {
+  int-property: - 10;
+}
diff --git a/tests/css/parser/integer.errors b/tests/css/parser/integer.errors
new file mode 100644
index 0000000..4cb80b3
--- /dev/null
+++ b/tests/css/parser/integer.errors
@@ -0,0 +1,8 @@
+integer.css:17: error: GTK_CSS_PROVIDER_ERROR_PROPERTY_VALUE
+integer.css:20: error: GTK_CSS_PROVIDER_ERROR_PROPERTY_VALUE
+integer.css:23: error: GTK_CSS_PROVIDER_ERROR_PROPERTY_VALUE
+integer.css:29: error: GTK_CSS_PROVIDER_ERROR_PROPERTY_VALUE
+integer.css:32: error: GTK_CSS_PROVIDER_ERROR_PROPERTY_VALUE
+integer.css:35: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+integer.css:38: error: GTK_CSS_PROVIDER_ERROR_PROPERTY_VALUE
+integer.css:41: error: GTK_CSS_PROVIDER_ERROR_PROPERTY_VALUE
diff --git a/tests/css/parser/integer.ref.css b/tests/css/parser/integer.ref.css
new file mode 100644
index 0000000..a2018e1
--- /dev/null
+++ b/tests/css/parser/integer.ref.css
@@ -0,0 +1,23 @@
+a {
+  int-property: 0;
+}
+
+b {
+  int-property: 1;
+}
+
+c {
+  int-property: -1;
+}
+
+d {
+  int-property: 2147483647;
+}
+
+e {
+  int-property: -2147483648;
+}
+
+i {
+  int-property: 377;
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]