Minor tweaks to tests

This commit is contained in:
Tony Bark 2023-01-02 16:47:31 -05:00
parent f069c20616
commit 3e3958c67f
7 changed files with 29 additions and 35 deletions

View file

@ -2,7 +2,8 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
<RootNamespace>SimAntics.Tests</RootNamespace>

View file

@ -1,16 +0,0 @@
using System;
using Xunit;
namespace SimAI.Tests;
public class UnitTest1
{
[Fact]
public void Test1()
{
var clock = new VMClock();
Console.WriteLine(clock.Ticks);
clock.Tick();
Console.WriteLine(clock.Ticks);
}
}

View file

@ -0,0 +1,16 @@
using System.Diagnostics;
using Xunit;
namespace SimAI.Tests;
public class VMClockTest
{
[Fact]
public void TickTest()
{
var clock = new VMClock();
Debug.WriteLine(clock.Ticks);
clock.Tick();
Debug.WriteLine(clock.Ticks);
}
}

View file

@ -3,9 +3,9 @@
// http://mozilla.org/MPL/2.0/.
namespace SimAI.Tests;
public class VMTest
{
public VMTest()
{
}
}
public class VMTest
{
public VMTest()
{
}
}

View file

@ -18,10 +18,7 @@ public class VMScheduler
public bool RunningNow { get; set; }
public VMScheduler(VM vm)
{
VM = vm;
}
public VMScheduler(VM vm) => VM = vm;
public void ScheduleTickIn(VMEntity _ent, uint delay)
{

View file

@ -168,10 +168,6 @@ public class VMStackFrame
ActionTree = input.ActionTree;
}
public VMStackFrame(VMStackFrameMarshal input, VMContext context, VMThread thread)
{
Thread = thread;
// Load(input, context);
}
#endregion
}
public VMStackFrame(VMStackFrameMarshal input, VMContext context, VMThread thread) => Thread = thread;// Load(input, context);
#endregion
}

View file

@ -19,7 +19,7 @@ public class VMStackFrameMarshal
public int Version { get; set; }
public VMStackFrameMarshal() { }
public VMStackFrameMarshal(int version) { Version = version; }
public VMStackFrameMarshal(int version) => Version = version;
public virtual void Deserialize(BinaryReader reader)
{