aboutsummaryrefslogtreecommitdiff
path: root/tests/test_wildcard.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-06-08 21:51:30 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-06-11 15:04:40 +0200
commite0004a603ba639528dd9df5b73536dcb459498fc (patch)
tree5804766588869e0ea217e2d29c1a3d971a72a650 /tests/test_wildcard.c
parentd7a578b2c6a8f902bb5890adf49a2668c60ea0e7 (diff)
downloadcmocka-e0004a603ba639528dd9df5b73536dcb459498fc.tar.gz
cmocka-e0004a603ba639528dd9df5b73536dcb459498fc.tar.xz
cmocka-e0004a603ba639528dd9df5b73536dcb459498fc.zip
tests: Add a test to check if wildcards are working
Diffstat (limited to 'tests/test_wildcard.c')
-rw-r--r--tests/test_wildcard.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/test_wildcard.c b/tests/test_wildcard.c
new file mode 100644
index 0000000..10ee195
--- /dev/null
+++ b/tests/test_wildcard.c
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2018 Andreas Schneider <asn@cryptomilk.org>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+static void test_ok1(void **state)
+{
+ (void)state;
+
+ assert_true(1);
+}
+
+static void test_ok2(void **state)
+{
+ (void)state;
+
+ assert_true(1);
+}
+
+static void test_fail(void **state)
+{
+ (void)state;
+
+ assert_false(1);
+}
+
+int main(void) {
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(test_ok1),
+ cmocka_unit_test(test_ok2),
+ cmocka_unit_test(test_fail),
+ };
+
+ cmocka_set_test_filter("test_ok*");
+
+ return cmocka_run_group_tests(tests, NULL, NULL);
+}