Skip to content

Commit 64cae5d

Browse files
authored
Merge pull request #2541 from Vogel612/TestCategorization
Test categorization, ref #2499
2 parents b4ec056 + e6fac93 commit 64cae5d

27 files changed

+1152
-558
lines changed

Rubberduck.RegexAssistant/Tests/CharacterClassTests.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace Rubberduck.RegexAssistant.Tests
77
[TestClass]
88
public class CharacterClassTests
99
{
10+
[TestCategory("RegexAssistant")]
1011
[TestMethod]
1112
public void InvertedCharacterClass()
1213
{
@@ -22,6 +23,7 @@ public void InvertedCharacterClass()
2223
}
2324
}
2425

26+
[TestCategory("RegexAssistant")]
2527
[TestMethod]
2628
public void SimpleCharacterRange()
2729
{
@@ -37,6 +39,7 @@ public void SimpleCharacterRange()
3739
}
3840
}
3941

42+
[TestCategory("RegexAssistant")]
4043
[TestMethod]
4144
public void UnicodeCharacterRange()
4245
{
@@ -52,6 +55,7 @@ public void UnicodeCharacterRange()
5255
}
5356
}
5457

58+
[TestCategory("RegexAssistant")]
5559
[TestMethod]
5660
public void OctalCharacterRange()
5761
{
@@ -67,6 +71,7 @@ public void OctalCharacterRange()
6771
}
6872
}
6973

74+
[TestCategory("RegexAssistant")]
7075
[TestMethod]
7176
public void HexadecimalCharacterRange()
7277
{
@@ -82,6 +87,7 @@ public void HexadecimalCharacterRange()
8287
}
8388
}
8489

90+
[TestCategory("RegexAssistant")]
8591
[TestMethod]
8692
public void MixedCharacterRanges()
8793
{
@@ -98,6 +104,7 @@ public void MixedCharacterRanges()
98104
}
99105
}
100106

107+
[TestCategory("RegexAssistant")]
101108
[TestMethod]
102109
public void RangeFailureWithCharacterClass()
103110
{
@@ -116,7 +123,8 @@ public void RangeFailureWithCharacterClass()
116123
}
117124
}
118125
}
119-
126+
127+
[TestCategory("RegexAssistant")]
120128
[TestMethod]
121129
public void EscapedLiteralRanges()
122130
{
@@ -146,6 +154,7 @@ public void EscapedLiteralRanges()
146154
}
147155
}
148156

157+
[TestCategory("RegexAssistant")]
149158
[TestMethod]
150159
public void SkipsIncorrectlyEscapedLiterals()
151160
{
@@ -166,6 +175,7 @@ public void SkipsIncorrectlyEscapedLiterals()
166175
}
167176
}
168177

178+
[TestCategory("RegexAssistant")]
169179
[TestMethod]
170180
public void IncorrectlyEscapedRangeTargetLiteralsBlowUp()
171181
{
@@ -186,6 +196,7 @@ public void IncorrectlyEscapedRangeTargetLiteralsBlowUp()
186196

187197
}
188198

199+
[TestCategory("RegexAssistant")]
189200
[TestMethod]
190201
public void IgnoresBackreferenceSpecifiers()
191202
{

Rubberduck.RegexAssistant/Tests/LiteralTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace Rubberduck.RegexAssistant.Tests
77
[TestClass]
88
public class LiteralTests
99
{
10+
[TestCategory("RegexAssistant")]
1011
[TestMethod]
1112
public void EscapedLiteralTests()
1213
{
@@ -18,6 +19,7 @@ public void EscapedLiteralTests()
1819
}
1920
}
2021

22+
[TestCategory("RegexAssistant")]
2123
[TestMethod]
2224
public void EscapeSequences()
2325
{
@@ -29,6 +31,7 @@ public void EscapeSequences()
2931
}
3032
}
3133

