mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 22:12:25 +00:00
- CosmosEncoding replacement of Encoding is not needed: Encoding runs perfectly on Cosmos! - Added tests to BCL for UTF8Encoding - StreamWriter does not needs a plug anymore, TextWriter is plugged instead but the plug is really the Ctor only - Commented COSMOSDEBUG
59 lines
1.7 KiB
C#
59 lines
1.7 KiB
C#
using System;
|
|
|
|
using Cosmos.System.FileSystem;
|
|
using Cosmos.System.FileSystem.VFS;
|
|
using Cosmos.TestRunner;
|
|
using Sys = Cosmos.System;
|
|
using Cosmos.Kernel.Tests.Fat.System.IO;
|
|
|
|
namespace Cosmos.Kernel.Tests.Fat
|
|
{
|
|
/// <summary>
|
|
/// The kernel implementation.
|
|
/// </summary>
|
|
/// <seealso cref="Cosmos.System.Kernel" />
|
|
public class Kernel : Sys.Kernel
|
|
{
|
|
private VFSBase mVFS;
|
|
|
|
/// <summary>
|
|
/// Pre-run events
|
|
/// </summary>
|
|
protected override void BeforeRun()
|
|
{
|
|
Console.WriteLine("Cosmos booted successfully, now start testing");
|
|
mVFS = new CosmosVFS();
|
|
VFSManager.RegisterVFS(mVFS);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Main kernel loop
|
|
/// </summary>
|
|
protected override void Run()
|
|
{
|
|
try
|
|
{
|
|
mDebugger.Send("Run");
|
|
|
|
PathTest.Execute(mDebugger);
|
|
DirectoryTest.Execute(mDebugger);
|
|
FileTest.Execute(mDebugger);
|
|
FileStreamTest.Execute(mDebugger);
|
|
DirectoryInfoTest.Execute(mDebugger);
|
|
StreamWriterTest.Execute(mDebugger);
|
|
//StreamReaderTest.Execute(mDebugger);
|
|
//BinaryWriterTest.Execute(mDebugger);
|
|
//BinaryReaderTest.Execute(mDebugger);
|
|
|
|
TestController.Completed();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Console.WriteLine("Exception occurred");
|
|
Console.WriteLine(e.ToString());
|
|
mDebugger.Send("Exception occurred: " + e.ToString());
|
|
TestController.Failed();
|
|
}
|
|
}
|
|
}
|
|
}
|