Skip to content

Commit c80b932

Browse files
committed
Tests for proper pre-C++11 handling of "auto"
1 parent 2261b93 commit c80b932

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

regression/cpp/auto2/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
int main()
2+
{
3+
auto int x = 42;
4+
}

regression/cpp/auto2/test.desc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.cpp
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
^CONVERSION ERROR$

regression/cpp/auto3/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
int main()
2+
{
3+
// should yield a parse error unless in C++11 (or later) mode
4+
auto x = 42;
5+
}

regression/cpp/auto3/test.desc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
main.cpp
3+
4+
^EXIT=(64|1)$
5+
^SIGNAL=0$
6+
parse error
7+
--
8+
^warning: ignoring
9+
^CONVERSION ERROR$

0 commit comments

Comments
 (0)