mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-08 23:43:18 +02:00
Upgrade to .NET 8 and code cleanup
This commit is contained in:
@@ -10,28 +10,28 @@ public class CodeFlowTests
|
||||
[TestMethod]
|
||||
public void FunctionTest()
|
||||
{
|
||||
List<string> lines = new List<string>()
|
||||
{
|
||||
List<string> lines =
|
||||
[
|
||||
"cal yes",
|
||||
"fnc yes",
|
||||
"!<result = 1",
|
||||
"ret",
|
||||
">result"
|
||||
};
|
||||
];
|
||||
YesNtAssert.IsLastLineEqual(lines, "1");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void LabelsTest()
|
||||
{
|
||||
List<string> lines = new List<string>()
|
||||
{
|
||||
List<string> lines =
|
||||
[
|
||||
"<result = 1",
|
||||
"jmp yes",
|
||||
"<result = 0",
|
||||
"lbl yes",
|
||||
">result"
|
||||
};
|
||||
];
|
||||
YesNtAssert.IsLastLineEqual(lines, "1");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
@@ -42,10 +42,10 @@ internal static class YesNtAssert
|
||||
public static void IsLineEqual(string line, string expected, int timeout = 1000)
|
||||
{
|
||||
AutoResetEvent onDone = new AutoResetEvent(false);
|
||||
List<string> lines = new List<string>()
|
||||
{
|
||||
List<string> lines =
|
||||
[
|
||||
line
|
||||
};
|
||||
];
|
||||
|
||||
DebugEventArgs debugEventArgs = new DebugEventArgs();
|
||||
yesNtInterpreter.OnLineExecuted += (er) =>
|
||||
@@ -64,10 +64,10 @@ internal static class YesNtAssert
|
||||
public static void IsLineNotEqual(string line, string expected, int timeout = 1000)
|
||||
{
|
||||
AutoResetEvent onDone = new AutoResetEvent(false);
|
||||
List<string> lines = new List<string>()
|
||||
{
|
||||
List<string> lines =
|
||||
[
|
||||
line
|
||||
};
|
||||
];
|
||||
|
||||
DebugEventArgs debugEventArgs = new DebugEventArgs();
|
||||
yesNtInterpreter.OnLineExecuted += (er) =>
|
||||
|
||||
Reference in New Issue
Block a user