aboutsummaryrefslogtreecommitdiffstats
path: root/t/unit-tests/clar/example/main.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-09-29 11:40:33 -0700
committerJunio C Hamano <gitster@pobox.com>2025-09-29 11:40:33 -0700
commit347af012dba8794d003e4ae061131e3b7acdd558 (patch)
treef8f0df3271d2bca9c0d98af150e114e75cca35a1 /t/unit-tests/clar/example/main.c
parentbb69721404348ea2db0a081c41ab6ebfe75bdec8 (diff)
parent93dbb6b3c572fc8877b56233730b5d12b327a7a4 (diff)
downloadgit-347af012dba8794d003e4ae061131e3b7acdd558.tar.gz
Merge branch 'ps/clar-updates'
Import a newer version of the clar unit testing framework. * ps/clar-updates: t/unit-tests: update to 10e96bc t/unit-tests: update clar to fcbed04
Diffstat (limited to 't/unit-tests/clar/example/main.c')
-rw-r--r--t/unit-tests/clar/example/main.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/t/unit-tests/clar/example/main.c b/t/unit-tests/clar/example/main.c
new file mode 100644
index 0000000000..f8def7fa6e
--- /dev/null
+++ b/t/unit-tests/clar/example/main.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) Vicent Marti. All rights reserved.
+ *
+ * This file is part of clar, distributed under the ISC license.
+ * For full terms see the included COPYING file.
+ */
+
+#include "clar.h"
+
+/*
+ * Minimal main() for clar tests.
+ *
+ * Modify this with any application specific setup or teardown that you need.
+ * The only required line is the call to `clar_test(argc, argv)`, which will
+ * execute the test suite. If you want to check the return value of the test
+ * application, main() should return the same value returned by clar_test().
+ */
+
+#ifdef _WIN32
+int __cdecl main(int argc, char *argv[])
+#else
+int main(int argc, char *argv[])
+#endif
+{
+ /* Run the test suite */
+ return clar_test(argc, argv);
+}