From 3a9fe980238a927b4c451afbc440c512e15c08e8 Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Thu, 11 Jan 2024 21:35:56 +0400 Subject: [PATCH] Fix test cases initialization --- .../Tests.FlatArray.T/Cast/CanCastArray.cs | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/flatcollections-array/FlatArray.Tests/Tests.FlatArray.T/Cast/CanCastArray.cs b/src/flatcollections-array/FlatArray.Tests/Tests.FlatArray.T/Cast/CanCastArray.cs index 3afe633..f785a74 100644 --- a/src/flatcollections-array/FlatArray.Tests/Tests.FlatArray.T/Cast/CanCastArray.cs +++ b/src/flatcollections-array/FlatArray.Tests/Tests.FlatArray.T/Cast/CanCastArray.cs @@ -18,13 +18,13 @@ public void CanCastArray_ValueType_TypeTheSame_ExpectTrue(FlatArray source public static TheoryData> CanCastArray_ValueType_TypeTheSame_ExpectTrue_CaseSource => new() { { - default + Array.Empty().InitializeFlatArray() }, { - new FlatArray(1) + new byte[] { 1 }.InitializeFlatArray() }, { - new FlatArray(1, 2) + new byte[] { 1, 2 }.InitializeFlatArray() } }; @@ -39,13 +39,13 @@ public void CanCastArray_ValueType_TypeCompatible_ExpectTrue(FlatArray sou public static TheoryData> CanCastArray_ValueType_TypeCompatible_ExpectTrue_CaseSource => new() { { - default + Array.Empty().InitializeFlatArray() }, { - new FlatArray(1) + new byte[] { 1 }.InitializeFlatArray() }, { - new FlatArray(1, 2) + new byte[] { 1, 2 }.InitializeFlatArray() } }; @@ -60,13 +60,13 @@ public void CanCastArray_ValueType_TypeIncompatible_ExpectFalse(FlatArray public static TheoryData> CanCastArray_ValueType_TypeIncompatible_ExpectFalse_CaseSource => new() { { - default + Array.Empty().InitializeFlatArray() }, { - new FlatArray(1) + new byte[] { 1 }.InitializeFlatArray() }, { - new FlatArray(1, 2) + new byte[] { 1, 2 }.InitializeFlatArray() } }; @@ -83,16 +83,16 @@ public void CanCastArray_RefType_TypeTheSame_ExpectTrue(FlatArray source public static TheoryData> CanCastArray_RefType_TypeTheSame_ExpectTrue_CaseSource => new() { { - default + Array.Empty().InitializeFlatArray() }, { - new FlatArray("1") + new[] { "1" }.InitializeFlatArray() }, { - new FlatArray("1", "2") + new[] { "1", "2" }.InitializeFlatArray() }, { - new FlatArray(null!, "1", "2") + new[] { null!, "1", "2" }.InitializeFlatArray() } }; @@ -107,16 +107,16 @@ public void CanCastArray_RefType_TypeCompatible_ExpectTrue(FlatArray sou public static TheoryData> CanCastArray_RefType_TypeCompatible_ExpectTrue_CaseSource => new() { { - default + Array.Empty().InitializeFlatArray() }, { - new FlatArray("1") + new[] { "1" }.InitializeFlatArray() }, { - new FlatArray("1", "2") + new[] { "1", "2" }.InitializeFlatArray() }, { - new FlatArray(null!, "1", "2") + new[] { null!, "1", "2" }.InitializeFlatArray() } }; @@ -131,16 +131,16 @@ public void CanCastArray_RefType_TypeIncompatible_ExpectFalse(FlatArray public static TheoryData> CanCastArray_RefType_TypeIncompatible_ExpectFalse_CaseSource => new() { { - default + Array.Empty().InitializeFlatArray() }, { - new FlatArray(new object()) + new[] { new object() }.InitializeFlatArray() }, { - new FlatArray(new object(), new object()) + new[] { new object(), new object() }.InitializeFlatArray() }, { - new FlatArray(null!, new object(), new object()) + new[] { null!, new object(), new object() }.InitializeFlatArray() } }; }