summaryrefslogtreecommitdiffstats
path: root/test/Lexer/Inputs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Lexer/Inputs')
-rw-r--r--test/Lexer/Inputs/bad-header-guard-defined.h4
-rw-r--r--test/Lexer/Inputs/bad-header-guard.h4
-rw-r--r--test/Lexer/Inputs/different-define.h4
-rw-r--r--test/Lexer/Inputs/good-header-guard.h4
-rw-r--r--test/Lexer/Inputs/multiple.h4
-rw-r--r--test/Lexer/Inputs/no-define.h3
-rw-r--r--test/Lexer/Inputs/out-of-order-define.h7
-rw-r--r--test/Lexer/Inputs/tokens-between-ifndef-and-define.h7
-rw-r--r--test/Lexer/Inputs/unlikely-to-be-header-guard.h5
9 files changed, 42 insertions, 0 deletions
diff --git a/test/Lexer/Inputs/bad-header-guard-defined.h b/test/Lexer/Inputs/bad-header-guard-defined.h
new file mode 100644
index 0000000..b28f1a8
--- /dev/null
+++ b/test/Lexer/Inputs/bad-header-guard-defined.h
@@ -0,0 +1,4 @@
+#if !defined(foo)
+#define goo
+int n;
+#endif
diff --git a/test/Lexer/Inputs/bad-header-guard.h b/test/Lexer/Inputs/bad-header-guard.h
new file mode 100644
index 0000000..601da09
--- /dev/null
+++ b/test/Lexer/Inputs/bad-header-guard.h
@@ -0,0 +1,4 @@
+#ifndef bad_header_guard
+#define bad_guard
+
+#endif
diff --git a/test/Lexer/Inputs/different-define.h b/test/Lexer/Inputs/different-define.h
new file mode 100644
index 0000000..f23454b
--- /dev/null
+++ b/test/Lexer/Inputs/different-define.h
@@ -0,0 +1,4 @@
+#ifndef different_define
+#define FOO 5
+
+#endif
diff --git a/test/Lexer/Inputs/good-header-guard.h b/test/Lexer/Inputs/good-header-guard.h
new file mode 100644
index 0000000..664a479
--- /dev/null
+++ b/test/Lexer/Inputs/good-header-guard.h
@@ -0,0 +1,4 @@
+#ifndef good_header_guard
+#define good_header_guard
+
+#endif
diff --git a/test/Lexer/Inputs/multiple.h b/test/Lexer/Inputs/multiple.h
new file mode 100644
index 0000000..5dfb327
--- /dev/null
+++ b/test/Lexer/Inputs/multiple.h
@@ -0,0 +1,4 @@
+#ifndef multiple
+#define multi
+
+#endif
diff --git a/test/Lexer/Inputs/no-define.h b/test/Lexer/Inputs/no-define.h
new file mode 100644
index 0000000..591a66b
--- /dev/null
+++ b/test/Lexer/Inputs/no-define.h
@@ -0,0 +1,3 @@
+#ifndef no_define
+
+#endif
diff --git a/test/Lexer/Inputs/out-of-order-define.h b/test/Lexer/Inputs/out-of-order-define.h
new file mode 100644
index 0000000..d38e93f
--- /dev/null
+++ b/test/Lexer/Inputs/out-of-order-define.h
@@ -0,0 +1,7 @@
+#ifndef out_of_order
+
+#define something_else
+
+#define out_of_order
+
+#endif
diff --git a/test/Lexer/Inputs/tokens-between-ifndef-and-define.h b/test/Lexer/Inputs/tokens-between-ifndef-and-define.h
new file mode 100644
index 0000000..ce8d770
--- /dev/null
+++ b/test/Lexer/Inputs/tokens-between-ifndef-and-define.h
@@ -0,0 +1,7 @@
+#ifndef tokens_between
+
+const int pi = 3;
+
+#define pi_is_bad
+
+#endif
diff --git a/test/Lexer/Inputs/unlikely-to-be-header-guard.h b/test/Lexer/Inputs/unlikely-to-be-header-guard.h
new file mode 100644
index 0000000..098fc3c
--- /dev/null
+++ b/test/Lexer/Inputs/unlikely-to-be-header-guard.h
@@ -0,0 +1,5 @@
+#ifndef data_rep_h
+#define use_alternate_data_rep
+/* #include "data_rep.h" */
+#endif
+
OpenPOWER on IntegriCloud