Skip to content

Commit 01b4ef4

Browse files
author
github-actions
committed
Updated code formatting to match rules in .editorconfig
1 parent 8a01c64 commit 01b4ef4

17 files changed

+210
-170
lines changed

test/Hyperbee.XS.Tests/XsParserTests.Complex.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class XsParserComplexTests
88
{
99
public static XsParser Xs { get; set; } = new( TestInitializer.XsConfig );
1010

11-
[DataTestMethod]
11+
[TestMethod]
1212
[DataRow( CompilerType.Fast )]
1313
[DataRow( CompilerType.System )]
1414
[DataRow( CompilerType.Interpret )]

test/Hyperbee.XS.Tests/XsParserTests.Conditional.cs

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class XsParserConditionalTests
77
{
88
public static XsParser Xs { get; } = new();
99

10-
[DataTestMethod]
10+
[TestMethod]
1111
[DataRow( CompilerType.Fast )]
1212
[DataRow( CompilerType.System )]
1313
[DataRow( CompilerType.Interpret )]
@@ -31,7 +31,7 @@ public void Compile_ShouldSucceed_WithoutBraces( CompilerType compiler )
3131
Assert.AreEqual( 1, result );
3232
}
3333

34-
[DataTestMethod]
34+
[TestMethod]
3535
[DataRow( CompilerType.Fast )]
3636
[DataRow( CompilerType.System )]
3737
[DataRow( CompilerType.Interpret )]
@@ -57,7 +57,7 @@ public void Compile_ShouldSucceed_WithConditional( CompilerType compiler )
5757
Assert.AreEqual( "hello", result );
5858
}
5959

60-
[DataTestMethod]
60+
[TestMethod]
6161
[DataRow( CompilerType.Fast )]
6262
[DataRow( CompilerType.System )]
6363
[DataRow( CompilerType.Interpret )]
@@ -81,7 +81,7 @@ public void Compile_ShouldSucceed_WithConditionalAndNoElse( CompilerType compile
8181
Assert.AreEqual( "hello", result );
8282
}
8383

84-
[DataTestMethod]
84+
[TestMethod]
8585
[DataRow( CompilerType.Fast )]
8686
[DataRow( CompilerType.System )]
8787
[DataRow( CompilerType.Interpret )]
@@ -108,7 +108,7 @@ public void Compile_ShouldSucceed_WithConditionalVariable( CompilerType compiler
108108
Assert.AreEqual( "hello", result );
109109
}
110110

111-
[DataTestMethod]
111+
[TestMethod]
112112
[DataRow( CompilerType.Fast )]
113113
[DataRow( CompilerType.System )]
114114
[DataRow( CompilerType.Interpret )]
@@ -135,14 +135,15 @@ public void Compile_ShouldSucceed_WithConditionalAssignment( CompilerType compil
135135
Assert.AreEqual( "hello", result );
136136
}
137137

