From 9b78bc4af784caea1f51353b502ad16d92163506 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 30 Oct 2020 23:04:23 -0400 Subject: [PATCH] testsuite: Improve coverage --- testsuite/gtk/main.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/testsuite/gtk/main.c b/testsuite/gtk/main.c index 20a3c63083..d1d3e6ee1b 100644 --- a/testsuite/gtk/main.c +++ b/testsuite/gtk/main.c @@ -9,6 +9,21 @@ test_init (void) g_assert (gtk_is_initialized () == TRUE); } +static void +test_version (void) +{ + g_assert_cmpuint (gtk_get_major_version (), ==, GTK_MAJOR_VERSION); + g_assert_cmpuint (gtk_get_minor_version (), ==, GTK_MINOR_VERSION); + g_assert_cmpuint (gtk_get_micro_version (), ==, GTK_MICRO_VERSION); + g_assert_cmpuint (gtk_get_binary_age (), ==, GTK_BINARY_AGE); + g_assert_cmpuint (gtk_get_interface_age (), ==, GTK_INTERFACE_AGE); + + g_assert_null (gtk_check_version (GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION)); + g_assert_nonnull (gtk_check_version (5, 0, 0)); + g_assert_nonnull (gtk_check_version (1, 0, 0)); + g_assert_nonnull (gtk_check_version (3, 1000, 10)); +} + int main (int argc, char *argv[]) { @@ -18,6 +33,7 @@ main (int argc, char *argv[]) setlocale (LC_ALL, "C"); g_test_add_func ("/main/init", test_init); + g_test_add_func ("/main/version", test_version); return g_test_run (); }