mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Cosmos.Debug.Kernel;
|
|
|
|
namespace Cosmos.TestRunner
|
|
{
|
|
public static class TestController
|
|
{
|
|
internal static Debugger Debugger
|
|
{
|
|
get
|
|
{
|
|
return new Debugger("Tests", "TestController");
|
|
}
|
|
}
|
|
|
|
public const byte TestChannel = 255;
|
|
public static void Completed()
|
|
{
|
|
Console.WriteLine("Sending test completed now");
|
|
Debugger.SendChannelCommand(TestChannel, (byte)TestChannelCommandEnum.TestCompleted);
|
|
Debugger.Send("Test completed");
|
|
Console.WriteLine("Test completed");
|
|
while (true)
|
|
;
|
|
}
|
|
|
|
public static void Failed()
|
|
{
|
|
Debugger.Send("Failed");
|
|
Debugger.SendChannelCommand(TestChannel, (byte)TestChannelCommandEnum.TestFailed);
|
|
while (true)
|
|
;
|
|
}
|
|
|
|
internal static void AssertionSucceeded()
|
|
{
|
|
Debugger.SendChannelCommand(TestChannel, (byte)TestChannelCommandEnum.AssertionSucceeded);
|
|
}
|
|
}
|
|
}
|