138-
[DataTestMethod]
138+
[TestMethod]
139139
[DataRow( CompilerType.Fast )]
140140
[DataRow( CompilerType.System )]
141141
[DataRow( CompilerType.Interpret )]
142-
[ExpectedException( typeof( SyntaxException ) )]
143142
public void Compile_ShouldFail_WithMissingSemicolon( CompilerType compiler )
144143
{
145-
try
144+
Assert.ThrowsExactly<SyntaxException>( () =>
145+
{
146+
try
146147
{
147148
Xs.Parse(
148149
"""
@@ -158,16 +159,18 @@ public void Compile_ShouldFail_WithMissingSemicolon( CompilerType compiler )
158159
Console.WriteLine( ex.Message );
159160
throw;
160161
}
162+
} );
161163
}
162164

163-
[DataTestMethod]
165+
[TestMethod]
164166
[DataRow( CompilerType.Fast )]
165167
[DataRow( CompilerType.System )]
166168
[DataRow( CompilerType.Interpret )]
167-
[ExpectedException( typeof( SyntaxException ) )]
168169
public void Compile_ShouldFail_WithUnmatchedBraces( CompilerType compiler )
169170
{
170-
try
171+
Assert.ThrowsExactly<SyntaxException>( () =>
172+
{
173+
try
171174
{
172175
Xs.Parse(
173176
"""
@@ -185,16 +188,18 @@ public void Compile_ShouldFail_WithUnmatchedBraces( CompilerType compiler )
185188
Console.WriteLine( ex.Message );
186189
throw;
187190
}
191+
} );
188192
}
189193

190-
[DataTestMethod]
194+
[TestMethod]
191195
[DataRow( CompilerType.Fast )]
192196
[DataRow( CompilerType.System )]
193197
[DataRow( CompilerType.Interpret )]
194-
[ExpectedException( typeof( SyntaxException ) )]
195198
public void Compile_ShouldFail_WithInvalidCondition( CompilerType compiler )
196199
{
197-
try
200+
Assert.ThrowsExactly<SyntaxException>( () =>
201+
{
202+
try
198203
{
199204
Xs.Parse(
200205
"""
@@ -211,16 +216,18 @@ public void Compile_ShouldFail_WithInvalidCondition( CompilerType compiler )
211216
Console.WriteLine( ex.Message );
212217
throw;
213218
}
219+
} );
214220
}
215221

216-
[DataTestMethod]
222+
[TestMethod]
217223
[DataRow( CompilerType.Fast )]
218224
[DataRow( CompilerType.System )]
219225
[DataRow( CompilerType.Interpret )]
220-
[ExpectedException( typeof( SyntaxException ) )]
221226
public void Compile_ShouldFail_WithInvalidElse( CompilerType compiler )
222227
{
223-
try
228+
Assert.ThrowsExactly<SyntaxException>( () =>
229+
{
230+
try
224231
{
225232
Xs.Parse(
226233
"""
@@ -237,6 +244,7 @@ public void Compile_ShouldFail_WithInvalidElse( CompilerType compiler )
237244
Console.WriteLine( ex.Message );
238245
throw;
239246
}
247+
} );
240248
}
241249
}
242250

test/Hyperbee.XS.Tests/XsParserTests.Expression.cs

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class XsParserExpressionTests
77
{
88
public static XsParser Xs { get; } = new();
99

10-
[DataTestMethod]
10+
[TestMethod]
1111
[DataRow( CompilerType.Fast )]
1212
[DataRow( CompilerType.System )]
1313
[DataRow( CompilerType.Interpret )]
@@ -23,7 +23,7 @@ public void Compile_ShouldSucceed_Constant( CompilerType compiler )
2323
Assert.AreEqual( 5, result );
2424
}
2525

26-
[DataTestMethod]
26+
[TestMethod]
2727
[DataRow( CompilerType.Fast )]
2828
[DataRow( CompilerType.System )]
2929
[DataRow( CompilerType.Interpret )]
@@ -39,7 +39,7 @@ public void Compile_ShouldSucceed_UnaryNegate( CompilerType compiler )
3939
Assert.AreEqual( 2, result );
4040
}
4141

42-
[DataTestMethod]
42+
[TestMethod]
4343
[DataRow( CompilerType.Fast )]
4444
[DataRow( CompilerType.System )]
4545
[DataRow( CompilerType.Interpret )]
@@ -55,7 +55,7 @@ public void Compile_ShouldSucceed_UnaryNot( CompilerType compiler )
5555
Assert.IsTrue( result );
5656
}
5757

58-
[DataTestMethod]
58+
[TestMethod]
5959
[DataRow( CompilerType.Fast )]
6060
[DataRow( CompilerType.System )]
6161
[DataRow( CompilerType.Interpret )]
@@ -71,7 +71,7 @@ public void Compile_ShouldSucceed_UnaryIsFalse( CompilerType compiler )
7171
Assert.IsTrue( result );
7272
}
7373

