[gtk/prop-list: 9/96] Add some tests for new GtkBuilder syntax



commit e32ae895e390d8758ee8eccb1f74b19afe839ec6
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Dec 18 17:34:38 2019 -0500

    Add some tests for new GtkBuilder syntax
    
    Some valid and invalid examples for <closure>,
    <lookup> and <constant>.

 testsuite/gtk/ui/binding1.expectd  |  1 +
 testsuite/gtk/ui/binding1.expected |  1 +
 testsuite/gtk/ui/binding1.ui       |  7 +++++++
 testsuite/gtk/ui/binding2.expected |  2 ++
 testsuite/gtk/ui/binding2.ui       |  7 +++++++
 testsuite/gtk/ui/binding3.expected |  2 ++
 testsuite/gtk/ui/binding3.ui       |  7 +++++++
 testsuite/gtk/ui/binding4.expected |  2 ++
 testsuite/gtk/ui/binding4.ui       |  7 +++++++
 testsuite/gtk/ui/binding5.expected |  1 +
 testsuite/gtk/ui/binding5.ui       |  8 ++++++++
 testsuite/gtk/ui/binding6.expected |  1 +
 testsuite/gtk/ui/binding6.ui       |  8 ++++++++
 testsuite/gtk/ui/binding7.expected |  1 +
 testsuite/gtk/ui/binding7.ui       | 10 ++++++++++
 testsuite/gtk/ui/binding8.expected |  1 +
 testsuite/gtk/ui/binding8.ui       | 11 +++++++++++
 17 files changed, 77 insertions(+)
---
diff --git a/testsuite/gtk/ui/binding1.expectd b/testsuite/gtk/ui/binding1.expectd
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/binding1.expectd
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/binding1.expected b/testsuite/gtk/ui/binding1.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/binding1.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/binding1.ui b/testsuite/gtk/ui/binding1.ui
new file mode 100644
index 0000000000..f1af768470
--- /dev/null
+++ b/testsuite/gtk/ui/binding1.ui
@@ -0,0 +1,7 @@
+<interface>
+  <object class="GtkDropDown">
+    <property name="expression">
+      <constant type="gchararray">bla</constant>
+    </property>
+  </object>
+</interface>
diff --git a/testsuite/gtk/ui/binding2.expected b/testsuite/gtk/ui/binding2.expected
new file mode 100644
index 0000000000..5baf56a6b4
--- /dev/null
+++ b/testsuite/gtk/ui/binding2.expected
@@ -0,0 +1,2 @@
+ERROR: gtk-builder-error-quark 6
+Could not parse integer 'bla'
diff --git a/testsuite/gtk/ui/binding2.ui b/testsuite/gtk/ui/binding2.ui
new file mode 100644
index 0000000000..2fe929d52f
--- /dev/null
+++ b/testsuite/gtk/ui/binding2.ui
@@ -0,0 +1,7 @@
+<interface>
+  <object class="GtkDropDown">
+    <property name="expression">
+      <constant type="gint">bla</constant>
+    </property>
+  </object>
+</interface>
diff --git a/testsuite/gtk/ui/binding3.expected b/testsuite/gtk/ui/binding3.expected
new file mode 100644
index 0000000000..9c26143c4d
--- /dev/null
+++ b/testsuite/gtk/ui/binding3.expected
@@ -0,0 +1,2 @@
+ERROR: gtk-builder-error-quark 13
+.:0:0 Object with ID bla not found
diff --git a/testsuite/gtk/ui/binding3.ui b/testsuite/gtk/ui/binding3.ui
new file mode 100644
index 0000000000..1e3180deeb
--- /dev/null
+++ b/testsuite/gtk/ui/binding3.ui
@@ -0,0 +1,7 @@
+<interface>
+  <object class="GtkDropDown">
+    <property name="expression">
+      <constant>bla</constant>
+    </property>
+  </object>
+</interface>
diff --git a/testsuite/gtk/ui/binding4.expected b/testsuite/gtk/ui/binding4.expected
new file mode 100644
index 0000000000..3f6cb63169
--- /dev/null
+++ b/testsuite/gtk/ui/binding4.expected
@@ -0,0 +1,2 @@
+ERROR: gtk-builder-error-quark 6
+.:4:36 Invalid type 'nosuchtype'
diff --git a/testsuite/gtk/ui/binding4.ui b/testsuite/gtk/ui/binding4.ui
new file mode 100644
index 0000000000..ba810eae28
--- /dev/null
+++ b/testsuite/gtk/ui/binding4.ui
@@ -0,0 +1,7 @@
+<interface>
+  <object class="GtkDropDown">
+    <property name="expression">
+      <constant type="nosuchtype">bla</constant>
+    </property>
+  </object>
+</interface>
diff --git a/testsuite/gtk/ui/binding5.expected b/testsuite/gtk/ui/binding5.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/binding5.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/binding5.ui b/testsuite/gtk/ui/binding5.ui
new file mode 100644
index 0000000000..1020b4ef36
--- /dev/null
+++ b/testsuite/gtk/ui/binding5.ui
@@ -0,0 +1,8 @@
+<interface>
+  <object class="GtkLabel" id="bla"/>
+  <object class="GtkDropDown">
+    <property name="expression">
+      <lookup name="label">bla</lookup>
+    </property>
+  </object>
+</interface>
diff --git a/testsuite/gtk/ui/binding6.expected b/testsuite/gtk/ui/binding6.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/binding6.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/binding6.ui b/testsuite/gtk/ui/binding6.ui
new file mode 100644
index 0000000000..e2fc43c461
--- /dev/null
+++ b/testsuite/gtk/ui/binding6.ui
@@ -0,0 +1,8 @@
+<interface>
+  <object class="GtkLabel" id="bla"/>
+  <object class="GtkDropDown">
+    <property name="expression">
+      <lookup name="label" type="GtkLabel">bla</lookup>
+    </property>
+  </object>
+</interface>
diff --git a/testsuite/gtk/ui/binding7.expected b/testsuite/gtk/ui/binding7.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/binding7.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/binding7.ui b/testsuite/gtk/ui/binding7.ui
new file mode 100644
index 0000000000..93516b93e2
--- /dev/null
+++ b/testsuite/gtk/ui/binding7.ui
@@ -0,0 +1,10 @@
+<interface>
+  <object class="GtkLabel" id="bla"/>
+  <object class="GtkDropDown">
+    <property name="expression">
+      <lookup name="label">
+        <constant type="GtkLabel">bla</constant>
+      </lookup>
+    </property>
+  </object>
+</interface>
diff --git a/testsuite/gtk/ui/binding8.expected b/testsuite/gtk/ui/binding8.expected
new file mode 100644
index 0000000000..ff43ca4091
--- /dev/null
+++ b/testsuite/gtk/ui/binding8.expected
@@ -0,0 +1 @@
+SUCCESS
diff --git a/testsuite/gtk/ui/binding8.ui b/testsuite/gtk/ui/binding8.ui
new file mode 100644
index 0000000000..46f85a4957
--- /dev/null
+++ b/testsuite/gtk/ui/binding8.ui
@@ -0,0 +1,11 @@
+<interface>
+  <object class="GtkLabel" id="bla"/>
+  <object class="GtkDropDown">
+    <property name="expression">
+      <closure type='gchararray' function="strcmp">
+        <constant type="gchararray">File size:</constant>
+        <lookup type="GtkLabel" name="max-width-chars">bla</lookup>
+      </closure>
+    </property>
+  </object>
+</interface>


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