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 45743444f..54ed68e7c 100644 --- a/Tests/Cosmos.Compiler.Tests.Bcl/Cosmos.Compiler.Tests.Bcl.csproj +++ b/Tests/Cosmos.Compiler.Tests.Bcl/Cosmos.Compiler.Tests.Bcl.csproj @@ -83,6 +83,7 @@ + diff --git a/Tests/Cosmos.Compiler.Tests.Bcl/Kernel.cs b/Tests/Cosmos.Compiler.Tests.Bcl/Kernel.cs index 094393550..1014b705f 100644 --- a/Tests/Cosmos.Compiler.Tests.Bcl/Kernel.cs +++ b/Tests/Cosmos.Compiler.Tests.Bcl/Kernel.cs @@ -25,6 +25,7 @@ namespace Cosmos.Compiler.Tests.Bcl CSharp.WhileLoopTests.Execute(); //ObjectTests.Execute(); Stack corruption on method Clone() + ArrayTests.Execute(); StringTest.Execute(); ByteTest.Execute(); SByteTest.Execute(); diff --git a/Tests/Cosmos.Compiler.Tests.Bcl/System/ArrayTests.cs b/Tests/Cosmos.Compiler.Tests.Bcl/System/ArrayTests.cs new file mode 100644 index 000000000..61437fe32 --- /dev/null +++ b/Tests/Cosmos.Compiler.Tests.Bcl/System/ArrayTests.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Cosmos.TestRunner; + +namespace Cosmos.Compiler.Tests.Bcl.System +{ + class ArrayTests + { + public static void Execute() + { + byte[] xResult = { 1, 2, 3, 4, 5, 6, 7, 8 }; + byte[] xExpectedResult = { 1, 2, 3, 4, 5, 6, 7, 1 }; + byte[] xSource = { 1 }; + + Array.Copy(xSource, 0, xResult, 7, 1); + + Assert.IsTrue((xResult[7] == xExpectedResult[7]), "Array.Copy doesn't work: xResult[7] " + (uint)xResult[7] + " != " + (uint)xExpectedResult[7]); + } + } +}