34+
[TestCategory("RegexAssistant")]
3235
[TestMethod]
3336
public void CodePoints()
3437
{
@@ -40,6 +43,7 @@ public void CodePoints()
4043
}
4144
}
4245

46+
[TestCategory("RegexAssistant")]
4347
[TestMethod]
4448
public void SimpleLiterals()
4549
{
@@ -51,6 +55,7 @@ public void SimpleLiterals()
5155
}
5256
}
5357

58+
[TestCategory("RegexAssistant")]
5459
[TestMethod]
5560
public void EverythingElseBlowsUp()
5661
{
@@ -73,6 +78,7 @@ public void EverythingElseBlowsUp()
7378
}
7479
}
7580

81+
[TestCategory("RegexAssistant")]
7682
[TestMethod]
7783
public void SingleEscapedCharsAreNotParsedAsLiteral()
7884
{

Rubberduck.RegexAssistant/Tests/QuantifierTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace Rubberduck.RegexAssistant.Tests
55
[TestClass]
66
public class QuantifierTests
77
{
8+
[TestCategory("RegexAssistant")]
89
[TestMethod]
910
public void AsteriskQuantifier()
1011
{
@@ -14,6 +15,7 @@ public void AsteriskQuantifier()
1415
Assert.AreEqual(QuantifierKind.Wildcard, cut.Kind);
1516
}
1617

18+
[TestCategory("RegexAssistant")]
1719
[TestMethod]
1820
public void QuestionMarkQuantifier()
1921
{
@@ -23,6 +25,7 @@ public void QuestionMarkQuantifier()
2325
Assert.AreEqual(QuantifierKind.Wildcard, cut.Kind);
2426
}
2527

28+
[TestCategory("RegexAssistant")]
2629
[TestMethod]
2730
public void PlusQuantifier()
2831
{
@@ -32,6 +35,7 @@ public void PlusQuantifier()
3235
Assert.AreEqual(QuantifierKind.Wildcard, cut.Kind);
3336
}
3437

38+
[TestCategory("RegexAssistant")]
3539
[TestMethod]
3640
public void ExactQuantifier()
3741
{
@@ -41,6 +45,7 @@ public void ExactQuantifier()
4145
Assert.AreEqual(QuantifierKind.Expression, cut.Kind);
4246
}
4347

48+
[TestCategory("RegexAssistant")]
4449
[TestMethod]
4550
public void FullRangeQuantifier()
4651
{
@@ -50,6 +55,7 @@ public void FullRangeQuantifier()
5055
Assert.AreEqual(QuantifierKind.Expression, cut.Kind);
5156
}
5257

58+
[TestCategory("RegexAssistant")]
5359
[TestMethod]
5460
public void OpenRangeQuantifier()
5561
{

Rubberduck.RegexAssistant/Tests/RegularExpressionTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace Rubberduck.RegexAssistant.Tests
77
[TestClass]
88
public class RegularExpressionTests
99
{
10+
[TestCategory("RegexAssistant")]
1011
[TestMethod]
1112
public void ParseSingleLiteralGroupAsAtomWorks()
1213
{
@@ -17,6 +18,7 @@ public void ParseSingleLiteralGroupAsAtomWorks()
1718
Assert.AreEqual(new Group("(g)", new Quantifier("{2,4}")), (expression as SingleAtomExpression).Atom);
1819
}
1920

21+
[TestCategory("RegexAssistant")]
2022
[TestMethod]
2123
public void ParseCharacterClassAsAtomWorks()
2224
{
@@ -27,6 +29,7 @@ public void ParseCharacterClassAsAtomWorks()
2729
Assert.AreEqual(new CharacterClass("[abcd]", new Quantifier("*")), (expression as SingleAtomExpression).Atom);
2830
}
2931

32+
[TestCategory("RegexAssistant")]
3033
[TestMethod]
3134
public void ParseLiteralAsAtomWorks()
3235
{
@@ -37,6 +40,7 @@ public void ParseLiteralAsAtomWorks()
3740
Assert.AreEqual(new Literal("a", Quantifier.None), (expression as SingleAtomExpression).Atom);
3841
}
3942

43+
[TestCategory("RegexAssistant")]
4044
[TestMethod]
4145
public void ParseUnicodeEscapeAsAtomWorks()
4246
{
@@ -47,6 +51,7 @@ public void ParseUnicodeEscapeAsAtomWorks()
4751
Assert.AreEqual(new Literal("\\u1234", new Quantifier("+")), (expression as SingleAtomExpression).Atom);
4852
}
4953

54+
[TestCategory("RegexAssistant")]
5055
[TestMethod]
5156
public void ParseHexEscapeSequenceAsAtomWorks()
5257
{
@@ -57,6 +62,7 @@ public void ParseHexEscapeSequenceAsAtomWorks()
5762
Assert.AreEqual(new Literal("\\x12", new Quantifier("?")), (expression as SingleAtomExpression).Atom);
5863
}
5964

65+
[TestCategory("RegexAssistant")]
6066
[TestMethod]
6167
public void ParseOctalEscapeSequenceAsAtomWorks()
6268
{
@@ -67,6 +73,7 @@ public void ParseOctalEscapeSequenceAsAtomWorks()
6773
Assert.AreEqual(new Literal("\\712", new Quantifier("{2}")), (expression as SingleAtomExpression).Atom);
6874
}
6975

76+
[TestCategory("RegexAssistant")]
7077
[TestMethod]
7178
public void ParseEscapedLiteralAsAtomWorks()
7279
{
@@ -77,6 +84,7 @@ public void ParseEscapedLiteralAsAtomWorks()
7784
Assert.AreEqual(new Literal("\\)", Quantifier.None), (expression as SingleAtomExpression).Atom);
7885
}
7986

87+
[TestCategory("RegexAssistant")]
8088
[TestMethod]
8189
public void ParseUnescapedSpecialCharAsAtomFails()
8290
{
@@ -89,6 +97,7 @@ public void ParseUnescapedSpecialCharAsAtomFails()
8997
}
9098
}
9199

100+
[TestCategory("RegexAssistant")]
92101
[TestMethod]
93102
public void ParseSimpleLiteralConcatenationAsConcatenatedExpression()
94103
{
@@ -106,6 +115,7 @@ public void ParseSimpleLiteralConcatenationAsConcatenatedExpression()
106115
}
107116
}
108117

118+
[TestCategory("RegexAssistant")]
109119
[TestMethod]
110120
public void ParseSimplisticGroupConcatenationAsConcatenatedExpression()
111121
{
@@ -124,6 +134,7 @@ public void ParseSimplisticGroupConcatenationAsConcatenatedExpression()
124134
}
125135
}
126136

137+
[TestCategory("RegexAssistant")]
127138
[TestMethod]
128139
public void ParseSimplisticCharacterClassConcatenationAsConcatenatedExpression()
129140
{
@@ -142,6 +153,7 @@ public void ParseSimplisticCharacterClassConcatenationAsConcatenatedExpression()
142153
}
143154
}
144155

156+
[TestCategory("RegexAssistant")]
145157
[TestMethod]
146158
public void ParseSimplisticAlternativesExpression()
147159
{
@@ -159,6 +171,7 @@ public void ParseSimplisticAlternativesExpression()
159171
}
160172
}
161173

174+
[TestCategory("RegexAssistant")]
162175
[TestMethod]
163176
public void CharacterClassIsNotAnAlternativesExpression()
164177
{
@@ -167,6 +180,7 @@ public void CharacterClassIsNotAnAlternativesExpression()
167180
Assert.AreEqual(new CharacterClass("[a|b]", Quantifier.None), (expression as SingleAtomExpression).Atom);
168181
}
169182

183+
[TestCategory("RegexAssistant")]
170184
[TestMethod]
171185
public void GroupIsNotAnAlternativesExpression()
172186
{

0 commit comments

Comments
 (0)