diff --git a/Tests/Cosmos.Compiler.Tests.Bcl/Cosmos.Compiler.Tests.Bcl.csproj b/Tests/Cosmos.Compiler.Tests.Bcl/Cosmos.Compiler.Tests.Bcl.csproj index da5b0cd84..a23c7aced 100644 --- a/Tests/Cosmos.Compiler.Tests.Bcl/Cosmos.Compiler.Tests.Bcl.csproj +++ b/Tests/Cosmos.Compiler.Tests.Bcl/Cosmos.Compiler.Tests.Bcl.csproj @@ -46,6 +46,7 @@ + diff --git a/Tests/Cosmos.Compiler.Tests.Bcl/Kernel.cs b/Tests/Cosmos.Compiler.Tests.Bcl/Kernel.cs index 2d932c702..722902bda 100644 --- a/Tests/Cosmos.Compiler.Tests.Bcl/Kernel.cs +++ b/Tests/Cosmos.Compiler.Tests.Bcl/Kernel.cs @@ -15,6 +15,7 @@ namespace Cosmos.Compiler.Tests.Bcl protected override void Run() { + System.StringTest.Execute(); System.Collections.Generic.ListTest.Execute(); System.Collections.Generic.QueueTest.Execute(); System.DelegatesTest.Execute(); diff --git a/Tests/Cosmos.Compiler.Tests.Bcl/System/DelegatesTest.cs b/Tests/Cosmos.Compiler.Tests.Bcl/System/DelegatesTest.cs index 5bfba9fe3..8760825c6 100644 --- a/Tests/Cosmos.Compiler.Tests.Bcl/System/DelegatesTest.cs +++ b/Tests/Cosmos.Compiler.Tests.Bcl/System/DelegatesTest.cs @@ -19,7 +19,7 @@ namespace Cosmos.Compiler.Tests.Bcl.System { mCount += 2; } - + public static void Execute() { TestDelegateWithoutArguments(); @@ -49,7 +49,7 @@ namespace Cosmos.Compiler.Tests.Bcl.System { mCount += number; } - + private static void TestDelegateWithArguments() { mCount = 0; @@ -64,4 +64,4 @@ namespace Cosmos.Compiler.Tests.Bcl.System Assert.AreEqual(3, mCount, "After calling delegate second time, Count != 3"); } } -} \ No newline at end of file +} diff --git a/Tests/Cosmos.Compiler.Tests.Bcl/System/StringTest.cs b/Tests/Cosmos.Compiler.Tests.Bcl/System/StringTest.cs new file mode 100644 index 000000000..e36319480 --- /dev/null +++ b/Tests/Cosmos.Compiler.Tests.Bcl/System/StringTest.cs @@ -0,0 +1,16 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Cosmos.TestRunner; + +namespace Cosmos.Compiler.Tests.Bcl.System +{ + public static class StringTest + { + public static void Execute() + { + Assert.IsTrue(("a" + "b") == "ab", "concatting 2 string using + doesn't work"); + Assert.IsTrue(("a" + 'b') == "ab", "concatting 1 string and 1 character doesn't work"); + } + } +} diff --git a/Tests/Cosmos.Kernel.Tests.Fat/Kernel.cs b/Tests/Cosmos.Kernel.Tests.Fat/Kernel.cs index 49af7fe65..9f6aec7aa 100644 --- a/Tests/Cosmos.Kernel.Tests.Fat/Kernel.cs +++ b/Tests/Cosmos.Kernel.Tests.Fat/Kernel.cs @@ -25,21 +25,22 @@ namespace Cosmos.Kernel.Tests.Fat protected override void Run() { mDebugger.Send("Run"); - var xRoot = Path.GetPathRoot(@"0:\test"); - bool xTest = Directory.Exists("0:\\test"); - Console.WriteLine("After test"); - Assert.IsTrue(xTest, "Folder does not exist!"); + //var xRoot = Path.GetPathRoot(@"0:\test"); + //bool xTest = Directory.Exists("0:\\test"); + //Console.WriteLine("After test"); + //Assert.IsTrue(xTest, "Folder does not exist!"); - Console.WriteLine("Folder exists!"); - xTest = Directory.Exists("0:\\test\\DirInTest"); - Assert.IsTrue(xTest, "Subfolder doesn't exist!"); + //Console.WriteLine("Folder exists!"); + //xTest = Directory.Exists("0:\\test\\DirInTest"); + //Assert.IsTrue(xTest, "Subfolder doesn't exist!"); - xTest = File.Exists(@"0:\KudzU.txt"); - Assert.IsTrue(xTest, @"\Kudzu.txt not found!"); + //var xTest = File.Exists(@"0:\Kudzu.txt"); + //Assert.IsTrue(xTest, @"\Kudzu.txt not found!"); - Console.WriteLine("Kudzu.txt found!"); - Console.Write("File contents of Kudzu.txt: "); - Console.WriteLine(File.ReadAllText(@"0:\Kudzu.txt")); + mDebugger.Send("File contents of Kudzu.txt: "); + var xContents = File.ReadAllText(@"0:\Kudzu.txt"); + mDebugger.Send("Contents retrieved"); + mDebugger.Send(xContents); // File.WriteAllText(@"0:\Kudzu.txt", "Test FAT write."); // Console.WriteLine(File.ReadAllText(@"0:\Kudzu.txt")); @@ -57,4 +58,4 @@ namespace Cosmos.Kernel.Tests.Fat } } -} \ No newline at end of file +} diff --git a/Tests/Cosmos.TestRunner/Program.cs b/Tests/Cosmos.TestRunner/Program.cs index 2c340615f..7b8f01ab4 100644 --- a/Tests/Cosmos.TestRunner/Program.cs +++ b/Tests/Cosmos.TestRunner/Program.cs @@ -19,27 +19,29 @@ namespace Cosmos.TestRunner.Console DefaultEngineConfiguration.Apply(xEngine); - var xOutputXml = new OutputHandlerXml(); - xEngine.OutputHandler = new MultiplexingOutputHandler( - xOutputXml, - new OutputHandlerFullConsole()); + //var xOutputXml = new OutputHandlerXml(); + //xEngine.OutputHandler = new MultiplexingOutputHandler( + // xOutputXml, + // new OutputHandlerFullConsole()); + + xEngine.OutputHandler = new OutputHandlerFullConsole(); xEngine.Execute(); global::System.Console.WriteLine("Do you want to save test run details?"); global::System.Console.Write("Type yes, or nothing to just exit: "); var xResult = global::System.Console.ReadLine(); - if (xResult != null && xResult.Trim().Equals("yes", StringComparison.OrdinalIgnoreCase)) - { - var xSaveDialog = new SaveFileDialog(); - xSaveDialog.Filter = "XML documents|*.xml"; - if (xSaveDialog.ShowDialog() != DialogResult.OK) - { - return; - } + //if (xResult != null && xResult.Trim().Equals("yes", StringComparison.OrdinalIgnoreCase)) + //{ + // var xSaveDialog = new SaveFileDialog(); + // xSaveDialog.Filter = "XML documents|*.xml"; + // if (xSaveDialog.ShowDialog() != DialogResult.OK) + // { + // return; + // } - xOutputXml.SaveToFile(xSaveDialog.FileName); - } + // xOutputXml.SaveToFile(xSaveDialog.FileName); + //} } } } diff --git a/source/Cosmos.Common/.editorconfig b/source/Cosmos.Common/.editorconfig new file mode 100644 index 000000000..b0b9cee45 --- /dev/null +++ b/source/Cosmos.Common/.editorconfig @@ -0,0 +1,2 @@ +[Extensions/ByteConverter.cs] +indent_size = 2 diff --git a/source/Cosmos.Common/Cosmos.Common.csproj b/source/Cosmos.Common/Cosmos.Common.csproj index 1e4c1926f..ce5504f8b 100644 --- a/source/Cosmos.Common/Cosmos.Common.csproj +++ b/source/Cosmos.Common/Cosmos.Common.csproj @@ -85,8 +85,15 @@ + + + + {61607F1E-58F9-41CF-972F-128384F3E115} + Cosmos.Debug.Kernel + +