Skip to content

Commit 9f09395

Browse files
committed
Integrate test cases from more-tests
1 parent 3363ffa commit 9f09395

27 files changed

+83
-0
lines changed

bad/decl-no-rhs.cc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
int foo() {
2+
int x =;
3+
return x;
4+
}

bad/exp-in-arg.cc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
void go(int& 1) { /* ... */ }

bad/new--ass-no-rhs.cc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
int main() {
2+
int x;
3+
x =;
4+
}

bad/new--ass-stm.cc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
int main() {
2+
int x;
3+
x = return 0;
4+
}

bad/new--const-exp.cc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int main() {
2+
const 0;
3+
}

bad/new--const-return.cc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int main() {
2+
const return 0;
3+
}

bad/new--decl-empty.cc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
int main() {
2+
int;
3+
return 0;
4+
}

bad/new--decl-qual.cc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int main() {
2+
int x::y = 4;
3+
}

bad/new--decl-stm.cc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int main() {
2+
int x = return 0;
3+
}

bad/new--def-fun-par.cc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(int main() { })

bad/new--fun-arg-id-par.cc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int main(int (x));

bad/new--fun-arg-qual.cc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int main(int foo::bar);

bad/new--fun-arg-type-par.cc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int main((int) x);

bad/new--stm-ret-par.cc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int main() { (return 0;) }

bad/new2--0-is-lit.cc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int 0() { }

bad/new2--decl-multiple-types.cc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int main() {
2+
int a, int b;
3+
}

bad/new2--decl-no-comma.cc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int main() {
2+
int a b;
3+
}

bad/new2--int-int.cc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int main() {
2+
int int a;
3+
}

good-CMM/new--const_args.cc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
void constants(const int a = 0, const int b = 1);

good-CMM/new--const_inside.cc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
void constants() {
2+
const int a = 0, b = 1;
3+
}

good-CMM/new--const_outside.cc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const int a = 0, b = 1;

good/new--cond-all.cc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <exception>
2+
3+
int main()
4+
{
5+
return true ? throw std::exception() : 0;
6+
}

good/new--decls_many.cc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// lots of variable declarations
2+
int main() {
3+
int x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99, x100;
4+
5+
return 0;
6+
}

good/new--good18.cc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
int main() {
2+
int x = 0;
3+
x = 0 * ++x;
4+
x = 0 * --x;
5+
x = 0 * x++;
6+
x = 0 * x--;
7+
return 0;
8+
}

good/new2--synthetic015.cc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int main() {
2+
if (x1 = x1 - x3) while (qx + 3) return 3; else { }
3+
}

good/new2--synthetic023.cc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
int main() {
2+
int x = 4;
3+
int y = x = x + 2;
4+
}

good/new__characters.cc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
int main() {
2+
// char sq = '''; // This does not seem to be valid C/C++/Java
3+
char dq = '"';
4+
char num = '0';
5+
char lr = 'a';
6+
//'0', 'a', '"', '''
7+
}

0 commit comments

Comments
 (0)