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

Skip to content

Commit fa89d2b

Browse files
committed
C#: Update stats and test output.
1 parent 923fbe4 commit fa89d2b

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

csharp/ql/src/semmlecode.csharp.dbscheme.stats

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,14 @@
360360
<v>1854</v>
361361
</e>
362362
<e>
363-
<k>@using_stmt</k>
363+
<k>@using_block_stmt</k>
364364
<v>5815</v>
365365
</e>
366366
<e>
367+
<k>@using_decl_stmt</k>
368+
<v>1000</v>
369+
</e>
370+
<e>
367371
<k>@var_decl_stmt</k>
368372
<v>243866</v>
369373
</e>
@@ -688,6 +692,10 @@
688692
<v>116</v>
689693
</e>
690694
<e>
695+
<k>@assign_coalesce_expr</k>
696+
<v>116</v>
697+
</e>
698+
<e>
691699
<k>@object_init_expr</k>
692700
<v>5320</v>
693701
</e>

csharp/ql/test/library-tests/csharp8/UsingDeclarations.expected

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
localVars
2-
| NullCoalescingAssignment.cs:7:16:7:16 | o |
32
| UsingDeclarations.cs:8:26:8:30 | file1 |
43
| UsingDeclarations.cs:8:72:8:76 | file2 |
54
| UsingDeclarations.cs:10:26:10:30 | file3 |
65
| UsingDeclarations.cs:10:72:10:76 | file4 |
76
localVariableDeclarations
8-
| NullCoalescingAssignment.cs:7:9:7:24 | ... ...; | 0 | NullCoalescingAssignment.cs:7:16:7:23 | Object o = ... |
97
usingStmts1
108
| UsingDeclarations.cs:8:9:8:116 | using ... ...; |
119
| UsingDeclarations.cs:10:9:12:9 | using (...) {...} |

csharp/ql/test/library-tests/csharp8/UsingDeclarations.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import csharp
22

3-
query predicate localVars(LocalVariable decl) { any() }
3+
query predicate localVars(LocalVariable decl) {
4+
decl.getEnclosingCallable().hasName("TestUsingDeclarations")
5+
}
46

57
query predicate localVariableDeclarations(
68
LocalVariableDeclStmt stmt, int i, LocalVariableDeclExpr decl
79
) {
10+
decl.getEnclosingCallable().hasName("TestUsingDeclarations") and
811
decl = stmt.getVariableDeclExpr(i)
912
}
1013

0 commit comments

Comments
 (0)