Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f2ba627

Browse files
committed
CPP: Extend the c++_exceptions test.
1 parent a346f41 commit f2ba627

5 files changed

Lines changed: 408 additions & 353 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
| ODASA-5692.cpp:11:18:13:3 | { ... } |
22
| ODASA-5692.cpp:14:15:16:3 | { ... } |
33
| ODASA-5692.cpp:14:15:16:3 | { ... } |
4+
| exceptions.cpp:44:19:46:5 | { ... } |

cpp/ql/test/library-tests/c++_exceptions/catchparams.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
| exceptions.cpp:28:20:28:20 | e | exceptions.cpp:28:23:30:9 | { ... } |
33
| exceptions.cpp:32:16:32:16 | e | exceptions.cpp:32:19:34:5 | { ... } |
44
| exceptions.cpp:35:16:35:16 | e | exceptions.cpp:35:19:37:5 | { ... } |
5+
| exceptions.cpp:42:18:42:18 | e | exceptions.cpp:42:21:44:5 | { ... } |

cpp/ql/test/library-tests/c++_exceptions/exceptions.cpp

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
void f1(void) throw (int);
33
void f2(void) throw ();
44
void f3(void);
5-
void f4(void) {
6-
return;
7-
}
8-
void f5(void) {
9-
throw 3;
10-
}
5+
void f4(void) { return; }
6+
void f5(void) { throw 3; }
117
void g(void);
128
void h(void);
139
void i(void);
1410
void j(void);
1511
void k(void);
12+
void l(void);
13+
void m(void);
14+
void n(void);
15+
1616

1717
void fun(void) {
1818
try {
@@ -36,5 +36,15 @@ void fun(void) {
3636
j();
3737
}
3838
k();
39+
40+
try {
41+
throw 7;
42+
} catch (int e) {
43+
l();
44+
} catch (...) {
45+
m();
46+
}
47+
n();
48+
3949
return;
4050
}

0 commit comments

Comments
 (0)