126 references to UsingStatement
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (126)
Parsing\AnonymousFunctionParsingTests.cs (8)
901UsingStatement(test); 969UsingStatement(test); 1032UsingStatement(test); 1102UsingStatement(test); 1174UsingStatement(test); 1807UsingStatement(test); 2126UsingStatement(test); 2212UsingStatement(test);
Parsing\CollectionExpressionParsingTests.cs (8)
5638UsingStatement("var x = (A<B>)[1];"); 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 (26)
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) {}"); 870UsingStatement("foreach (_ 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 (6)
2930UsingStatement(@"var (x, y) = e;"); 2970UsingStatement(@"var::var (x, y) = e;"); 3024UsingStatement(@"var.var (x, y) = e;"); 3078UsingStatement(@"var<var> (x, y) = e;"); 3198UsingStatement(@"var* (x, y) = e;"); 3304UsingStatement(@"var?.var (x, y) = e;");
Parsing\ExpressionParsingTests.cs (1)
4840UsingStatement(source);
Parsing\ForStatementParsingTest.cs (48)
16UsingStatement("for (int i = 0, j = 0; i < 10; i++) ;"); 309UsingStatement("for (int i = 0, j; i < 10; i++) ;"); 447UsingStatement(""" 513UsingStatement(""" 587UsingStatement(""" 961UsingStatement(""" 2338UsingStatement(""" 2402UsingStatement(""" 2451UsingStatement(""" 2548UsingStatement(""" 2606UsingStatement(""" 2664UsingStatement(""" 2725UsingStatement(""" 2777UsingStatement(""" 2814UsingStatement(""" 2884UsingStatement(""" 2936UsingStatement(""" 2970UsingStatement(""" 3049UsingStatement(""" 3104UsingStatement(""" 3141UsingStatement(""" 3199UsingStatement(""" 3278UsingStatement(""" 3312UsingStatement(""" 3370UsingStatement(""" 3419UsingStatement(""" 3465UsingStatement(""" 3526UsingStatement(""" 3602UsingStatement(""" 3663UsingStatement(""" 3759UsingStatement(""" 3793UsingStatement(""" 3839UsingStatement(""" 3885UsingStatement(""" 4064UsingStatement(""" 4116UsingStatement(""" 4168UsingStatement(""" 4214UsingStatement(""" 4296UsingStatement(""" 4403UsingStatement(""" 4454UsingStatement(""" 4476UsingStatement(""" 4509UsingStatement(""" 4552UsingStatement(""" 4593UsingStatement(""" 4626UsingStatement(""" 4669UsingStatement(""" 4728UsingStatement("""
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\NullableParsingTests.cs (6)
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\StatementParsingTests.cs (9)
3974UsingStatement("switch (a: 0, b: 4) {}"); 4064UsingStatement("_ = new (int, int)? {};"); 4182UsingStatement("int []* p;"); 4220UsingStatement("int?* p;"); 4250UsingStatement("_ = new int? {};"); 5492UsingStatement(""" 5604UsingStatement(""" 5670UsingStatement(""" 5740UsingStatement("""
Parsing\SwitchExpressionParsingTests.cs (1)
2574UsingStatement(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);");