summaryrefslogtreecommitdiff
path: root/protocols/Tox/toxcore/auto_tests/skeleton_test.c
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-08-09 18:03:54 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-08-09 18:03:54 +0000
commitfc6d64207886ac6921d8f13587c158bfaae76839 (patch)
tree3a8e243ae439ed9a7d1f16b16e159e452e058509 /protocols/Tox/toxcore/auto_tests/skeleton_test.c
parentab807bf3e87863ef97412faf83dc2cac697d6a23 (diff)
toxcore sources added
git-svn-id: http://svn.miranda-ng.org/main/trunk@10139 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/toxcore/auto_tests/skeleton_test.c')
-rw-r--r--protocols/Tox/toxcore/auto_tests/skeleton_test.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/protocols/Tox/toxcore/auto_tests/skeleton_test.c b/protocols/Tox/toxcore/auto_tests/skeleton_test.c
new file mode 100644
index 0000000000..89ef1b8bd6
--- /dev/null
+++ b/protocols/Tox/toxcore/auto_tests/skeleton_test.c
@@ -0,0 +1,53 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+#include <stdint.h>
+#include <string.h>
+#include <check.h>
+#include <stdlib.h>
+#include <time.h>
+
+/*
+#include "../<stuff to test>"
+*/
+
+START_TEST(test_creativetestnamegoeshere)
+{
+ uint8_t test = 0;
+ ck_assert_msg(test == 0, "test: expected result 0, got %u.", test);
+}
+END_TEST
+
+
+#define DEFTESTCASE(NAME) \
+ TCase *tc_##NAME = tcase_create(#NAME); \
+ tcase_add_test(tc_##NAME, test_##NAME); \
+ suite_add_tcase(s, tc_##NAME);
+
+Suite *creativesuitenamegoeshere_suite(void)
+{
+ Suite *s = suite_create("creativesuitedescritptiongoeshere");
+
+ DEFTESTCASE(/* remove test_ from test function names */ creativetestnamegoeshere);
+
+ return s;
+}
+
+int main(int argc, char *argv[])
+{
+ srand((unsigned int) time(NULL));
+
+ Suite *creativesuitenamegoeshere = creativesuitenamegoeshere_suite();
+ SRunner *test_runner = srunner_create(creativesuitenamegoeshere);
+
+ int number_failed = 0;
+ srunner_run_all(test_runner, CK_NORMAL);
+ number_failed = srunner_ntests_failed(test_runner);
+
+ srunner_free(test_runner);
+
+ return number_failed;
+}
+