74-
[DataTestMethod]
74+
[TestMethod]
7575
[DataRow( CompilerType.Fast )]
7676
[DataRow( CompilerType.System )]
7777
[DataRow( CompilerType.Interpret )]
@@ -87,7 +87,7 @@ public void Compile_ShouldSucceed_UnaryIsTrue( CompilerType compiler )
8787
Assert.IsTrue( result );
8888
}
8989

90-
[DataTestMethod]
90+
[TestMethod]
9191
[DataRow( CompilerType.Fast )]
9292
[DataRow( CompilerType.System )]
9393
[DataRow( CompilerType.Interpret )]
@@ -103,7 +103,7 @@ public void Compile_ShouldSucceed_UnaryNot_Grouping( CompilerType compiler )
103103
Assert.IsTrue( result );
104104
}
105105

106-
[DataTestMethod]
106+
[TestMethod]
107107
[DataRow( CompilerType.Fast )]
108108
[DataRow( CompilerType.System )]
109109
[DataRow( CompilerType.Interpret )]
@@ -119,7 +119,7 @@ public void Compile_ShouldSucceed_BinaryAdd( CompilerType compiler )
119119
Assert.AreEqual( 22, result );
120120
}
121121

122-
[DataTestMethod]
122+
[TestMethod]
123123
[DataRow( CompilerType.Fast )]
124124
[DataRow( CompilerType.System )]
125125
[DataRow( CompilerType.Interpret )]
@@ -135,7 +135,7 @@ public void Compile_ShouldSucceed_BinaryAdd_WithMultiple( CompilerType compiler
135135
Assert.AreEqual( 36, result );
136136
}
137137

138-
[DataTestMethod]
138+
[TestMethod]
139139
[DataRow( CompilerType.Fast )]
140140
[DataRow( CompilerType.System )]
141141
[DataRow( CompilerType.Interpret )]
@@ -151,7 +151,7 @@ public void Compile_ShouldSucceed_BinaryAdd_WithGrouping( CompilerType compiler
151151
Assert.AreEqual( 44, result );
152152
}
153153

154-
[DataTestMethod]
154+
[TestMethod]
155155
[DataRow( CompilerType.Fast )]
156156
[DataRow( CompilerType.System )]
157157
[DataRow( CompilerType.Interpret )]
@@ -167,7 +167,7 @@ public void Compile_ShouldSucceed_BinaryAdd_WithMultipleGrouping( CompilerType c
167167
Assert.AreEqual( 44, result );
168168
}
169169

170-
[DataTestMethod]
170+
[TestMethod]
171171
[DataRow( CompilerType.Fast )]
172172
[DataRow( CompilerType.System )]
173173
[DataRow( CompilerType.Interpret )]
@@ -183,7 +183,7 @@ public void Compile_ShouldSucceed_BinaryLessThan( CompilerType compiler )
183183
Assert.IsTrue( result );
184184
}
185185

186-
[DataTestMethod]
186+
[TestMethod]
187187
[DataRow( CompilerType.Fast )]
188188
[DataRow( CompilerType.System )]
189189
[DataRow( CompilerType.Interpret )]
@@ -199,7 +199,7 @@ public void Compile_ShouldSucceed_BinaryExponentiation( CompilerType compiler )
199199
Assert.AreEqual( 8, result );
200200
}
201201

202-
[DataTestMethod]
202+
[TestMethod]
203203
[DataRow( CompilerType.Fast )]
204204
[DataRow( CompilerType.System )]
205205
[DataRow( CompilerType.Interpret )]
@@ -215,14 +215,15 @@ public void Compile_ShouldSucceed_BinaryExponentiation_WithGrouping( CompilerTyp
215215
Assert.AreEqual( 25, result );
216216
}
217217

