diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index 3adcfc2..a428f7d 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -46,7 +46,6 @@ jobs:
if: ${{ needs.discover.result == 'success' }}
uses: Stillpoint-Software/shared-workflows/.github/workflows/format.yml@main
with:
- dotnet_version: "9.0.x"
branch: ${{ needs.discover.outputs.branch_name }}
secrets: inherit
diff --git a/Directory.Build.props b/Directory.Build.props
index 9d51323..ceeb391 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,11 +1,11 @@
-
+
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -42,4 +42,9 @@
PackagePath="\"
Link="LICENSE" />
+
+
+ enable
+ net8.0;net9.0
+
diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 0000000..d2ba01c
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,60 @@
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Hyperbee.XS.sln b/Hyperbee.XS.sln
deleted file mode 100644
index 13a706f..0000000
--- a/Hyperbee.XS.sln
+++ /dev/null
@@ -1,105 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.0.31912.275
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{870D9301-BE3D-44EA-BF9C-FCC2E87FE4CD}"
- ProjectSection(SolutionItems) = preProject
- Directory.Build.props = Directory.Build.props
- LICENSE = LICENSE
- README.md = README.md
- version.json = version.json
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Tests", "Solution Tests", "{F9B24CD9-E06B-4834-84CB-8C29E5F10BE0}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1FA7CE2A-C9DA-4DC3-A242-5A7EAF8EE4FC}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{4DBDB7F5-3F66-4572-80B5-3322449C77A4}"
- ProjectSection(SolutionItems) = preProject
- .github\workflows\create_release.yml = .github\workflows\create_release.yml
- .github\workflows\create_test_report.yml = .github\workflows\create_test_report.yml
- .github\workflows\deploy-gh-pages.yml = .github\workflows\deploy-gh-pages.yml
- .github\workflows\format.yml = .github\workflows\format.yml
- .github\workflows\issue_branch.yml = .github\workflows\issue_branch.yml
- .github\workflows\pack_publish.yml = .github\workflows\pack_publish.yml
- .github\workflows\run_tests.yml = .github\workflows\run_tests.yml
- .github\workflows\unlist_package.yml = .github\workflows\unlist_package.yml
- EndProjectSection
-EndProject
-Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "docs", "docs\docs.shproj", "{FC3B0A95-4DA0-43A0-A19D-624152BDF2F6}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperbee.XS", "src\Hyperbee.XS\Hyperbee.XS.csproj", "{A46D7724-1D34-401E-B162-C1B9A318C45B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperbee.XS.Benchmark", "test\Hyperbee.XS.Benchmark\Hyperbee.XS.Benchmark.csproj", "{16749A0C-F550-49BA-9E13-3789924019AB}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperbee.XS.Tests", "test\Hyperbee.XS.Tests\Hyperbee.XS.Tests.csproj", "{636A48FD-43EA-472E-B2F6-1ED5109537DE}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperbee.Xs.Extensions", "src\Hyperbee.XS.Extensions\Hyperbee.Xs.Extensions.csproj", "{BDAA007B-08EF-437D-924F-216885EDECE7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperbee.XS.Extensions.Tests", "test\Hyperbee.XS.Extensions.Tests\Hyperbee.XS.Extensions.Tests.csproj", "{4ECD9E30-D79F-4333-88BE-495F515EC873}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperbee.Xs.Cli", "src\Hyperbee.XS.Cli\Hyperbee.Xs.Cli.csproj", "{552C7A2C-9F4D-4D4A-9C2C-CABC71559A79}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperbee.Xs.Interactive", "src\Hyperbee.XS.Interactive\Hyperbee.Xs.Interactive.csproj", "{71B6A746-FF3F-435E-8EAE-65039C0F34E1}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperbee.XS.Interactive.Tests", "test\Hyperbee.XS.Interactive.Tests\Hyperbee.XS.Interactive.Tests.csproj", "{92F65113-015D-8683-5CD4-57D748DB3B5D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A46D7724-1D34-401E-B162-C1B9A318C45B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A46D7724-1D34-401E-B162-C1B9A318C45B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A46D7724-1D34-401E-B162-C1B9A318C45B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A46D7724-1D34-401E-B162-C1B9A318C45B}.Release|Any CPU.Build.0 = Release|Any CPU
- {16749A0C-F550-49BA-9E13-3789924019AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {16749A0C-F550-49BA-9E13-3789924019AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {16749A0C-F550-49BA-9E13-3789924019AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {16749A0C-F550-49BA-9E13-3789924019AB}.Release|Any CPU.Build.0 = Release|Any CPU
- {636A48FD-43EA-472E-B2F6-1ED5109537DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {636A48FD-43EA-472E-B2F6-1ED5109537DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {636A48FD-43EA-472E-B2F6-1ED5109537DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {636A48FD-43EA-472E-B2F6-1ED5109537DE}.Release|Any CPU.Build.0 = Release|Any CPU
- {BDAA007B-08EF-437D-924F-216885EDECE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BDAA007B-08EF-437D-924F-216885EDECE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BDAA007B-08EF-437D-924F-216885EDECE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BDAA007B-08EF-437D-924F-216885EDECE7}.Release|Any CPU.Build.0 = Release|Any CPU
- {4ECD9E30-D79F-4333-88BE-495F515EC873}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4ECD9E30-D79F-4333-88BE-495F515EC873}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4ECD9E30-D79F-4333-88BE-495F515EC873}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4ECD9E30-D79F-4333-88BE-495F515EC873}.Release|Any CPU.Build.0 = Release|Any CPU
- {552C7A2C-9F4D-4D4A-9C2C-CABC71559A79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {552C7A2C-9F4D-4D4A-9C2C-CABC71559A79}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {552C7A2C-9F4D-4D4A-9C2C-CABC71559A79}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {552C7A2C-9F4D-4D4A-9C2C-CABC71559A79}.Release|Any CPU.Build.0 = Release|Any CPU
- {71B6A746-FF3F-435E-8EAE-65039C0F34E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {71B6A746-FF3F-435E-8EAE-65039C0F34E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {71B6A746-FF3F-435E-8EAE-65039C0F34E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {71B6A746-FF3F-435E-8EAE-65039C0F34E1}.Release|Any CPU.Build.0 = Release|Any CPU
- {92F65113-015D-8683-5CD4-57D748DB3B5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {92F65113-015D-8683-5CD4-57D748DB3B5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {92F65113-015D-8683-5CD4-57D748DB3B5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {92F65113-015D-8683-5CD4-57D748DB3B5D}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {1FA7CE2A-C9DA-4DC3-A242-5A7EAF8EE4FC} = {870D9301-BE3D-44EA-BF9C-FCC2E87FE4CD}
- {4DBDB7F5-3F66-4572-80B5-3322449C77A4} = {1FA7CE2A-C9DA-4DC3-A242-5A7EAF8EE4FC}
- {FC3B0A95-4DA0-43A0-A19D-624152BDF2F6} = {870D9301-BE3D-44EA-BF9C-FCC2E87FE4CD}
- {16749A0C-F550-49BA-9E13-3789924019AB} = {F9B24CD9-E06B-4834-84CB-8C29E5F10BE0}
- {636A48FD-43EA-472E-B2F6-1ED5109537DE} = {F9B24CD9-E06B-4834-84CB-8C29E5F10BE0}
- {4ECD9E30-D79F-4333-88BE-495F515EC873} = {F9B24CD9-E06B-4834-84CB-8C29E5F10BE0}
- {92F65113-015D-8683-5CD4-57D748DB3B5D} = {F9B24CD9-E06B-4834-84CB-8C29E5F10BE0}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {32874F5B-B467-4F28-A8E2-82C2536FB228}
- EndGlobalSection
- GlobalSection(SharedMSBuildProjectFiles) = preSolution
- docs\docs.projitems*{fc3b0a95-4da0-43a0-a19d-624152bdf2f6}*SharedItemsImports = 13
- EndGlobalSection
-EndGlobal
diff --git a/Hyperbee.XS.slnx b/Hyperbee.XS.slnx
new file mode 100644
index 0000000..5ce782e
--- /dev/null
+++ b/Hyperbee.XS.slnx
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Hyperbee.XS.Cli/Hyperbee.Xs.Cli.csproj b/src/Hyperbee.XS.Cli/Hyperbee.Xs.Cli.csproj
index be54443..672cda1 100644
--- a/src/Hyperbee.XS.Cli/Hyperbee.Xs.Cli.csproj
+++ b/src/Hyperbee.XS.Cli/Hyperbee.Xs.Cli.csproj
@@ -1,8 +1,6 @@
- net8.0;net9.0
- enable
disable
true
Exe
@@ -29,11 +27,11 @@
-
-
-
-
-
+
+
+
+
+
@@ -43,7 +41,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Hyperbee.XS.Extensions/Hyperbee.Xs.Extensions.csproj b/src/Hyperbee.XS.Extensions/Hyperbee.Xs.Extensions.csproj
index 254368d..f74ff5e 100644
--- a/src/Hyperbee.XS.Extensions/Hyperbee.Xs.Extensions.csproj
+++ b/src/Hyperbee.XS.Extensions/Hyperbee.Xs.Extensions.csproj
@@ -1,8 +1,6 @@
- net8.0;net9.0
- enable
disable
true
@@ -41,12 +39,12 @@
-
-
-
-
+
+
+
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Hyperbee.XS.Interactive/Hyperbee.Xs.Interactive.csproj b/src/Hyperbee.XS.Interactive/Hyperbee.Xs.Interactive.csproj
index 0590ddd..046c01f 100644
--- a/src/Hyperbee.XS.Interactive/Hyperbee.Xs.Interactive.csproj
+++ b/src/Hyperbee.XS.Interactive/Hyperbee.Xs.Interactive.csproj
@@ -1,8 +1,6 @@
- net8.0;net9.0
- enable
disable
true
@@ -25,10 +23,10 @@
-
-
-
-
+
+
+
+
@@ -46,7 +44,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -54,9 +52,7 @@
-
- 1.0.0-beta.25177.1
-
+
diff --git a/src/Hyperbee.XS/Hyperbee.XS.csproj b/src/Hyperbee.XS/Hyperbee.XS.csproj
index e830aa2..69cd1e5 100644
--- a/src/Hyperbee.XS/Hyperbee.XS.csproj
+++ b/src/Hyperbee.XS/Hyperbee.XS.csproj
@@ -1,8 +1,6 @@
- net8.0;net9.0
- enable
disable
true
@@ -41,16 +39,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/test/Hyperbee.XS.Benchmark/BenchmarkConfig.cs b/test/Hyperbee.XS.Benchmark/BenchmarkConfig.cs
index 6ff76db..bef3e85 100644
--- a/test/Hyperbee.XS.Benchmark/BenchmarkConfig.cs
+++ b/test/Hyperbee.XS.Benchmark/BenchmarkConfig.cs
@@ -1,6 +1,7 @@
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
+using BenchmarkDotNet.Environments;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Loggers;
@@ -15,7 +16,13 @@ public class Config : ManualConfig
{
public Config()
{
- AddJob( Job.ShortRun );
+ AddJob( Job.ShortRun
+ .WithRuntime( CoreRuntime.Core80 )
+ .WithId( ".NET 8" ) );
+
+ AddJob( Job.ShortRun
+ .WithRuntime( CoreRuntime.Core90 )
+ .WithId( ".NET 9" ) );
AddExporter( MarkdownExporter.GitHub );
AddValidator( JitOptimizationsValidator.DontFailOnError );
diff --git a/test/Hyperbee.XS.Benchmark/Hyperbee.XS.Benchmark.csproj b/test/Hyperbee.XS.Benchmark/Hyperbee.XS.Benchmark.csproj
index 86a75c8..11f5265 100644
--- a/test/Hyperbee.XS.Benchmark/Hyperbee.XS.Benchmark.csproj
+++ b/test/Hyperbee.XS.Benchmark/Hyperbee.XS.Benchmark.csproj
@@ -2,15 +2,13 @@
Exe
- net9.0
- enable
disable
false
-
-
+
+
@@ -18,7 +16,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/test/Hyperbee.XS.Extensions.Tests/DebugParseExtensionsTests.cs b/test/Hyperbee.XS.Extensions.Tests/DebugParseExtensionsTests.cs
index a116990..658ed9b 100644
--- a/test/Hyperbee.XS.Extensions.Tests/DebugParseExtensionsTests.cs
+++ b/test/Hyperbee.XS.Extensions.Tests/DebugParseExtensionsTests.cs
@@ -96,7 +96,7 @@ public void Debug_AllLanguageFeatures()
var result = compiled();
// Assertions for each feature
- Assert.AreEqual( 5, result.Count ); // total number of features
+ Assert.HasCount( 5, result ); // total number of features
Assert.AreEqual( 42, result[0] ); // If-Else logic
Assert.AreEqual( 42, result[1] ); // Switch-Case logic
diff --git a/test/Hyperbee.XS.Extensions.Tests/EnumerableExtensionsTests.cs b/test/Hyperbee.XS.Extensions.Tests/EnumerableExtensionsTests.cs
index 8ae7dbf..558bdb8 100644
--- a/test/Hyperbee.XS.Extensions.Tests/EnumerableExtensionsTests.cs
+++ b/test/Hyperbee.XS.Extensions.Tests/EnumerableExtensionsTests.cs
@@ -24,7 +24,7 @@ public void Compile_ShouldSucceed_WithEnumerableBlock()
var compiled = lambda.Compile();
var result = compiled().ToArray();
- Assert.AreEqual( 3, result.Length );
+ Assert.HasCount( 3, result );
Assert.AreEqual( 1, result[0] );
Assert.AreEqual( 2, result[1] );
Assert.AreEqual( 3, result[2] );
@@ -48,7 +48,7 @@ public void Compile_ShouldSucceed_WithEnumerableBlockBreak()
var compiled = lambda.Compile();
var result = compiled().ToArray();
- Assert.AreEqual( 2, result.Length );
+ Assert.HasCount( 2, result );
Assert.AreEqual( 1, result[0] );
Assert.AreEqual( 2, result[1] );
}
@@ -71,7 +71,7 @@ public void Compile_ShouldSucceed_WithComplexEnumerable()
var compiled = lambda.Compile();
var result = compiled().ToArray();
- Assert.AreEqual( 3, result.Length );
+ Assert.HasCount( 3, result );
Assert.AreEqual( 0, result[0] );
Assert.AreEqual( 1, result[1] );
Assert.AreEqual( 2, result[2] );
diff --git a/test/Hyperbee.XS.Extensions.Tests/Hyperbee.XS.Extensions.Tests.csproj b/test/Hyperbee.XS.Extensions.Tests/Hyperbee.XS.Extensions.Tests.csproj
index 91a7058..ac90ec4 100644
--- a/test/Hyperbee.XS.Extensions.Tests/Hyperbee.XS.Extensions.Tests.csproj
+++ b/test/Hyperbee.XS.Extensions.Tests/Hyperbee.XS.Extensions.Tests.csproj
@@ -1,8 +1,6 @@
- net8.0;net9.0
- enable
disable
false
true
@@ -10,13 +8,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -28,7 +26,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/test/Hyperbee.XS.Interactive.Tests/Hyperbee.XS.Interactive.Tests.csproj b/test/Hyperbee.XS.Interactive.Tests/Hyperbee.XS.Interactive.Tests.csproj
index 501fe2f..554f8eb 100644
--- a/test/Hyperbee.XS.Interactive.Tests/Hyperbee.XS.Interactive.Tests.csproj
+++ b/test/Hyperbee.XS.Interactive.Tests/Hyperbee.XS.Interactive.Tests.csproj
@@ -1,8 +1,6 @@
- net8.0;net9.0
- enable
disable
false
true
@@ -10,14 +8,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -30,16 +28,14 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
- 1.0.0-beta.25177.1
-
+
diff --git a/test/Hyperbee.XS.Interactive.Tests/SubmitCodeTests.cs b/test/Hyperbee.XS.Interactive.Tests/SubmitCodeTests.cs
index c110e6b..d3ea8c4 100644
--- a/test/Hyperbee.XS.Interactive.Tests/SubmitCodeTests.cs
+++ b/test/Hyperbee.XS.Interactive.Tests/SubmitCodeTests.cs
@@ -97,7 +97,7 @@ await _kernel.SubmitCodeAsync(
var displayResult = GetDisplayResult( events );
- Assert.AreEqual( 1, displayResult.Length );
+ Assert.HasCount( 1, displayResult );
Assert.AreEqual( "x:40", displayResult[0] );
events.Clear();
@@ -112,7 +112,7 @@ await _kernel.SubmitCodeAsync(
displayResult = GetDisplayResult( events );
- Assert.AreEqual( 1, displayResult.Length );
+ Assert.HasCount( 1, displayResult );
Assert.AreEqual( "x:42", displayResult[0] );
}
@@ -132,7 +132,7 @@ await _kernel.SubmitCodeAsync(
var displayResult = GetDisplayResult( events );
- Assert.AreEqual( 2, displayResult.Length );
+ Assert.HasCount( 2, displayResult );
Assert.AreEqual( "y:\"hello\"", displayResult[1] );
Assert.AreEqual( "x:123", displayResult[0] );
events.Clear();
@@ -147,7 +147,7 @@ await _kernel.SubmitCodeAsync(
displayResult = GetDisplayResult( events );
- Assert.AreEqual( 2, displayResult.Length );
+ Assert.HasCount( 2, displayResult );
Assert.AreEqual( "y:\"hello\"", displayResult[1] );
Assert.AreEqual( "x:\"world\"", displayResult[0] );
events.Clear();
@@ -178,7 +178,7 @@ await _kernel.SubmitCodeAsync(
var displayResult = GetDisplayResult( events );
- Assert.AreEqual( 2, displayResult.Length );
+ Assert.HasCount( 2, displayResult );
Assert.AreEqual( "simple:\"test\"", displayResult[0] );
Assert.AreEqual( "zSimple:\"test\"", displayResult[1] );
events.Clear();
diff --git a/test/Hyperbee.XS.Tests/Hyperbee.XS.Tests.csproj b/test/Hyperbee.XS.Tests/Hyperbee.XS.Tests.csproj
index b938296..e4ba120 100644
--- a/test/Hyperbee.XS.Tests/Hyperbee.XS.Tests.csproj
+++ b/test/Hyperbee.XS.Tests/Hyperbee.XS.Tests.csproj
@@ -1,8 +1,6 @@
- net8.0;net9.0
- enable
disable
false
true
@@ -10,12 +8,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -26,7 +24,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Complex.cs b/test/Hyperbee.XS.Tests/XsParserTests.Complex.cs
index a2ddc9f..d2e9588 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Complex.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Complex.cs
@@ -8,7 +8,7 @@ public class XsParserComplexTests
{
public static XsParser Xs { get; set; } = new( TestInitializer.XsConfig );
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -103,7 +103,7 @@ public void Compile_ShouldDemonstrateAllLanguageFeatures( CompilerType compiler
var result = function();
// Assertions for each feature
- Assert.AreEqual( 5, result.Count ); // total number of features
+ Assert.HasCount( 5, result ); // total number of features
Assert.AreEqual( 42, result[0] ); // If-Else logic
Assert.AreEqual( 42, result[1] ); // Switch-Case logic
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Conditional.cs b/test/Hyperbee.XS.Tests/XsParserTests.Conditional.cs
index b2e2d0d..cf25f08 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Conditional.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Conditional.cs
@@ -7,7 +7,7 @@ public class XsParserConditionalTests
{
public static XsParser Xs { get; } = new();
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -31,7 +31,7 @@ public void Compile_ShouldSucceed_WithoutBraces( CompilerType compiler )
Assert.AreEqual( 1, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -57,7 +57,7 @@ public void Compile_ShouldSucceed_WithConditional( CompilerType compiler )
Assert.AreEqual( "hello", result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -81,7 +81,7 @@ public void Compile_ShouldSucceed_WithConditionalAndNoElse( CompilerType compile
Assert.AreEqual( "hello", result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -108,7 +108,7 @@ public void Compile_ShouldSucceed_WithConditionalVariable( CompilerType compiler
Assert.AreEqual( "hello", result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -135,14 +135,13 @@ public void Compile_ShouldSucceed_WithConditionalAssignment( CompilerType compil
Assert.AreEqual( "hello", result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithMissingSemicolon( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
@@ -152,22 +151,17 @@ public void Compile_ShouldFail_WithMissingSemicolon( CompilerType compiler )
2;
x;
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithUnmatchedBraces( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
@@ -179,22 +173,17 @@ public void Compile_ShouldFail_WithUnmatchedBraces( CompilerType compiler )
"goodBye";
}
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidCondition( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
@@ -205,22 +194,17 @@ public void Compile_ShouldFail_WithInvalidCondition( CompilerType compiler )
"goodBye";
}
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidElse( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
@@ -231,12 +215,8 @@ public void Compile_ShouldFail_WithInvalidElse( CompilerType compiler )
else
"goodBye"
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
}
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Expression.cs b/test/Hyperbee.XS.Tests/XsParserTests.Expression.cs
index 09ca998..9ead517 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Expression.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Expression.cs
@@ -7,7 +7,7 @@ public class XsParserExpressionTests
{
public static XsParser Xs { get; } = new();
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -23,7 +23,7 @@ public void Compile_ShouldSucceed_Constant( CompilerType compiler )
Assert.AreEqual( 5, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -39,7 +39,7 @@ public void Compile_ShouldSucceed_UnaryNegate( CompilerType compiler )
Assert.AreEqual( 2, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -55,7 +55,7 @@ public void Compile_ShouldSucceed_UnaryNot( CompilerType compiler )
Assert.IsTrue( result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -71,7 +71,7 @@ public void Compile_ShouldSucceed_UnaryIsFalse( CompilerType compiler )
Assert.IsTrue( result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -87,7 +87,7 @@ public void Compile_ShouldSucceed_UnaryIsTrue( CompilerType compiler )
Assert.IsTrue( result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -103,7 +103,7 @@ public void Compile_ShouldSucceed_UnaryNot_Grouping( CompilerType compiler )
Assert.IsTrue( result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -119,7 +119,7 @@ public void Compile_ShouldSucceed_BinaryAdd( CompilerType compiler )
Assert.AreEqual( 22, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -135,7 +135,7 @@ public void Compile_ShouldSucceed_BinaryAdd_WithMultiple( CompilerType compiler
Assert.AreEqual( 36, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -151,7 +151,7 @@ public void Compile_ShouldSucceed_BinaryAdd_WithGrouping( CompilerType compiler
Assert.AreEqual( 44, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -167,7 +167,7 @@ public void Compile_ShouldSucceed_BinaryAdd_WithMultipleGrouping( CompilerType c
Assert.AreEqual( 44, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -183,7 +183,7 @@ public void Compile_ShouldSucceed_BinaryLessThan( CompilerType compiler )
Assert.IsTrue( result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -199,7 +199,7 @@ public void Compile_ShouldSucceed_BinaryExponentiation( CompilerType compiler )
Assert.AreEqual( 8, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -215,75 +215,55 @@ public void Compile_ShouldSucceed_BinaryExponentiation_WithGrouping( CompilerTyp
Assert.AreEqual( 25, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidOperator( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse( "x = 5 $ 10;" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidMathOperator( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse( "5 ++ 10;" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidGrouping( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse( "(5 **) 2;" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithMissingRight( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse( "5 +;" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
}
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Extensions.cs b/test/Hyperbee.XS.Tests/XsParserTests.Extensions.cs
index ab34c14..0ab0468 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Extensions.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Extensions.cs
@@ -18,7 +18,7 @@ public class XsParserExtensionsTests
}
);
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Goto.cs b/test/Hyperbee.XS.Tests/XsParserTests.Goto.cs
index 6ca218b..6b75517 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Goto.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Goto.cs
@@ -7,7 +7,7 @@ public class XsParserGotoTests
{
public static XsParser Xs { get; } = new();
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Indexers.cs b/test/Hyperbee.XS.Tests/XsParserTests.Indexers.cs
index 649e92d..75b2260 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Indexers.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Indexers.cs
@@ -7,7 +7,7 @@ public class XsParserIndexTests
{
public static XsParser Xs { get; set; } = new( TestInitializer.XsConfig );
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -27,7 +27,7 @@ public void Compile_ShouldSucceed_WithIndexResult( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -47,7 +47,7 @@ public void Compile_ShouldSucceed_WithMultiDimensionalIndexResult( CompilerType
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -66,7 +66,7 @@ public void Compile_ShouldSucceed_WithIndexChaining( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -86,26 +86,21 @@ public void Compile_ShouldSucceed_WithMethodChainingIndexResult( CompilerType co
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithUnclosedBracket( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
var x = new int[5;
x;
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
}
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Lambdas.cs b/test/Hyperbee.XS.Tests/XsParserTests.Lambdas.cs
index c054228..e980504 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Lambdas.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Lambdas.cs
@@ -7,7 +7,7 @@ public class XsParserLambdaTests
{
public static XsParser Xs { get; set; } = new( TestInitializer.XsConfig );
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -27,7 +27,7 @@ public void Compile_ShouldSucceed_WithResult( CompilerType compiler )
Assert.AreEqual( 1, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -47,7 +47,7 @@ public void Compile_ShouldSucceed_WithArgumentAndResult( CompilerType compiler )
Assert.AreEqual( 10, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -67,7 +67,7 @@ public void Compile_ShouldSucceed_WithReturnStatement( CompilerType compiler )
Assert.AreEqual( 13, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -88,7 +88,7 @@ public void Compile_ShouldSucceed_WithReferenceArgument( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -108,7 +108,7 @@ public void Compile_ShouldSucceed_WithMethodChaining( CompilerType compiler )
Assert.AreEqual( "42", result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -130,7 +130,7 @@ public void Compile_ShouldSucceed_WithLambdaArgument( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -153,70 +153,55 @@ public void Compile_ShouldSucceed_WithLambdaInvokeChaining( CompilerType compile
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidLambdaSyntax( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
var myLambda = ( int x => x;
myLambda( 10 );
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidLambdaBody( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
var myLambda = ( int x ) => { return x + ; };
myLambda( 10 );
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidLambdaParameter( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
var myLambda = ( int x, ) => x;
myLambda( 10 );
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
}
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Literal.cs b/test/Hyperbee.XS.Tests/XsParserTests.Literal.cs
index a401c24..eebf80b 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Literal.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Literal.cs
@@ -11,7 +11,7 @@ public class XsParserLiteralTests
{
public static XsParser Xs { get; } = new();
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -27,7 +27,7 @@ public void Parse_ShouldSucceed_WithStringLiteralDefault( CompilerType compiler
Assert.AreEqual( "Some String", result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -42,7 +42,7 @@ public void Parse_ShouldSucceed_WithCharLiteralDefault( CompilerType compiler )
Assert.AreEqual( 'c', result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -57,7 +57,7 @@ public void Parse_ShouldSucceed_WithIntegerLiteralDefault( CompilerType compiler
Assert.AreEqual( 12345, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -72,7 +72,7 @@ public void Parse_ShouldSucceed_WithIntegerLiteral( CompilerType compiler )
Assert.AreEqual( 12345, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -87,7 +87,7 @@ public void Parse_ShouldSucceed_WithLongLiteral( CompilerType compiler )
Assert.AreEqual( 12345L, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -102,7 +102,7 @@ public void Parse_ShouldSucceed_WithFloatLiteral( CompilerType compiler )
Assert.AreEqual( 123.45F, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -117,7 +117,7 @@ public void Parse_ShouldSucceed_WithDoubleLiteral( CompilerType compiler )
Assert.AreEqual( 123.45D, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -132,7 +132,7 @@ public void Parse_ShouldSucceed_WithDoubleLiteralResult( CompilerType compiler )
Assert.AreEqual( 123.45D, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -147,7 +147,7 @@ public void Parse_ShouldSucceed_WithLiteralMethodCallChaining( CompilerType comp
Assert.AreEqual( "123.45", result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -162,7 +162,7 @@ public void Parse_ShouldSucceed_WithLiteralGroupingMethodCallChaining( CompilerT
Assert.AreEqual( "130.45", result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -177,7 +177,7 @@ public void Parse_ShouldSucceed_WithLongAsForcedInt( CompilerType compiler )
Assert.AreEqual( 12345, result );
}
- [DataTestMethod]
+ [TestMethod]
//[DataRow( CompilerType.Fast )] // Issue: https://github.com/dadhi/FastExpressionCompiler/pull/456
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -192,7 +192,7 @@ public void Parse_ShouldSucceed_WithLongAsLong( CompilerType compiler )
Assert.AreEqual( 12345, result );
}
- [DataTestMethod]
+ [TestMethod]
//[DataRow( CompilerType.Fast )] // Issue: https://github.com/dadhi/FastExpressionCompiler/pull/456
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -204,10 +204,10 @@ public void Parse_ShouldSucceed_WithLongAsInt( CompilerType compiler )
var function = lambda.Compile( compiler );
var result = function();
- Assert.AreEqual( null, result );
+ Assert.IsNull( result );
}
- [DataTestMethod]
+ [TestMethod]
//[DataRow( CompilerType.Fast )] // Issue: https://github.com/dadhi/FastExpressionCompiler/pull/456
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -222,7 +222,7 @@ public void Parse_ShouldSucceed_WithLongAsIntFallback( CompilerType compiler )
Assert.AreEqual( 10, result );
}
- [DataTestMethod]
+ [TestMethod]
//[DataRow( CompilerType.Fast )] // Issue: https://github.com/dadhi/FastExpressionCompiler/pull/456
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -237,70 +237,55 @@ public void Parse_ShouldSucceed_WithLongIsLong( CompilerType compiler )
Assert.IsTrue( result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithUnclosedString( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
var x = "Hello;
x;
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithUnclosedParenthesis( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
var x = (5 + 10;
x;
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidCharacter( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
var x = 5 @ 10;
x;
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
}
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Loop.cs b/test/Hyperbee.XS.Tests/XsParserTests.Loop.cs
index 7ef8281..eeb1566 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Loop.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Loop.cs
@@ -7,7 +7,7 @@ public class XsParserLoopTests
{
public static XsParser Xs { get; } = new();
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -36,10 +36,9 @@ public void Compile_ShouldSucceed_WithLoop( CompilerType compiler )
}
[TestMethod]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithMissingBrace()
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
@@ -54,12 +53,8 @@ public void Compile_ShouldFail_WithMissingBrace()
x;
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
}
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Method.cs b/test/Hyperbee.XS.Tests/XsParserTests.Method.cs
index 1ba9aa3..f9aef5a 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Method.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Method.cs
@@ -7,7 +7,7 @@ public class XsParserMethodTests
{
public static XsParser Xs { get; set; } = new( TestInitializer.XsConfig );
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -27,7 +27,7 @@ public void Compile_ShouldSucceed_WithMethodCall( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -47,7 +47,7 @@ public void Compile_ShouldSucceed_WithMethodCallArgs( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -67,7 +67,7 @@ public void Compile_ShouldSucceed_WithGenericMethodCall( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -87,7 +87,7 @@ public void Compile_ShouldSucceed_WithGenericMethodCallTypeInference( CompilerTy
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -107,7 +107,7 @@ public void Compile_ShouldSucceed_WithMethodCallChaining( CompilerType compiler
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -127,7 +127,7 @@ public void Compile_ShouldSucceed_WithMethodCallPropertyChaining( CompilerType c
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -146,7 +146,7 @@ public void Compile_ShouldSucceed_WithStaticMethodCallArgs( CompilerType compile
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.New.cs b/test/Hyperbee.XS.Tests/XsParserTests.New.cs
index 1d92b4c..9a3fa2b 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.New.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.New.cs
@@ -7,7 +7,7 @@ public class XsParserNewTests
{
public static XsParser Xs { get; set; } = new( TestInitializer.XsConfig );
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -28,7 +28,7 @@ public void Compile_ShouldSucceed_WithNewExpression( CompilerType compiler )
Assert.AreEqual( 42, result.PropertyValue );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -55,7 +55,7 @@ public void Compile_ShouldSucceed_WithNewAndProperty( CompilerType compiler )
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -71,10 +71,10 @@ public void Compile_ShouldSucceed_WithNewArray( CompilerType compiler )
var function = lambda.Compile( compiler );
var result = function();
- Assert.AreEqual( 5, result.Length );
+ Assert.HasCount( 5, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -90,10 +90,10 @@ public void Compile_ShouldSucceed_WithNewMultiDimensionalArray( CompilerType com
var function = lambda.Compile( compiler );
var result = function();
- Assert.AreEqual( 10, result.Length );
+ Assert.HasCount( 10, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -111,10 +111,10 @@ public void Compile_ShouldSucceed_WithNewArrayInit( CompilerType compiler )
var function = lambda.Compile( compiler );
var result = function();
- Assert.AreEqual( 2, result.Length );
+ Assert.HasCount( 2, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -132,10 +132,10 @@ public void Compile_ShouldSucceed_WithNewListInit( CompilerType compiler )
var function = lambda.Compile( compiler );
var result = function();
- Assert.AreEqual( 2, result.Count );
+ Assert.HasCount( 2, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -157,17 +157,17 @@ public void Compile_ShouldSucceed_WithNewJaggedArray( CompilerType compiler )
var function = lambda.Compile( compiler );
var result = function();
- Assert.AreEqual( 3, result.Length );
- Assert.AreEqual( 3, result[0].Length );
+ Assert.HasCount( 3, result );
+ Assert.HasCount( 3, result[0] );
Assert.AreEqual( 10, result[0][0] );
- Assert.AreEqual( 2, result[1].Length );
+ Assert.HasCount( 2, result[1] );
Assert.AreEqual( 40, result[1][0] );
- Assert.AreEqual( 1, result[2].Length );
+ Assert.HasCount( 1, result[2] );
Assert.AreEqual( 60, result[2][0] );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -186,7 +186,7 @@ public void Compile_ShouldSucceed_WithGeneric( CompilerType compiler )
Assert.IsInstanceOfType>( result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -206,7 +206,7 @@ public void Compile_ShouldSucceed_WithDefaultValue( CompilerType compiler )
Assert.AreEqual( 0, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -226,14 +226,13 @@ public void Compile_ShouldSucceed_WithDefaultReference( CompilerType compiler )
Assert.IsNull( result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithDefaultInvalid( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
@@ -241,54 +240,40 @@ public void Compile_ShouldFail_WithDefaultInvalid( CompilerType compiler )
var y = default(wrong};
x + y;
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidImport( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
using ;
new TestClass(42);
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithInvalidImportMissingIdentifier( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse(
"""
using Hyperbee.XS.;
""" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
}
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Properties.cs b/test/Hyperbee.XS.Tests/XsParserTests.Properties.cs
index 0e3c413..1cd5d92 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Properties.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Properties.cs
@@ -7,7 +7,7 @@ public class XsParserPropertyTests
{
public static XsParser Xs { get; set; } = new( TestInitializer.XsConfig );
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -27,7 +27,7 @@ public void Compile_ShouldSucceed_WithPropertyResult( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -47,7 +47,7 @@ public void Compile_ShouldSucceed_WithPropertyChainingResult( CompilerType compi
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.RawString.cs b/test/Hyperbee.XS.Tests/XsParserTests.RawString.cs
index 90a8a07..d958abf 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.RawString.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.RawString.cs
@@ -8,7 +8,7 @@ public class XsParserRawStringTests
{
public static XsParser Xs { get; set; } = new( TestInitializer.XsConfig );
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -29,7 +29,7 @@ public void Parse_ShouldSucceed_WithRawStringLiteral( CompilerType compiler )
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Return.cs b/test/Hyperbee.XS.Tests/XsParserTests.Return.cs
index 95a61e9..1b75373 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Return.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Return.cs
@@ -8,7 +8,7 @@ public class XsParserReturnTests
{
public static XsParser Xs { get; } = new();
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -30,7 +30,7 @@ public void Compile_ShouldSucceed_WithVoidReturn( CompilerType compiler )
function(); // No exceptions should be thrown
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -54,7 +54,7 @@ public void Compile_ShouldSucceed_WithIntReturn( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -80,7 +80,7 @@ public void Compile_ShouldFail_WithVoidAndIntReturnTypeMismatch( CompilerType co
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -106,7 +106,7 @@ public void Compile_ShouldFail_WithMixedReturnTypes( CompilerType compiler )
}
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -133,7 +133,7 @@ public void Compile_ShouldSucceed_WithMatchingNestedReturns( CompilerType compil
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -158,7 +158,7 @@ public void Compile_ShouldSucceed_WithReturnInLoop( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -187,7 +187,7 @@ public void Compile_ShouldSucceed_WithReturnInSwitch( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Switch.cs b/test/Hyperbee.XS.Tests/XsParserTests.Switch.cs
index 9df1368..4ccec85 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Switch.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Switch.cs
@@ -7,7 +7,7 @@ public class XsParserSwitchTests
{
public static XsParser Xs { get; } = new();
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -39,7 +39,7 @@ public void Compile_ShouldSucceed_WithSwitchCaseOnly( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -68,7 +68,7 @@ public void Compile_ShouldSucceed_WithSwitchDefaultOnly( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -103,7 +103,7 @@ public void Compile_ShouldSucceed_WithSwitchCasesAndDefault( CompilerType compil
Assert.AreEqual( 20, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -141,7 +141,7 @@ public void Compile_ShouldSucceed_WithSwitchFallthroughToDefault( CompilerType c
Assert.AreEqual( 50, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -174,7 +174,7 @@ public void Compile_ShouldSucceed_WithSwitchMultipleCaseLabels( CompilerType com
Assert.AreEqual( 100, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.TryCatch.cs b/test/Hyperbee.XS.Tests/XsParserTests.TryCatch.cs
index 1168a9a..b751a5f 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.TryCatch.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.TryCatch.cs
@@ -8,7 +8,7 @@ public class XsParserTryCatchTests
{
public static XsParser Xs { get; } = new();
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -37,7 +37,7 @@ public void Compile_ShouldSucceed_WithTryCatch( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -66,7 +66,7 @@ public void Compile_ShouldSucceed_WithTryFinally( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -99,7 +99,7 @@ public void Compile_ShouldSucceed_WithTryCatchFinally( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -128,7 +128,7 @@ public void Compile_ShouldCatchException( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -161,7 +161,7 @@ public void Compile_ShouldHandleMultipleCatchBlocks( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -197,7 +197,7 @@ public void Compile_ShouldSucceed_WithNestedTryCatch( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -234,7 +234,7 @@ public void Compile_ShouldRethrowException( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -271,7 +271,7 @@ public void Compile_ShouldThrowNewException( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
diff --git a/test/Hyperbee.XS.Tests/XsParserTests.Variables.cs b/test/Hyperbee.XS.Tests/XsParserTests.Variables.cs
index e47180f..942f39b 100644
--- a/test/Hyperbee.XS.Tests/XsParserTests.Variables.cs
+++ b/test/Hyperbee.XS.Tests/XsParserTests.Variables.cs
@@ -7,7 +7,7 @@ public class XsParserVariableTests
{
public static XsParser Xs { get; set; } = new( TestInitializer.XsConfig );
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -22,7 +22,7 @@ public void Compile_ShouldSucceed_WithVariable( CompilerType compiler )
Assert.IsNotNull( function );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -38,7 +38,7 @@ public void Compile_ShouldSucceed_WithVariableAndResult( CompilerType compiler )
Assert.AreEqual( 20, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -54,7 +54,7 @@ public void Compile_ShouldSucceed_WithVariableAndAssignmentResult( CompilerType
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -70,7 +70,7 @@ public void Compile_ShouldSucceed_WithVariableShiftLeftResult( CompilerType comp
Assert.AreEqual( 8, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -86,7 +86,7 @@ public void Compile_ShouldSucceed_WithVariableShiftRightResult( CompilerType com
Assert.AreEqual( 32, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -106,7 +106,7 @@ public void Compile_ShouldSucceed_WithVariableComplementResult( CompilerType com
Assert.AreEqual( 0, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -122,7 +122,7 @@ public void Compile_ShouldSucceed_WithVariableAndPostResult( CompilerType compil
Assert.AreEqual( 10, result ); // x++ returns the value before increment
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -138,7 +138,7 @@ public void Compile_ShouldSucceed_WithVariableAndPrefixResult( CompilerType comp
Assert.AreEqual( 11, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -154,7 +154,7 @@ public void Compile_ShouldSucceed_WithVariableAddAssignment( CompilerType compil
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -170,7 +170,7 @@ public void Compile_ShouldSucceed_WithVariableSubtractAssignment( CompilerType c
Assert.AreEqual( 10, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -186,7 +186,7 @@ public void Compile_ShouldSucceed_WithVariableMultiplyAssignment( CompilerType c
Assert.AreEqual( 40, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -202,7 +202,7 @@ public void Compile_ShouldSucceed_WithVariableDivideAssignment( CompilerType com
Assert.AreEqual( 10, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -218,7 +218,7 @@ public void Compile_ShouldSucceed_WithVariableExponentAssignment( CompilerType c
Assert.AreEqual( 8, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -240,7 +240,7 @@ public void Compile_ShouldSucceed_WithPropertyAssignment( CompilerType compiler
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -262,7 +262,7 @@ public void Compile_ShouldSucceed_WithPropertyComplexAssignment( CompilerType co
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -284,7 +284,7 @@ public void Compile_ShouldSucceed_WithIndexerAssignment( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
@@ -302,21 +302,16 @@ public void Compile_ShouldAllowDoubleAssignment( CompilerType compiler )
Assert.AreEqual( 42, result );
}
- [DataTestMethod]
+ [TestMethod]
[DataRow( CompilerType.Fast )]
[DataRow( CompilerType.System )]
[DataRow( CompilerType.Interpret )]
- [ExpectedException( typeof( SyntaxException ) )]
public void Compile_ShouldFail_WithDefaultInvalid( CompilerType compiler )
{
- try
+ var ex = Assert.Throws( () =>
{
Xs.Parse( "var x ~ 10;" );
- }
- catch ( SyntaxException ex )
- {
- Console.WriteLine( ex.Message );
- throw;
- }
+ } );
+ Console.WriteLine( ex.Message );
}
}