From f9ce35693d24fa8d92b9a3a5ec424b68617d66b7 Mon Sep 17 00:00:00 2001 From: rivantsov Date: Sun, 10 Mar 2024 14:27:45 -0700 Subject: [PATCH] Minor config changes, updated package refs, added pe-verify fix --- Irony.Tests/040.Irony.Tests.VsTest.csproj | 8 +- Irony.Tests/050.Irony.Tests.NUnit.csproj | 8 +- Irony.Tests/CommentTerminalTests.cs | 3 +- Irony.Tests/DataLiteralsTests.cs | 1 + Irony.Tests/ErrorRecoveryTests.cs | 1 + Irony.Tests/EvaluatorTests.cs | 1 + Irony.Tests/FreeTextLiteralTests.cs | 3 +- Irony.Tests/HeredocTerminalTests.cs | 3 +- Irony.Tests/IdentifierTerminalTests.cs | 1 + Irony.Tests/IntegrationTests.cs | 1 + Irony.Tests/LineContinuationTests.cs | 1 + Irony.Tests/NewLineTests.cs | 3 +- Irony.Tests/NumberLiteralTests.cs | 1 + Irony.Tests/OperatorTests.cs | 3 +- Irony.Tests/ParseTreeSimplicityTests.cs | 3 +- Irony.Tests/RegExLiteralTests.cs | 3 +- Irony.Tests/StringLiteralTests.cs | 1 + Irony.Tests/TestHelper.cs | 3 +- .../ConflictResolutionTests.cs | 1 + Irony.sln | 14 +--- Irony/010.Irony.csproj | 1 + .../Refal.UnitTests.VsTest.csproj | 74 ++++++++++++++++++- 22 files changed, 110 insertions(+), 28 deletions(-) diff --git a/Irony.Tests/040.Irony.Tests.VsTest.csproj b/Irony.Tests/040.Irony.Tests.VsTest.csproj index 9c6d6f9..db4450f 100644 --- a/Irony.Tests/040.Irony.Tests.VsTest.csproj +++ b/Irony.Tests/040.Irony.Tests.VsTest.csproj @@ -1,7 +1,7 @@  - net8 + net8.0 Irony Irony.Tests.VsTest false @@ -25,9 +25,9 @@ - - - + + + diff --git a/Irony.Tests/050.Irony.Tests.NUnit.csproj b/Irony.Tests/050.Irony.Tests.NUnit.csproj index 24786bd..9f6c5ab 100644 --- a/Irony.Tests/050.Irony.Tests.NUnit.csproj +++ b/Irony.Tests/050.Irony.Tests.NUnit.csproj @@ -1,7 +1,7 @@  - net8 + net8.0 Irony.Tests Irony.Tests.NUnit false @@ -11,6 +11,10 @@ + + $(DefineConstants);USE_NUNIT + + @@ -20,7 +24,7 @@ - + diff --git a/Irony.Tests/CommentTerminalTests.cs b/Irony.Tests/CommentTerminalTests.cs index b03b939..5172c82 100644 --- a/Irony.Tests/CommentTerminalTests.cs +++ b/Irony.Tests/CommentTerminalTests.cs @@ -9,6 +9,7 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif @@ -21,7 +22,7 @@ public void TestCommentTerminal() { Parser parser; Token token; parser = TestHelper.CreateParser(new CommentTerminal("Comment", "/*", "*/")); - token = parser.ParseInput("/* abc */"); + token = parser.ParseInput("/* abc */"); Assert.IsTrue(token.Category == TokenCategory.Comment, "Failed to read comment"); parser = TestHelper.CreateParser(new CommentTerminal("Comment", "//", "\n")); diff --git a/Irony.Tests/DataLiteralsTests.cs b/Irony.Tests/DataLiteralsTests.cs index 6eb1e4d..8990f2f 100644 --- a/Irony.Tests/DataLiteralsTests.cs +++ b/Irony.Tests/DataLiteralsTests.cs @@ -10,6 +10,7 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/ErrorRecoveryTests.cs b/Irony.Tests/ErrorRecoveryTests.cs index 421587b..971ee55 100644 --- a/Irony.Tests/ErrorRecoveryTests.cs +++ b/Irony.Tests/ErrorRecoveryTests.cs @@ -10,6 +10,7 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/EvaluatorTests.cs b/Irony.Tests/EvaluatorTests.cs index b3dd542..219ef0d 100644 --- a/Irony.Tests/EvaluatorTests.cs +++ b/Irony.Tests/EvaluatorTests.cs @@ -12,6 +12,7 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/FreeTextLiteralTests.cs b/Irony.Tests/FreeTextLiteralTests.cs index f435b42..ada9792 100644 --- a/Irony.Tests/FreeTextLiteralTests.cs +++ b/Irony.Tests/FreeTextLiteralTests.cs @@ -9,10 +9,11 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif - + [TestClass] public class FreeTextLiteralTests { //A special grammar that does not skip whitespace diff --git a/Irony.Tests/HeredocTerminalTests.cs b/Irony.Tests/HeredocTerminalTests.cs index a448d8c..f5d33b1 100644 --- a/Irony.Tests/HeredocTerminalTests.cs +++ b/Irony.Tests/HeredocTerminalTests.cs @@ -10,8 +10,9 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else - using Microsoft.VisualStudio.TestTools.UnitTesting; + using Microsoft.VisualStudio.TestTools.UnitTesting; #endif //Currently not used, HereDocTerminal needs to be finished diff --git a/Irony.Tests/IdentifierTerminalTests.cs b/Irony.Tests/IdentifierTerminalTests.cs index eee45df..11a06e0 100644 --- a/Irony.Tests/IdentifierTerminalTests.cs +++ b/Irony.Tests/IdentifierTerminalTests.cs @@ -9,6 +9,7 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/IntegrationTests.cs b/Irony.Tests/IntegrationTests.cs index 156be83..98c4e15 100644 --- a/Irony.Tests/IntegrationTests.cs +++ b/Irony.Tests/IntegrationTests.cs @@ -13,6 +13,7 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/LineContinuationTests.cs b/Irony.Tests/LineContinuationTests.cs index 8a4c3b0..34a3d3e 100644 --- a/Irony.Tests/LineContinuationTests.cs +++ b/Irony.Tests/LineContinuationTests.cs @@ -9,6 +9,7 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/NewLineTests.cs b/Irony.Tests/NewLineTests.cs index d510e0b..94dd39e 100644 --- a/Irony.Tests/NewLineTests.cs +++ b/Irony.Tests/NewLineTests.cs @@ -5,7 +5,8 @@ namespace Irony.Tests { using NUnit.Framework; using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; - using TestInitialize = NUnit.Framework.SetUpAttribute; + using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/NumberLiteralTests.cs b/Irony.Tests/NumberLiteralTests.cs index a794b23..b462eea 100644 --- a/Irony.Tests/NumberLiteralTests.cs +++ b/Irony.Tests/NumberLiteralTests.cs @@ -11,6 +11,7 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/OperatorTests.cs b/Irony.Tests/OperatorTests.cs index 5ffd91f..02aef7a 100644 --- a/Irony.Tests/OperatorTests.cs +++ b/Irony.Tests/OperatorTests.cs @@ -6,10 +6,11 @@ namespace Irony.Tests { #if USE_NUNIT - using NUnit.Framework; + using NUnit.Framework; using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/ParseTreeSimplicityTests.cs b/Irony.Tests/ParseTreeSimplicityTests.cs index d863eb1..077a490 100644 --- a/Irony.Tests/ParseTreeSimplicityTests.cs +++ b/Irony.Tests/ParseTreeSimplicityTests.cs @@ -6,7 +6,8 @@ namespace Irony.Tests { using NUnit.Framework; using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; - using TestInitialize = NUnit.Framework.SetUpAttribute; + using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/RegExLiteralTests.cs b/Irony.Tests/RegExLiteralTests.cs index ff54591..0eb0109 100644 --- a/Irony.Tests/RegExLiteralTests.cs +++ b/Irony.Tests/RegExLiteralTests.cs @@ -10,10 +10,11 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif - + [TestClass] public class RegexLiteralTests { diff --git a/Irony.Tests/StringLiteralTests.cs b/Irony.Tests/StringLiteralTests.cs index 3dce6e6..a9b7beb 100644 --- a/Irony.Tests/StringLiteralTests.cs +++ b/Irony.Tests/StringLiteralTests.cs @@ -9,6 +9,7 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.Tests/TestHelper.cs b/Irony.Tests/TestHelper.cs index 780a0db..68ce149 100644 --- a/Irony.Tests/TestHelper.cs +++ b/Irony.Tests/TestHelper.cs @@ -11,10 +11,11 @@ namespace Irony.Tests { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif - + public static class TestHelper { //A skeleton for a grammar with a single terminal, followed by optional terminator class TerminalTestGrammar : Grammar { diff --git a/Irony.Tests/TokenPreviewResolution/ConflictResolutionTests.cs b/Irony.Tests/TokenPreviewResolution/ConflictResolutionTests.cs index e73cbab..e0a8d8d 100644 --- a/Irony.Tests/TokenPreviewResolution/ConflictResolutionTests.cs +++ b/Irony.Tests/TokenPreviewResolution/ConflictResolutionTests.cs @@ -11,6 +11,7 @@ namespace Irony.Tests.TokenPreviewResolution { using TestClass = NUnit.Framework.TestFixtureAttribute; using TestMethod = NUnit.Framework.TestAttribute; using TestInitialize = NUnit.Framework.SetUpAttribute; + using Assert = NUnit.Framework.Legacy.ClassicAssert; #else using Microsoft.VisualStudio.TestTools.UnitTesting; #endif diff --git a/Irony.sln b/Irony.sln index 73b1252..f575122 100644 --- a/Irony.sln +++ b/Irony.sln @@ -24,8 +24,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "030.Irony.GrammarExplorer", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "040.Irony.Tests.VsTest", "Irony.Tests\040.Irony.Tests.VsTest.csproj", "{0CFA8CEE-0110-49C1-93E5-CB7BE3A5716B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "050.Irony.Tests.NUnit", "Irony.Tests\050.Irony.Tests.NUnit.csproj", "{1A98BEDA-DF53-49B7-A366-2ED7606036BD}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Languages", "Languages", "{0850FA53-413E-4AF9-B918-8FF524FFA5D7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Refal", "Refal", "{FEE137AB-6C8B-4576-81BE-119DA16DCF78}" @@ -55,7 +53,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{44A7 Languages\Refal\UnitTests\Sources\xtras-factorial.ref = Languages\Refal\UnitTests\Sources\xtras-factorial.ref EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Refal.UnitTests.VsTest", "Languages\Refal.UnitTests\Refal.UnitTests.VsTest.csproj", "{94409071-FF65-4C3C-97EB-BD4FDEF90B4E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Refal.UnitTests.VsTest", "Languages\Refal.UnitTests\Refal.UnitTests.VsTest.csproj", "{94409071-FF65-4C3C-97EB-BD4FDEF90B4E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -139,16 +137,6 @@ Global {0CFA8CEE-0110-49C1-93E5-CB7BE3A5716B}.Silverlight Release|Any CPU.Build.0 = Release|Any CPU {0CFA8CEE-0110-49C1-93E5-CB7BE3A5716B}.SpecSharp|Any CPU.ActiveCfg = Release|Any CPU {0CFA8CEE-0110-49C1-93E5-CB7BE3A5716B}.SpecSharp|Any CPU.Build.0 = Release|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.FxCop|Any CPU.ActiveCfg = Release|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.FxCop|Any CPU.Build.0 = Release|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.Silverlight Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.Silverlight Debug|Any CPU.Build.0 = Debug|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.Silverlight Release|Any CPU.ActiveCfg = Release|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.Silverlight Release|Any CPU.Build.0 = Release|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.SpecSharp|Any CPU.ActiveCfg = Release|Any CPU - {1A98BEDA-DF53-49B7-A366-2ED7606036BD}.SpecSharp|Any CPU.Build.0 = Release|Any CPU {19A86418-BA99-41F4-80A5-A7F3A6383123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19A86418-BA99-41F4-80A5-A7F3A6383123}.Debug|Any CPU.Build.0 = Debug|Any CPU {19A86418-BA99-41F4-80A5-A7F3A6383123}.FxCop|Any CPU.ActiveCfg = Release|Any CPU diff --git a/Irony/010.Irony.csproj b/Irony/010.Irony.csproj index 40d10d9..6bf73cf 100644 --- a/Irony/010.Irony.csproj +++ b/Irony/010.Irony.csproj @@ -6,6 +6,7 @@ netstandard2.0 Irony Irony + peverify-compat Irony Parsing Framework diff --git a/Languages/Refal.UnitTests/Refal.UnitTests.VsTest.csproj b/Languages/Refal.UnitTests/Refal.UnitTests.VsTest.csproj index 10a20f9..2e943fe 100644 --- a/Languages/Refal.UnitTests/Refal.UnitTests.VsTest.csproj +++ b/Languages/Refal.UnitTests/Refal.UnitTests.VsTest.csproj @@ -2,7 +2,7 @@ net8 - Refal.UnitTests.VsTest + Refal.UnitTests Refal.UnitTests.VsTest false false @@ -11,6 +11,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +