aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
Diffstat (limited to 'validation')
-rw-r--r--validation/preprocessor/dynamic.c4
-rw-r--r--validation/preprocessor/include-level.c14
-rw-r--r--validation/preprocessor/include-level.h1
3 files changed, 19 insertions, 0 deletions
diff --git a/validation/preprocessor/dynamic.c b/validation/preprocessor/dynamic.c
index a829542f..9d1dcc08 100644
--- a/validation/preprocessor/dynamic.c
+++ b/validation/preprocessor/dynamic.c
@@ -13,6 +13,9 @@ time
#if defined(__COUNTER__)
counter
#endif
+#if defined(__INCLUDE_LEVEL__)
+__INCLUDE_LEVEL__
+#endif
/*
* check-name: dynamic-macros
@@ -25,5 +28,6 @@ counter
date
time
counter
+0
* check-output-end
*/
diff --git a/validation/preprocessor/include-level.c b/validation/preprocessor/include-level.c
new file mode 100644
index 00000000..b5e5e603
--- /dev/null
+++ b/validation/preprocessor/include-level.c
@@ -0,0 +1,14 @@
+__FILE__: __INCLUDE_LEVEL__
+
+#include "include-level.h"
+
+/*
+ * check-name: include-level
+ * check-command: sparse -E $file
+ *
+ * check-output-start
+
+"preprocessor/include-level.c": 0
+"preprocessor/include-level.h": 1
+ * check-output-end
+ */
diff --git a/validation/preprocessor/include-level.h b/validation/preprocessor/include-level.h
new file mode 100644
index 00000000..cbc10182
--- /dev/null
+++ b/validation/preprocessor/include-level.h
@@ -0,0 +1 @@
+__FILE__: __INCLUDE_LEVEL__