summaryrefslogtreecommitdiff
path: root/tests/syntax/bad
diff options
context:
space:
mode:
Diffstat (limited to 'tests/syntax/bad')
-rw-r--r--tests/syntax/bad/testfile-bad_hexa-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-bad_ident1-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-bad_ident2-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-bad_octal-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-block1-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-block2-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr1-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr10-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr11-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr2-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr3-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr4-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr6-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr7-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr8-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-expr9-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-for1-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-for2-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-for3-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-for4-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-for5-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-for6-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-for7-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-for8-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-if1-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-if2-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-if3-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-if_else-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-illegal_char-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-illegal_char-2.cpp2
-rw-r--r--tests/syntax/bad/testfile-instr_decl1-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-instr_expr-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-keyword1-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-lexer_hack-1.cpp2
-rw-r--r--tests/syntax/bad/testfile-lexer_hack-2.cpp3
-rw-r--r--tests/syntax/bad/testfile-lexing1-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-lexing2-1.cpp2
-rw-r--r--tests/syntax/bad/testfile-lexing3-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-lexing4-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-lexing5-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-lexing6-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-newline_in_string-1.cpp5
-rw-r--r--tests/syntax/bad/testfile-parameters2-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-quotes_in_string-1.cpp3
-rw-r--r--tests/syntax/bad/testfile-return1-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-unclosed_comment-1.cpp1
-rw-r--r--tests/syntax/bad/testfile-unclosed_escaped_string-1.cpp3
-rw-r--r--tests/syntax/bad/testfile-unclosed_string-1.cpp4
-rw-r--r--tests/syntax/bad/testfile-var2-1.cpp1
49 files changed, 65 insertions, 0 deletions
diff --git a/tests/syntax/bad/testfile-bad_hexa-1.cpp b/tests/syntax/bad/testfile-bad_hexa-1.cpp
new file mode 100644
index 0000000..e0f8f14
--- /dev/null
+++ b/tests/syntax/bad/testfile-bad_hexa-1.cpp
@@ -0,0 +1 @@
+int main() { int x = 0xG; }
diff --git a/tests/syntax/bad/testfile-bad_ident1-1.cpp b/tests/syntax/bad/testfile-bad_ident1-1.cpp
new file mode 100644
index 0000000..823ff28
--- /dev/null
+++ b/tests/syntax/bad/testfile-bad_ident1-1.cpp
@@ -0,0 +1 @@
+void 1A() { }
diff --git a/tests/syntax/bad/testfile-bad_ident2-1.cpp b/tests/syntax/bad/testfile-bad_ident2-1.cpp
new file mode 100644
index 0000000..acc7054
--- /dev/null
+++ b/tests/syntax/bad/testfile-bad_ident2-1.cpp
@@ -0,0 +1 @@
+void A'A() { }
diff --git a/tests/syntax/bad/testfile-bad_octal-1.cpp b/tests/syntax/bad/testfile-bad_octal-1.cpp
new file mode 100644
index 0000000..f44401f
--- /dev/null
+++ b/tests/syntax/bad/testfile-bad_octal-1.cpp
@@ -0,0 +1 @@
+int main() { int x = 08; }
diff --git a/tests/syntax/bad/testfile-block1-1.cpp b/tests/syntax/bad/testfile-block1-1.cpp
new file mode 100644
index 0000000..e5dc71d
--- /dev/null
+++ b/tests/syntax/bad/testfile-block1-1.cpp
@@ -0,0 +1 @@
+void f() { { }
diff --git a/tests/syntax/bad/testfile-block2-1.cpp b/tests/syntax/bad/testfile-block2-1.cpp
new file mode 100644
index 0000000..3ce148d
--- /dev/null
+++ b/tests/syntax/bad/testfile-block2-1.cpp
@@ -0,0 +1 @@
+void f() { { } } }
diff --git a/tests/syntax/bad/testfile-expr1-1.cpp b/tests/syntax/bad/testfile-expr1-1.cpp
new file mode 100644
index 0000000..fe82a74
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr1-1.cpp
@@ -0,0 +1 @@
+void f() { ++ {}; }
diff --git a/tests/syntax/bad/testfile-expr10-1.cpp b/tests/syntax/bad/testfile-expr10-1.cpp
new file mode 100644
index 0000000..c2f97d8
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr10-1.cpp
@@ -0,0 +1 @@
+void m() { a.x = ; }
diff --git a/tests/syntax/bad/testfile-expr11-1.cpp b/tests/syntax/bad/testfile-expr11-1.cpp
new file mode 100644
index 0000000..d0b2d79
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr11-1.cpp
@@ -0,0 +1 @@
+void m() { a.x = {}; }
diff --git a/tests/syntax/bad/testfile-expr2-1.cpp b/tests/syntax/bad/testfile-expr2-1.cpp
new file mode 100644
index 0000000..1fda478
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr2-1.cpp
@@ -0,0 +1 @@
+void f() { 0 ! 0; }
diff --git a/tests/syntax/bad/testfile-expr3-1.cpp b/tests/syntax/bad/testfile-expr3-1.cpp
new file mode 100644
index 0000000..0ff4a82
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr3-1.cpp
@@ -0,0 +1 @@
+void f() { 0 <> 0; }
diff --git a/tests/syntax/bad/testfile-expr4-1.cpp b/tests/syntax/bad/testfile-expr4-1.cpp
new file mode 100644
index 0000000..e03ca37
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr4-1.cpp
@@ -0,0 +1 @@
+void f() { 0 <== 0; }
diff --git a/tests/syntax/bad/testfile-expr6-1.cpp b/tests/syntax/bad/testfile-expr6-1.cpp
new file mode 100644
index 0000000..20d0013
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr6-1.cpp
@@ -0,0 +1 @@
+void f() { (0)0; }
diff --git a/tests/syntax/bad/testfile-expr7-1.cpp b/tests/syntax/bad/testfile-expr7-1.cpp
new file mode 100644
index 0000000..573bbb9
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr7-1.cpp
@@ -0,0 +1 @@
+void f() { j+ ; }
diff --git a/tests/syntax/bad/testfile-expr8-1.cpp b/tests/syntax/bad/testfile-expr8-1.cpp
new file mode 100644
index 0000000..95273c2
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr8-1.cpp
@@ -0,0 +1 @@
+void f() { j ++ i ; }
diff --git a/tests/syntax/bad/testfile-expr9-1.cpp b/tests/syntax/bad/testfile-expr9-1.cpp
new file mode 100644
index 0000000..b400639
--- /dev/null
+++ b/tests/syntax/bad/testfile-expr9-1.cpp
@@ -0,0 +1 @@
+void f() { x = a.; }
diff --git a/tests/syntax/bad/testfile-for1-1.cpp b/tests/syntax/bad/testfile-for1-1.cpp
new file mode 100644
index 0000000..ca4f53e
--- /dev/null
+++ b/tests/syntax/bad/testfile-for1-1.cpp
@@ -0,0 +1 @@
+void m() { int i; for( ; ; true; i++) ; }
diff --git a/tests/syntax/bad/testfile-for2-1.cpp b/tests/syntax/bad/testfile-for2-1.cpp
new file mode 100644
index 0000000..f600997
--- /dev/null
+++ b/tests/syntax/bad/testfile-for2-1.cpp
@@ -0,0 +1 @@
+void m() { int i; for( , i=0; true; i++) ; }
diff --git a/tests/syntax/bad/testfile-for3-1.cpp b/tests/syntax/bad/testfile-for3-1.cpp
new file mode 100644
index 0000000..be7aa4c
--- /dev/null
+++ b/tests/syntax/bad/testfile-for3-1.cpp
@@ -0,0 +1 @@
+void m() { int i; for( i = 0, ; true; i++) ; }
diff --git a/tests/syntax/bad/testfile-for4-1.cpp b/tests/syntax/bad/testfile-for4-1.cpp
new file mode 100644
index 0000000..be2dfdf
--- /dev/null
+++ b/tests/syntax/bad/testfile-for4-1.cpp
@@ -0,0 +1 @@
+void m() { for(int i = 0; ; ; i++) ; }
diff --git a/tests/syntax/bad/testfile-for5-1.cpp b/tests/syntax/bad/testfile-for5-1.cpp
new file mode 100644
index 0000000..303e843
--- /dev/null
+++ b/tests/syntax/bad/testfile-for5-1.cpp
@@ -0,0 +1 @@
+void m() { for(int i = 0; true; i = 0,) ; }
diff --git a/tests/syntax/bad/testfile-for6-1.cpp b/tests/syntax/bad/testfile-for6-1.cpp
new file mode 100644
index 0000000..85e1988
--- /dev/null
+++ b/tests/syntax/bad/testfile-for6-1.cpp
@@ -0,0 +1 @@
+void m() { for(int i = 0; true; i++) }
diff --git a/tests/syntax/bad/testfile-for7-1.cpp b/tests/syntax/bad/testfile-for7-1.cpp
new file mode 100644
index 0000000..41f8b51
--- /dev/null
+++ b/tests/syntax/bad/testfile-for7-1.cpp
@@ -0,0 +1 @@
+void m() { int i; for() ; }
diff --git a/tests/syntax/bad/testfile-for8-1.cpp b/tests/syntax/bad/testfile-for8-1.cpp
new file mode 100644
index 0000000..8b9040e
--- /dev/null
+++ b/tests/syntax/bad/testfile-for8-1.cpp
@@ -0,0 +1 @@
+int main() { for(;;) }
diff --git a/tests/syntax/bad/testfile-if1-1.cpp b/tests/syntax/bad/testfile-if1-1.cpp
new file mode 100644
index 0000000..dad42a8
--- /dev/null
+++ b/tests/syntax/bad/testfile-if1-1.cpp
@@ -0,0 +1 @@
+void m() { if () ; }
diff --git a/tests/syntax/bad/testfile-if2-1.cpp b/tests/syntax/bad/testfile-if2-1.cpp
new file mode 100644
index 0000000..de75066
--- /dev/null
+++ b/tests/syntax/bad/testfile-if2-1.cpp
@@ -0,0 +1 @@
+void m() { if (;) ; }
diff --git a/tests/syntax/bad/testfile-if3-1.cpp b/tests/syntax/bad/testfile-if3-1.cpp
new file mode 100644
index 0000000..a32ebc5
--- /dev/null
+++ b/tests/syntax/bad/testfile-if3-1.cpp
@@ -0,0 +1 @@
+int m() { if (true) }
diff --git a/tests/syntax/bad/testfile-if_else-1.cpp b/tests/syntax/bad/testfile-if_else-1.cpp
new file mode 100644
index 0000000..afa1759
--- /dev/null
+++ b/tests/syntax/bad/testfile-if_else-1.cpp
@@ -0,0 +1 @@
+void m() { if (true) ; else }
diff --git a/tests/syntax/bad/testfile-illegal_char-1.cpp b/tests/syntax/bad/testfile-illegal_char-1.cpp
new file mode 100644
index 0000000..59c227c
--- /dev/null
+++ b/tests/syntax/bad/testfile-illegal_char-1.cpp
@@ -0,0 +1 @@
+@
diff --git a/tests/syntax/bad/testfile-illegal_char-2.cpp b/tests/syntax/bad/testfile-illegal_char-2.cpp
new file mode 100644
index 0000000..f13b8fe
--- /dev/null
+++ b/tests/syntax/bad/testfile-illegal_char-2.cpp
@@ -0,0 +1,2 @@
+
+int main() { @ int x = 1; }
diff --git a/tests/syntax/bad/testfile-instr_decl1-1.cpp b/tests/syntax/bad/testfile-instr_decl1-1.cpp
new file mode 100644
index 0000000..923e6c2
--- /dev/null
+++ b/tests/syntax/bad/testfile-instr_decl1-1.cpp
@@ -0,0 +1 @@
+void m() { int x = 0 }
diff --git a/tests/syntax/bad/testfile-instr_expr-1.cpp b/tests/syntax/bad/testfile-instr_expr-1.cpp
new file mode 100644
index 0000000..af42569
--- /dev/null
+++ b/tests/syntax/bad/testfile-instr_expr-1.cpp
@@ -0,0 +1 @@
+int m() { 0 }
diff --git a/tests/syntax/bad/testfile-keyword1-1.cpp b/tests/syntax/bad/testfile-keyword1-1.cpp
new file mode 100644
index 0000000..fd96c24
--- /dev/null
+++ b/tests/syntax/bad/testfile-keyword1-1.cpp
@@ -0,0 +1 @@
+void m() { fora (i = 0; 1; i++); }
diff --git a/tests/syntax/bad/testfile-lexer_hack-1.cpp b/tests/syntax/bad/testfile-lexer_hack-1.cpp
new file mode 100644
index 0000000..bfb6bb6
--- /dev/null
+++ b/tests/syntax/bad/testfile-lexer_hack-1.cpp
@@ -0,0 +1,2 @@
+S x;
+int main() {}
diff --git a/tests/syntax/bad/testfile-lexer_hack-2.cpp b/tests/syntax/bad/testfile-lexer_hack-2.cpp
new file mode 100644
index 0000000..300ec96
--- /dev/null
+++ b/tests/syntax/bad/testfile-lexer_hack-2.cpp
@@ -0,0 +1,3 @@
+
+class S { public: int a; };
+class S { public: int a; };
diff --git a/tests/syntax/bad/testfile-lexing1-1.cpp b/tests/syntax/bad/testfile-lexing1-1.cpp
new file mode 100644
index 0000000..a1425a1
--- /dev/null
+++ b/tests/syntax/bad/testfile-lexing1-1.cpp
@@ -0,0 +1 @@
+int foo(int a, int b) { return a--b; }
diff --git a/tests/syntax/bad/testfile-lexing2-1.cpp b/tests/syntax/bad/testfile-lexing2-1.cpp
new file mode 100644
index 0000000..6c30d2e
--- /dev/null
+++ b/tests/syntax/bad/testfile-lexing2-1.cpp
@@ -0,0 +1,2 @@
+void m() { int i = 1/// comment starts at first /, not second
+ 1; }
diff --git a/tests/syntax/bad/testfile-lexing3-1.cpp b/tests/syntax/bad/testfile-lexing3-1.cpp
new file mode 100644
index 0000000..8619b21
--- /dev/null
+++ b/tests/syntax/bad/testfile-lexing3-1.cpp
@@ -0,0 +1 @@
+void m() { int i = 1/**/0; }
diff --git a/tests/syntax/bad/testfile-lexing4-1.cpp b/tests/syntax/bad/testfile-lexing4-1.cpp
new file mode 100644
index 0000000..32ac816
--- /dev/null
+++ b/tests/syntax/bad/testfile-lexing4-1.cpp
@@ -0,0 +1 @@
+void m() { i/**/nt i = 10; }
diff --git a/tests/syntax/bad/testfile-lexing5-1.cpp b/tests/syntax/bad/testfile-lexing5-1.cpp
new file mode 100644
index 0000000..d935f8f
--- /dev/null
+++ b/tests/syntax/bad/testfile-lexing5-1.cpp
@@ -0,0 +1 @@
+ void m() { int i = 0; i +/**/= 10; }
diff --git a/tests/syntax/bad/testfile-lexing6-1.cpp b/tests/syntax/bad/testfile-lexing6-1.cpp
new file mode 100644
index 0000000..4989b51
--- /dev/null
+++ b/tests/syntax/bad/testfile-lexing6-1.cpp
@@ -0,0 +1 @@
+ void m() { int i = 0; i + = 10; }
diff --git a/tests/syntax/bad/testfile-newline_in_string-1.cpp b/tests/syntax/bad/testfile-newline_in_string-1.cpp
new file mode 100644
index 0000000..92f9cc9
--- /dev/null
+++ b/tests/syntax/bad/testfile-newline_in_string-1.cpp
@@ -0,0 +1,5 @@
+void f() {
+ g("
+
+");
+}
diff --git a/tests/syntax/bad/testfile-parameters2-1.cpp b/tests/syntax/bad/testfile-parameters2-1.cpp
new file mode 100644
index 0000000..f5e0bfe
--- /dev/null
+++ b/tests/syntax/bad/testfile-parameters2-1.cpp
@@ -0,0 +1 @@
+void m(int x,) {}
diff --git a/tests/syntax/bad/testfile-quotes_in_string-1.cpp b/tests/syntax/bad/testfile-quotes_in_string-1.cpp
new file mode 100644
index 0000000..47a68d8
--- /dev/null
+++ b/tests/syntax/bad/testfile-quotes_in_string-1.cpp
@@ -0,0 +1,3 @@
+void f() {
+ g(" " ");
+}
diff --git a/tests/syntax/bad/testfile-return1-1.cpp b/tests/syntax/bad/testfile-return1-1.cpp
new file mode 100644
index 0000000..135e57d
--- /dev/null
+++ b/tests/syntax/bad/testfile-return1-1.cpp
@@ -0,0 +1 @@
+int m() { return
diff --git a/tests/syntax/bad/testfile-unclosed_comment-1.cpp b/tests/syntax/bad/testfile-unclosed_comment-1.cpp
new file mode 100644
index 0000000..33662f5
--- /dev/null
+++ b/tests/syntax/bad/testfile-unclosed_comment-1.cpp
@@ -0,0 +1 @@
+/*
diff --git a/tests/syntax/bad/testfile-unclosed_escaped_string-1.cpp b/tests/syntax/bad/testfile-unclosed_escaped_string-1.cpp
new file mode 100644
index 0000000..7d889f2
--- /dev/null
+++ b/tests/syntax/bad/testfile-unclosed_escaped_string-1.cpp
@@ -0,0 +1,3 @@
+void f() {
+ g("\");
+}
diff --git a/tests/syntax/bad/testfile-unclosed_string-1.cpp b/tests/syntax/bad/testfile-unclosed_string-1.cpp
new file mode 100644
index 0000000..0fce6a0
--- /dev/null
+++ b/tests/syntax/bad/testfile-unclosed_string-1.cpp
@@ -0,0 +1,4 @@
+void f() {
+ f(");
+ }
+
diff --git a/tests/syntax/bad/testfile-var2-1.cpp b/tests/syntax/bad/testfile-var2-1.cpp
new file mode 100644
index 0000000..858665c
--- /dev/null
+++ b/tests/syntax/bad/testfile-var2-1.cpp
@@ -0,0 +1 @@
+void f() { int }