Skip to content

Commit

Permalink
Added tests for Array.Empty<T>().
Browse files Browse the repository at this point in the history
  • Loading branch information
jp2masa committed Dec 3, 2018
1 parent 0d84f15 commit 3d3f032
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Tests/Kernels/Cosmos.Compiler.Tests.Bcl/System/ArrayTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
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
Expand All @@ -11,6 +8,12 @@ class ArrayTests
{
public static void Execute()
{
byte[] xEmptyByteArray = Array.Empty<byte>();
object[] xEmptyObjectArray = Array.Empty<object>();

Assert.IsTrue(xEmptyByteArray.Length == 0, "Array.Empty<byte> should return an empty array!");
Assert.IsTrue(xEmptyObjectArray.Length == 0, "Array.Empty<object> should return an empty array!");

byte[] xByteResult = { 1, 2, 3, 4, 5, 6, 7, 8 };
byte[] xByteExpectedResult = { 1, 2, 3, 4, 5, 6, 7, 1 };
byte[] xByteSource = { 1 };
Expand Down

0 comments on commit 3d3f032

Please sign in to comment.