188 references to UsingStatement
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (188)
Parsing\AnonymousFunctionParsingTests.cs (14)
901UsingStatement(test); 969UsingStatement(test); 1032UsingStatement(test); 1102UsingStatement(test); 1174UsingStatement(test); 1338UsingStatement(test, 1415UsingStatement(test, 1614UsingStatement(test, 1718UsingStatement(test, 1807UsingStatement(test); 1906UsingStatement(test, 2036UsingStatement(test, 2126UsingStatement(test); 2212UsingStatement(test);
Parsing\CollectionExpressionParsingTests.cs (9)
5638UsingStatement("var x = (A<B>)[1];"); 7080UsingStatement("A < B?[] > D", 18108UsingStatement("var v = x is Y ? [1, 2, 3] : [1];"); 18192UsingStatement("var v = x is Y ? [] : [1];"); 18253UsingStatement("var v = x is Y ? [];"); 18308UsingStatement("var v = x is Y ? [,];"); 18368UsingStatement("var v = x is Y ? [][];"); 18432UsingStatement("var v = x is Y ? [] == Complex() : [1];"); 18509UsingStatement("var v = x is Y ? [Goo]() => B : [Goo]() => C;");
Parsing\DeclarationExpressionTests.cs (28)
22UsingStatement("M(out int? x);"); 64UsingStatement("if (e is int?) {}"); 98UsingStatement("if (e is int ? true : false) {}"); 141UsingStatement("if (e is int? x) {}"); 183UsingStatement("if (e is int ? x : y) {}"); 227UsingStatement("if (e is int x ? true : false) {}"); 277UsingStatement("ref object x = o1 is string ? ref o2 : ref o3;"); 340UsingStatement("ref object x = ref o1 is string ? ref o2 : ref o3;"); 407UsingStatement("foreach (int _ in e) {}"); 435UsingStatement("foreach (var _ in e) {}"); 463UsingStatement("foreach ((var x, var y) in e) {}"); 520UsingStatement("foreach ((int x, int y) in e) {}"); 577UsingStatement("foreach ((int x, int y) v in e) {}"); 624UsingStatement("foreach ((1, 2) in e) {}"); 667UsingStatement("foreach (var (x, y) in e) {}"); 711UsingStatement("foreach ((int x, var (y, z)) in e) {}"); 779UsingStatement("foreach ((var (x, y), z) in e) {}"); 839UsingStatement("foreach (x in e) {}", 870UsingStatement("foreach (_ in e) {}"); 897UsingStatement("foreach (a.b in e) {}", 936UsingStatement("(1, 2) = e;"); 975UsingStatement("M(out (1, 2));"); 1022UsingStatement("M(out (x, y));"); 1069UsingStatement("M(out (1, 2).Field);"); 1125UsingStatement("M(out (int x, int y));"); 1187UsingStatement("M(out (var x, var y));"); 1248UsingStatement("(x: 1, y: 2) = e;"); 1303UsingStatement("var(1, 2) = e;");
Parsing\DeconstructionTests.cs (8)
2930UsingStatement(@"var (x, y) = e;"); 2970UsingStatement(@"var::var (x, y) = e;"); 3024UsingStatement(@"var.var (x, y) = e;"); 3078UsingStatement(@"var<var> (x, y) = e;"); 3133UsingStatement(@"var[] (x, y) = e;", 3198UsingStatement(@"var* (x, y) = e;"); 3245UsingStatement(@"var? (x, y) = e;", 3304UsingStatement(@"var?.var (x, y) = e;");
Parsing\ExpressionParsingTests.cs (2)
4840UsingStatement(source); 6381UsingStatement("for (int i = 0; ref; i++) { }",
Parsing\ForStatementParsingTest.cs (75)
16UsingStatement("for (int i = 0, j = 0; i < 10; i++) ;"); 88UsingStatement("for (int i = 0, i < 10; i++) ;", 150UsingStatement("for (int i = 0, i < 10, i++) ;", 215UsingStatement("for (int i = 0, i) ;", 264UsingStatement("for (int i = 0,,) ;", 309UsingStatement("for (int i = 0, j; i < 10; i++) ;"); 373UsingStatement("for (int i = 0, i++; i < 10; i++) ;", 447UsingStatement(""" 513UsingStatement(""" 587UsingStatement(""" 661UsingStatement(""" 730UsingStatement(""" 804UsingStatement(""" 884UsingStatement(""" 961UsingStatement(""" 1017UsingStatement(""" 1134UsingStatement(""" 1248UsingStatement(""" 1370UsingStatement(""" 1495UsingStatement(""" 1628UsingStatement(""" 1757UsingStatement(""" 1845UsingStatement(""" 1937UsingStatement(""" 2030UsingStatement(""" 2133UsingStatement(""" 2237UsingStatement(""" 2338UsingStatement(""" 2402UsingStatement(""" 2451UsingStatement(""" 2548UsingStatement(""" 2606UsingStatement(""" 2664UsingStatement(""" 2725UsingStatement(""" 2777UsingStatement(""" 2814UsingStatement(""" 2884UsingStatement(""" 2936UsingStatement(""" 2970UsingStatement(""" 3049UsingStatement(""" 3104UsingStatement(""" 3141UsingStatement(""" 3199UsingStatement(""" 3278UsingStatement(""" 3312UsingStatement(""" 3370UsingStatement(""" 3419UsingStatement(""" 3465UsingStatement(""" 3526UsingStatement(""" 3602UsingStatement(""" 3663UsingStatement(""" 3709UsingStatement(""" 3759UsingStatement(""" 3793UsingStatement(""" 3839UsingStatement(""" 3885UsingStatement(""" 3943UsingStatement(""" 4005UsingStatement(""" 4064UsingStatement(""" 4116UsingStatement(""" 4168UsingStatement(""" 4214UsingStatement(""" 4296UsingStatement(""" 4348UsingStatement(""" 4403UsingStatement(""" 4454UsingStatement(""" 4476UsingStatement(""" 4509UsingStatement(""" 4552UsingStatement(""" 4593UsingStatement(""" 4626UsingStatement(""" 4669UsingStatement(""" 4728UsingStatement(""" 4803UsingStatement(""" 4847UsingStatement("""
Parsing\LambdaAttributeParsingTests.cs (5)
3362UsingStatement(source); 3389UsingStatement(source); 3428UsingStatement(source); 3465UsingStatement(source); 3512UsingStatement(source);
Parsing\LambdaParameterParsingTests.cs (1)
5077UsingStatement(@"F(async () => await Task.FromResult(4));");
Parsing\LambdaReturnTypeParsingTests.cs (2)
3058UsingStatement(source); 3098UsingStatement(source);
Parsing\LocalFunctionParsingTests.cs (1)
877UsingStatement(statement,
Parsing\NullableParsingTests.cs (7)
684UsingStatement("switch (e) { case T? t: break; }", 896UsingStatement("switch (e) { case T?[] t: break; }"); 955UsingStatement("switch (e) { case T[]?[] t: break; }"); 1091UsingStatement("(object[]?, A[]?) t;"); 1161UsingStatement("using (A[]? a = b) { }"); 1783UsingStatement("_ = x is Type?;"); 1819UsingStatement("_ = x is Type? t;");
Parsing\RefReadonlyTests.cs (1)
456UsingStatement("new ref[];",
Parsing\StatementParsingTests.cs (27)
30UsingStatement("private", 3562UsingStatement(@"{ label: public", 3594UsingStatement("else {}", 3648UsingStatement("{ else {} else {} }", 3752UsingStatement("{ if (a) { } else { } else { } }", 3835UsingStatement("if (a) else {}", 3898UsingStatement("switch 1+2 {}", 3929UsingStatement("switch (a: 0) {}", 3974UsingStatement("switch (a: 0, b: 4) {}"); 4023UsingStatement("switch (1) + (2) {}", 4064UsingStatement("_ = new (int, int)? {};"); 4116UsingStatement("_ = new (int, int) ? (x) : (y);", 4182UsingStatement("int []* p;"); 4220UsingStatement("int?* p;"); 4250UsingStatement("_ = new int? {};"); 4771UsingStatement(""" 4892UsingStatement(""" 5019UsingStatement(""" 5174UsingStatement(""" 5235UsingStatement(""" 5312UsingStatement(""" 5406UsingStatement(""" 5492UsingStatement(""" 5542UsingStatement(""" 5604UsingStatement(""" 5670UsingStatement(""" 5740UsingStatement("""
Parsing\SwitchExpressionParsingTests.cs (3)
288UsingStatement(""" 2574UsingStatement(code); 2661UsingStatement(code,
Parsing\ValueTupleTests.cs (5)
731UsingStatement("return (i, isValid ? Errors.IsValid : Errors.HasErrors);"); 792UsingStatement("return (isValid ? Errors.IsValid : Errors.HasErrors, i);"); 853UsingStatement("return (i, a < b, c > d);"); 906UsingStatement("return (i, a < b, c > d.x);"); 970UsingStatement("return (i, a < b, c > d && x);");