Skip to content

Commit

Permalink
Add type test construct
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Nov 29, 2023
1 parent a9ce7f8 commit 4879f07
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Exercism.Analyzers.CSharp/Analyzers/TagAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ public override void VisitCastExpression(CastExpressionSyntax node)

public override void VisitIsPatternExpression(IsPatternExpressionSyntax node)
{
AddTags(Tags.TechniqueTypeConversion, Tags.ConstructIsCast, Tags.ConstructPatternMatching);
AddTags(Tags.TechniqueTypeConversion, Tags.ConstructIsCast, Tags.ConstructPatternMatching, Tags.ConstructTypeTest);
base.VisitIsPatternExpression(node);
}

Expand Down Expand Up @@ -1259,6 +1259,7 @@ private static class Tags
public const string ConstructThrowExpression = "construct:throw-expression";
public const string ConstructTry = "construct:try";
public const string ConstructTypeInference = "construct:type-inference";
public const string ConstructTypeTest = "construct:type-test";
public const string ConstructUnaryPlus = "construct:unary-plus";
public const string ConstructUnaryMinus = "construct:unary-minus";
public const string ConstructUnsignedRightShift = "construct:unsigned-right-shift";
Expand Down
1 change: 1 addition & 0 deletions tests/grains/approaches/max-value/expected_tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"construct:return",
"construct:subtract",
"construct:throw",
"construct:type-test",
"construct:ulong",
"construct:using-directive",
"construct:visibility-modifiers",
Expand Down
1 change: 1 addition & 0 deletions tests/grains/approaches/pow/expected_tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"construct:return",
"construct:subtract",
"construct:throw",
"construct:type-test",
"construct:using-directive",
"construct:visibility-modifiers",
"paradigm:functional",
Expand Down
1 change: 1 addition & 0 deletions tests/poker/approaches/icomparer/expected_tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"construct:subtract",
"construct:switch-expression",
"construct:tuple",
"construct:type-test",
"construct:unary-minus",
"construct:using-directive",
"construct:variable",
Expand Down
1 change: 1 addition & 0 deletions tests/poker/approaches/integer-score/expected_tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"construct:string",
"construct:subtract",
"construct:ternary",
"construct:type-test",
"construct:using-directive",
"construct:variable",
"construct:visibility-modifiers",
Expand Down

0 comments on commit 4879f07

Please sign in to comment.