Cosmos/Tests/Cosmos.Compiler.Tests.Bcl/Kernel.cs
fanoI ad960c9a1a Continuation of Float work
- Fixed Single.ToString() on special cases (infinities, NaN and 0) and aumented the range of printable values
- Fixed Double.ToString(): it always printed "Double Overrange" for a bug in opcode ldarga
- Fixed opcode ldarga: the displacement of the argument variable was off of 4 bytes
- Fixed opcodes shr, shr_un and shl when the shift was more that 32 bytes, added to BCL relative tests
- Added BLC tests regarding BitConverter and unsafe code
- Moved the meat of the code of Single.ToString() and Double.ToString() to the class StringHelper together with the analogous methods for numer types
- Re-added _floatsignbit to CosmosAssembler.cs so the neg test should not fail anymore
- Removed all code relative to x87 that I had left under #if false
- Clean up
2016-08-22 16:31:22 +02:00

61 lines
1.8 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.Bcl
{
using Cosmos.Compiler.Tests.Bcl.System;
public class Kernel : Sys.Kernel
{
protected override void BeforeRun()
{
Console.WriteLine("Cosmos booted successfully. Starting BCL tests now please wait...");
}
protected override void Run()
{
try
{
mDebugger.Send("Run");
CSharp.WhileLoopTests.Execute();
ObjectTests.Execute();
StringTest.Execute();
ByteTest.Execute();
SByteTest.Execute();
Int16Test.Execute();
UInt16Test.Execute();
Int32Test.Execute();
UInt32Test.Execute();
Int64Test.Execute();
UInt64Test.Execute();
CharTest.Execute();
BooleanTest.Execute();
SingleTest.Execute();
DoubleTest.Execute();
BitConverterTest.Execute();
UnsafeCodeTest.Execute();
#if false
DecimalTest.Execute();
System.Collections.Generic.ListTest.Execute();
System.Collections.Generic.QueueTest.Execute();
System.DelegatesTest.Execute();
System.UInt64Test.Execute();
#endif
TestController.Completed();
}
catch (Exception e)
{
Console.WriteLine("Exception occurred");
Console.WriteLine(e.Message);
mDebugger.Send("Exception occurred: " + e.Message);
TestController.Failed();
}
}
}
}