This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit 90824fc2fd50461df31c645abcc77cb777c3185e
Author: Kim Woelders <[email protected]>
AuthorDate: Sun Feb 6 11:45:22 2022 +0100

    test: Add test_misc
---
 test/Makefile.am   |  6 +++++-
 test/test_misc.cpp | 22 ++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/test/Makefile.am b/test/Makefile.am
index 8549d59..bd6e69c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -8,7 +8,8 @@ CLEANFILES = file.c img_save-*.*
 
  GTEST_LIBS = -lgtest -lstdc++
 
- GTESTS  = test_string
+ GTESTS  = test_misc
+ GTESTS += test_string
  GTESTS += test_file
  GTESTS += test_context
  GTESTS += test_load
@@ -39,6 +40,9 @@ endif
 
  TEST_COMMON = test.cpp test.h
 
+test_misc_SOURCES = $(TEST_COMMON) test_misc.cpp
+test_misc_LDADD = $(LIBS)
+
 test_string_SOURCES = $(TEST_COMMON) test_string.cpp
 nodist_test_string_SOURCES = strutils.c
 test_string_LDADD = $(LIBS)
diff --git a/test/test_misc.cpp b/test/test_misc.cpp
new file mode 100644
index 0000000..a721847
--- /dev/null
+++ b/test/test_misc.cpp
@@ -0,0 +1,22 @@
+#include <gtest/gtest.h>
+
+#include "config.h"
+#include <Imlib2.h>
+
+#include "test.h"
+
+TEST(MISC, version)
+{
+   EXPECT_EQ(imlib_version(), IMLIB2_VERSION);
+}
+
+TEST(MISC, strerror)
+{
+   if (debug <= 0)
+      return;
+
+   for (int i = -10; i < 140; i++)
+     {
+        printf("%3d: '%s'\n", i, imlib_strerror(i));
+     }
+}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to