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

Skip to content

Commit 8d7ea2f

Browse files
committed
C#: Add CFG test that mixes Boolean/finally/catch splitting
1 parent 61a196d commit 8d7ea2f

13 files changed

Lines changed: 613 additions & 0 deletions

csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,29 @@
8181
| CatchInFinally.cs:23:13:26:13 | [finally: exception(ArgumentNullException)] catch {...} | CatchInFinally.cs:25:17:25:37 | [finally: exception(ArgumentNullException)] call to method WriteLine | 5 |
8282
| CatchInFinally.cs:23:13:26:13 | [finally: exception(Exception)] catch {...} | CatchInFinally.cs:25:17:25:37 | [finally: exception(Exception)] call to method WriteLine | 5 |
8383
| CatchInFinally.cs:23:13:26:13 | catch {...} | CatchInFinally.cs:25:17:25:37 | call to method WriteLine | 5 |
84+
| CatchInFinally.cs:34:24:34:25 | enter M2 | CatchInFinally.cs:38:17:38:18 | access to parameter b1 | 6 |
85+
| CatchInFinally.cs:34:24:34:25 | exit M2 | CatchInFinally.cs:34:24:34:25 | exit M2 | 1 |
86+
| CatchInFinally.cs:38:21:38:43 | [b1 (line 34): true] throw ...; | CatchInFinally.cs:44:21:44:22 | [finally: exception(ExceptionA), b1 (line 34): true] access to parameter b2 | 6 |
87+
| CatchInFinally.cs:38:27:38:42 | [b1 (line 34): true] object creation of type ExceptionA | CatchInFinally.cs:38:27:38:42 | [b1 (line 34): true] object creation of type ExceptionA | 1 |
88+
| CatchInFinally.cs:41:9:50:9 | [b1 (line 34): false] {...} | CatchInFinally.cs:44:21:44:22 | [b1 (line 34): false] access to parameter b2 | 5 |
89+
| CatchInFinally.cs:41:9:50:9 | [finally: exception(Exception), b1 (line 34): true] {...} | CatchInFinally.cs:44:21:44:22 | [finally: exception(Exception), b1 (line 34): true] access to parameter b2 | 5 |
90+
| CatchInFinally.cs:44:25:44:47 | [b1 (line 34): false] throw ...; | CatchInFinally.cs:46:38:46:39 | [exception: ExceptionB, b1 (line 34): false] access to parameter b2 | 3 |
91+
| CatchInFinally.cs:44:25:44:47 | [finally: exception(Exception), b1 (line 34): true] throw ...; | CatchInFinally.cs:46:38:46:39 | [finally: exception(Exception), exception: ExceptionB, b1 (line 34): true] access to parameter b2 | 3 |
92+
| CatchInFinally.cs:44:25:44:47 | [finally: exception(ExceptionA), b1 (line 34): true] throw ...; | CatchInFinally.cs:46:38:46:39 | [finally: exception(ExceptionA), exception: ExceptionB, b1 (line 34): true] access to parameter b2 | 3 |
93+
| CatchInFinally.cs:44:31:44:46 | [b1 (line 34): false] object creation of type ExceptionB | CatchInFinally.cs:44:31:44:46 | [b1 (line 34): false] object creation of type ExceptionB | 1 |
94+
| CatchInFinally.cs:44:31:44:46 | [finally: exception(Exception), b1 (line 34): true] object creation of type ExceptionB | CatchInFinally.cs:44:31:44:46 | [finally: exception(Exception), b1 (line 34): true] object creation of type ExceptionB | 1 |
95+
| CatchInFinally.cs:44:31:44:46 | [finally: exception(ExceptionA), b1 (line 34): true] object creation of type ExceptionB | CatchInFinally.cs:44:31:44:46 | [finally: exception(ExceptionA), b1 (line 34): true] object creation of type ExceptionB | 1 |
96+
| CatchInFinally.cs:46:13:49:13 | [exception: Exception, b1 (line 34): false] catch (...) {...} | CatchInFinally.cs:46:13:49:13 | [exception: Exception, b1 (line 34): false] catch (...) {...} | 1 |
97+
| CatchInFinally.cs:46:13:49:13 | [finally: exception(Exception), exception: Exception, b1 (line 34): true] catch (...) {...} | CatchInFinally.cs:46:13:49:13 | [finally: exception(Exception), exception: Exception, b1 (line 34): true] catch (...) {...} | 1 |
98+
| CatchInFinally.cs:46:13:49:13 | [finally: exception(ExceptionA), exception: Exception, b1 (line 34): true] catch (...) {...} | CatchInFinally.cs:46:13:49:13 | [finally: exception(ExceptionA), exception: Exception, b1 (line 34): true] catch (...) {...} | 1 |
99+
| CatchInFinally.cs:46:38:46:39 | [exception: Exception, b1 (line 34): false] access to parameter b2 | CatchInFinally.cs:46:38:46:39 | [exception: Exception, b1 (line 34): false] access to parameter b2 | 1 |
100+
| CatchInFinally.cs:46:38:46:39 | [finally: exception(Exception), exception: Exception, b1 (line 34): true] access to parameter b2 | CatchInFinally.cs:46:38:46:39 | [finally: exception(Exception), exception: Exception, b1 (line 34): true] access to parameter b2 | 1 |
101+
| CatchInFinally.cs:46:38:46:39 | [finally: exception(ExceptionA), exception: Exception, b1 (line 34): true] access to parameter b2 | CatchInFinally.cs:46:38:46:39 | [finally: exception(ExceptionA), exception: Exception, b1 (line 34): true] access to parameter b2 | 1 |
102+
| CatchInFinally.cs:47:13:49:13 | [b1 (line 34): false] {...} | CatchInFinally.cs:48:21:48:22 | [b1 (line 34): false] access to parameter b1 | 3 |
103+
| CatchInFinally.cs:47:13:49:13 | [finally: exception(Exception), b1 (line 34): true] {...} | CatchInFinally.cs:48:21:48:22 | [finally: exception(Exception), b1 (line 34): true] access to parameter b1 | 3 |
104+
| CatchInFinally.cs:47:13:49:13 | [finally: exception(ExceptionA), b1 (line 34): true] {...} | CatchInFinally.cs:48:21:48:22 | [finally: exception(ExceptionA), b1 (line 34): true] access to parameter b1 | 3 |
105+
| CatchInFinally.cs:48:31:48:46 | [finally: exception(Exception)] object creation of type ExceptionC | CatchInFinally.cs:48:25:48:47 | [finally: exception(Exception)] throw ...; | 2 |
106+
| CatchInFinally.cs:48:31:48:46 | [finally: exception(ExceptionA)] object creation of type ExceptionC | CatchInFinally.cs:48:25:48:47 | [finally: exception(ExceptionA)] throw ...; | 2 |
84107
| CompileTimeOperators.cs:5:9:5:15 | enter Default | CompileTimeOperators.cs:5:9:5:15 | exit Default | 5 |
85108
| CompileTimeOperators.cs:10:9:10:14 | enter Sizeof | CompileTimeOperators.cs:10:9:10:14 | exit Sizeof | 5 |
86109
| CompileTimeOperators.cs:15:10:15:15 | enter Typeof | CompileTimeOperators.cs:15:10:15:15 | exit Typeof | 5 |

0 commit comments

Comments
 (0)