libjit.git - libjit

index : libjit.git
libjit
summary refs log tree commit diff
path: root/tests/unit/unit-tests.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/unit-tests.h')
-rw-r--r--tests/unit/unit-tests.h 41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/unit/unit-tests.h b/tests/unit/unit-tests.h
new file mode 100644
index 0000000..0a51189
--- /dev/null
+++ b/tests/unit/unit-tests.h
@@ -0,0 +1,41 @@
+/*
+ * unit-tests.h - Defines for unit tests.
+ *
+ * Copyright (C) 2020 Free Software Foundation
+ *
+ * This file is part of the libjit library.
+ *
+ * The libjit library is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation, either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * The libjit library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the libjit library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _JIT_TESTS_UNIT_TESTS_H
+#define _JIT_TESTS_UNIT_TESTS_H
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Convenience. */
+#include <jit/jit-dump.h>
+
+#define CHECK(val) \
+ do { \
+ if (!(val)) { \
+ fprintf (stderr, "%s:%d: error: test failure\n", \
+ __FILE__, __LINE__); \
+ exit (1); \
+ } \
+ } while (0)
+
+#endif /* _JIT_TESTS_UNIT_TESTS_H */
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月06日 19:21:33 +0000

AltStyle によって変換されたページ (->オリジナル) /