kylemanna
10/5/2015 - 5:23 AM

-

diff --git a/include/cmocka_init.h b/include/cmocka_init.h
index 55656e4..336d9c8 100644
--- a/include/cmocka_init.h
+++ b/include/cmocka_init.h
@@ -19,10 +19,10 @@
 /*
  * Usage: TEST(name) { ... }
  */
-#define TEST(n) static void n(void** state); \
-        static cmocka_init_t test_##n = cmocka_unit_test(n); \
+#define TEST(n) void n(void** state); \
+        const cmocka_init_t test_##n = cmocka_unit_test(n); \
         LINKERSET_ADD_ITEM(cmocka_init, test_##n); \
-        static void n(void** state)
+        void n(void** state)
 
 typedef struct CMUnitTest cmocka_init_t;
 
diff --git a/test_main.c b/test_main.c
index 11b7513..27b397c 100644
--- a/test_main.c
+++ b/test_main.c
@@ -1,4 +1,5 @@
 #include <cmocka_init.h>
+#include <stdio.h>
 
 int main(void)
 {
@@ -9,5 +10,11 @@ int main(void)
     if (!len)
         return EXIT_FAILURE;
 
+    for (size_t i = 0; i < len; i++) {
+        struct CMUnitTest *test = tests[i];
+        printf("%p => %s\n", test, test->name);
+    }
+    return 0;
+
     return _cmocka_run_group_tests("a", *tests, len, NULL, NULL);
 }
diff --git a/test_more.c b/test_more.c
index cf9e84c..f4b829f 100644
--- a/test_more.c
+++ b/test_more.c
@@ -8,3 +8,8 @@ TEST(Simple_Life)
 
     assert_true(42 == answer_to_question_of_life);
 }
+
+TEST(Simple_SomeMore)
+{
+    assert_true(1);
+}