218-
[DataTestMethod]
218+
[TestMethod]
219219
[DataRow( CompilerType.Fast )]
220220
[DataRow( CompilerType.System )]
221221
[DataRow( CompilerType.Interpret )]
222-
[ExpectedException( typeof( SyntaxException ) )]
223222
public void Compile_ShouldFail_WithInvalidOperator( CompilerType compiler )
224223
{
225-
try
224+
Assert.ThrowsExactly<SyntaxException>( () =>
225+
{
226+
try
226227
{
227228
Xs.Parse( "x = 5 $ 10;" );
228229
}
@@ -231,16 +232,18 @@ public void Compile_ShouldFail_WithInvalidOperator( CompilerType compiler )
231232
Console.WriteLine( ex.Message );
232233
throw;
233234
}
235+
} );
234236
}
235237

236-
[DataTestMethod]
238+
[TestMethod]
237239
[DataRow( CompilerType.Fast )]
238240
[DataRow( CompilerType.System )]
239241
[DataRow( CompilerType.Interpret )]
240-
[ExpectedException( typeof( SyntaxException ) )]
241242
public void Compile_ShouldFail_WithInvalidMathOperator( CompilerType compiler )
242243
{
243-
try
244+
Assert.ThrowsExactly<SyntaxException>( () =>
245+
{
246+
try
244247
{
245248
Xs.Parse( "5 ++ 10;" );
246249
}
@@ -249,16 +252,18 @@ public void Compile_ShouldFail_WithInvalidMathOperator( CompilerType compiler )
249252
Console.WriteLine( ex.Message );
250253
throw;
251254
}
255+
} );
252256
}
253257

254-
[DataTestMethod]
258+
[TestMethod]
255259
[DataRow( CompilerType.Fast )]
256260
[DataRow( CompilerType.System )]
257261
[DataRow( CompilerType.Interpret )]
258-
[ExpectedException( typeof( SyntaxException ) )]
259262
public void Compile_ShouldFail_WithInvalidGrouping( CompilerType compiler )
260263
{
261-
try
264+
Assert.ThrowsExactly<SyntaxException>( () =>
265+
{
266+
try
262267
{
263268
Xs.Parse( "(5 **) 2;" );
264269
}
@@ -267,16 +272,18 @@ public void Compile_ShouldFail_WithInvalidGrouping( CompilerType compiler )
267272
Console.WriteLine( ex.Message );
268273
throw;
269274
}
275+
} );
270276
}
271277

272-
[DataTestMethod]
278+
[TestMethod]
273279
[DataRow( CompilerType.Fast )]
274280
[DataRow( CompilerType.System )]
275281
[DataRow( CompilerType.Interpret )]
276-
[ExpectedException( typeof( SyntaxException ) )]
277282
public void Compile_ShouldFail_WithMissingRight( CompilerType compiler )
278283
{
279-
try
284+
Assert.ThrowsExactly<SyntaxException>( () =>
285+
{
286+
try
280287
{
281288
Xs.Parse( "5 +;" );
282289
}
@@ -285,5 +292,6 @@ public void Compile_ShouldFail_WithMissingRight( CompilerType compiler )
285292
Console.WriteLine( ex.Message );
286293
throw;
287294
}
295+
} );
288296
}
289297
}

test/Hyperbee.XS.Tests/XsParserTests.Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class XsParserExtensionsTests
1818
}
1919
);
2020

21-
[DataTestMethod]
21+
[TestMethod]
2222
[DataRow( CompilerType.Fast )]
2323
[DataRow( CompilerType.System )]
2424
[DataRow( CompilerType.Interpret )]

test/Hyperbee.XS.Tests/XsParserTests.Goto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class XsParserGotoTests
77
{
88
public static XsParser Xs { get; } = new();
99

10-
[DataTestMethod]
10+
[TestMethod]
1111
[DataRow( CompilerType.Fast )]
1212
[DataRow( CompilerType.System )]
1313
[DataRow( CompilerType.Interpret )]

0 commit comments

Comments
 (0)