Cosmos/Tests/Cosmos.Compiler.Tests.SimpleWriteLine.Kernel/Kernel.cs
2015-08-04 15:32:18 -04:00

44 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using Cosmos.Debug.Kernel;
using Cosmos.TestRunner;
using Sys = Cosmos.System;
namespace Cosmos.Compiler.Tests.SimpleWriteLine.Kernel
{
public class Kernel : Sys.Kernel
{
protected override void BeforeRun()
{
var xMessage = "Cosmos booted successfully. Type a line of text to get it echoed back.";
Console.WriteLine(xMessage);
Debugger.DoSend("After writeline");
}
protected override void Run()
{
Debugger.DoSend("In Run");
try
{
Console.WriteLine("Started correctly!");
object x = 42;
Console.WriteLine(x.ToString());
Console.WriteLine("Done doing tests");
Assert.IsTrue(true, "Dummy assertion, to test the system");
Debugger.DoSend("Test TryFinally now");
TestTryFinally.Execute();
Assert.IsTrue(InterruptsEnabled, "Interrupts are not enabled!");
TestController.Completed();
}
catch (Exception E)
{
Console.WriteLine("Exception");
Console.WriteLine(E.ToString());
}
}
}
}