summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-07-17 09:10:38 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-07-18 07:08:01 -0500
commiteb1a2268bb3292cb9c7925394cf8c7807f886e49 (patch)
tree560fa13ec3901e8b9e78609c2d994ee15f405c93 /testsuite
parent64193ae7067e938ed6fdcfbae08bc86ca3cdd48c (diff)
downloadgtk+-eb1a2268bb3292cb9c7925394cf8c7807f886e49.tar.gz
gtk: Improve test coverage
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gtk/border.c27
-rw-r--r--testsuite/gtk/meson.build1
2 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/gtk/border.c b/testsuite/gtk/border.c
new file mode 100644
index 0000000000..2fabefcbfa
--- /dev/null
+++ b/testsuite/gtk/border.c
@@ -0,0 +1,27 @@
+#include <gtk/gtk.h>
+
+static void
+test_border_basic (void)
+{
+ GtkBorder *border;
+ GtkBorder *border2;
+
+ border = gtk_border_new ();
+ *border = (GtkBorder) { 5, 6, 666, 777 };
+ border2 = gtk_border_copy (border);
+
+ g_assert_true (memcmp (border, border2, sizeof (GtkBorder)) == 0);
+
+ gtk_border_free (border);
+ gtk_border_free (border2);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gtk_test_init (&argc, &argv);
+
+ g_test_add_func ("/border/basic", test_border_basic);
+
+ return g_test_run ();
+}
diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
index 05800c22d5..4c5d70a088 100644
--- a/testsuite/gtk/meson.build
+++ b/testsuite/gtk/meson.build
@@ -26,6 +26,7 @@ tests = [
{ 'name': 'action' },
{ 'name': 'adjustment' },
{ 'name': 'bitset' },
+ { 'name': 'border' },
{
'name': 'builder',
'link_args': gtk_tests_export_dynamic_ldflag,