From f9831cb06fea84a17bf71e1b0c6618ef504656ea Mon Sep 17 00:00:00 2001 From: Ivan Murashka Date: Fri, 4 Jul 2025 11:53:21 +0200 Subject: [PATCH 1/2] update unity to 6000.0.51f1 --- .BinaryPrefs/Packages/manifest.json | 11 ++-- .BinaryPrefs/Packages/packages-lock.json | 62 ++++++++++++------- .../ProjectSettings/MultiplayerManager.asset | 7 +++ .../ProjectSettings/ProjectVersion.txt | 4 +- 4 files changed, 56 insertions(+), 28 deletions(-) create mode 100644 .BinaryPrefs/ProjectSettings/MultiplayerManager.asset diff --git a/.BinaryPrefs/Packages/manifest.json b/.BinaryPrefs/Packages/manifest.json index d5e4f38..d3846a7 100644 --- a/.BinaryPrefs/Packages/manifest.json +++ b/.BinaryPrefs/Packages/manifest.json @@ -3,13 +3,14 @@ "com.appegy.binary-prefs": "file:../..", "com.boundfoxstudios.fluentassertions": "6.8.0", "com.unity.2d.sprite": "1.0.0", - "com.unity.ide.rider": "3.0.31", - "com.unity.mobile.android-logcat": "1.4.3", - "com.unity.test-framework": "2.0.1-pre.18", - "com.unity.textmeshpro": "3.0.9", - "com.unity.ugui": "1.0.0", + "com.unity.ide.rider": "3.0.36", + "com.unity.mobile.android-logcat": "1.4.5", + "com.unity.multiplayer.center": "1.0.0", + "com.unity.test-framework": "1.5.1", + "com.unity.ugui": "2.0.0", "com.yasirkula.ingamedebugconsole": "https://github.com/yasirkula/UnityIngameDebugConsole.git", "net.tnrd.nsubstitute": "5.1.0", + "com.unity.modules.accessibility": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", "com.unity.modules.audio": "1.0.0", diff --git a/.BinaryPrefs/Packages/packages-lock.json b/.BinaryPrefs/Packages/packages-lock.json index 601cde3..f9855e0 100644 --- a/.BinaryPrefs/Packages/packages-lock.json +++ b/.BinaryPrefs/Packages/packages-lock.json @@ -20,14 +20,13 @@ "dependencies": {} }, "com.unity.ext.nunit": { - "version": "2.0.2", + "version": "2.0.5", "depth": 1, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" + "source": "builtin", + "dependencies": {} }, "com.unity.ide.rider": { - "version": "3.0.31", + "version": "3.0.36", "depth": 0, "source": "registry", "dependencies": { @@ -36,34 +35,32 @@ "url": "https://packages.unity.com" }, "com.unity.mobile.android-logcat": { - "version": "1.4.3", + "version": "1.4.5", "depth": 0, "source": "registry", "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.test-framework": { - "version": "2.0.1-pre.18", + "com.unity.multiplayer.center": { + "version": "1.0.0", "depth": 0, - "source": "registry", + "source": "builtin", "dependencies": { - "com.unity.ext.nunit": "2.0.2", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0" - }, - "url": "https://packages.unity.com" + "com.unity.modules.uielements": "1.0.0" + } }, - "com.unity.textmeshpro": { - "version": "3.0.9", + "com.unity.test-framework": { + "version": "1.5.1", "depth": 0, - "source": "registry", + "source": "builtin", "dependencies": { - "com.unity.ugui": "1.0.0" - }, - "url": "https://packages.unity.com" + "com.unity.ext.nunit": "2.0.3", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } }, "com.unity.ugui": { - "version": "1.0.0", + "version": "2.0.0", "depth": 0, "source": "builtin", "dependencies": { @@ -85,6 +82,12 @@ "dependencies": {}, "url": "https://package.openupm.com" }, + "com.unity.modules.accessibility": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, "com.unity.modules.androidjni": { "version": "1.0.0", "depth": 0, @@ -103,6 +106,12 @@ "source": "builtin", "dependencies": {} }, + "com.unity.modules.hierarchycore": { + "version": "1.0.0", + "depth": 2, + "source": "builtin", + "dependencies": {} + }, "com.unity.modules.imgui": { "version": "1.0.0", "depth": 0, @@ -120,6 +129,17 @@ "depth": 0, "source": "builtin", "dependencies": {} + }, + "com.unity.modules.uielements": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.hierarchycore": "1.0.0" + } } } } diff --git a/.BinaryPrefs/ProjectSettings/MultiplayerManager.asset b/.BinaryPrefs/ProjectSettings/MultiplayerManager.asset new file mode 100644 index 0000000..2a93664 --- /dev/null +++ b/.BinaryPrefs/ProjectSettings/MultiplayerManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!655991488 &1 +MultiplayerManager: + m_ObjectHideFlags: 0 + m_EnableMultiplayerRoles: 0 + m_StrippingTypes: {} diff --git a/.BinaryPrefs/ProjectSettings/ProjectVersion.txt b/.BinaryPrefs/ProjectSettings/ProjectVersion.txt index 094355e..fd14568 100644 --- a/.BinaryPrefs/ProjectSettings/ProjectVersion.txt +++ b/.BinaryPrefs/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2022.3.42f1 -m_EditorVersionWithRevision: 2022.3.42f1 (2dcb6a0abc42) +m_EditorVersion: 6000.0.51f1 +m_EditorVersionWithRevision: 6000.0.51f1 (01c3ff5872c5) From b5b155e746d4232399b98443f6c67398f4767cb6 Mon Sep 17 00:00:00 2001 From: Ivan Murashka Date: Fri, 4 Jul 2025 11:53:31 +0200 Subject: [PATCH 2/2] fix tests after framework update --- Tests/TypeSerializers/BooleanSerializer.cs | 9 +- .../ByteTypeSerializerTests.cs | 23 +-- .../CharTypeSerializerTests.cs | 44 +++-- .../DateTimeTypeSerializerTests.cs | 27 +-- .../DecimalTypeSerializerTests.cs | 27 +-- .../DoubleTypeSerializerTests.cs | 25 +-- .../EnumByteTypeSerializerTests.cs | 171 ++++++------------ .../Int16TypeSerializerTests.cs | 23 +-- .../Int32TypeSerializerTests.cs | 21 ++- .../Int64TypeSerializerTests.cs | 21 ++- .../KeyValueTypeSerializerTests.cs | 24 +-- .../QuaternionTypeSerializerTests.cs | 69 +++---- .../SByteTypeSerializerTests.cs | 23 +-- .../SingleTypeSerializerTests.cs | 25 +-- .../StringTypeSerializerTests.cs | 51 +++--- .../TimeSpanTypeSerializerTests.cs | 25 +-- .../UInt16TypeSerializerTests.cs | 17 +- .../UInt32TypeSerializerTests.cs | 17 +- .../UInt64TypeSerializerTests.cs | 17 +- .../Vector2IntTypeSerializerTests.cs | 61 ++++--- .../Vector2TypeSerializerTests.cs | 47 ++--- .../Vector3IntTypeSerializerTests.cs | 63 +++---- .../Vector3TypeSerializerTests.cs | 57 +++--- .../Vector4TypeSerializerTests.cs | 51 +++--- 24 files changed, 450 insertions(+), 488 deletions(-) diff --git a/Tests/TypeSerializers/BooleanSerializer.cs b/Tests/TypeSerializers/BooleanSerializer.cs index 4bfb6cd..5fc64e5 100644 --- a/Tests/TypeSerializers/BooleanSerializer.cs +++ b/Tests/TypeSerializers/BooleanSerializer.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,13 +7,13 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class BooleanTypeSerializerTests : BaseTypeSerializerTests { - private static bool[] Inputs => new[] + private static IEnumerable Inputs => new[] { - true, // true boolean value - false, // false boolean value + new object[] { true, "true" }, + new object[] { false, "false" } }; - public BooleanTypeSerializerTests(bool value) : base(value) + public BooleanTypeSerializerTests(bool value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/ByteTypeSerializerTests.cs b/Tests/TypeSerializers/ByteTypeSerializerTests.cs index b7ad1af..fe2de77 100644 --- a/Tests/TypeSerializers/ByteTypeSerializerTests.cs +++ b/Tests/TypeSerializers/ByteTypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,20 +7,20 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class ByteTypeSerializerTests : BaseTypeSerializerTests { - private static byte[] Inputs => new[] + private static IEnumerable Inputs => new[] { - byte.MinValue, // 0 - byte.MaxValue, // 255 - (byte)1, // Smallest positive byte - (byte)127, // Middle value - (byte)64, // Power of two - (byte)3, // Just below a power of two - (byte)10, // Random small value - (byte)100, // Random middle value - (byte)200, // Random large value + new object[] { byte.MinValue, "min" }, + new object[] { byte.MaxValue, "max" }, + new object[] { (byte)1, "one" }, + new object[] { (byte)127, "mid" }, + new object[] { (byte)64, "pow2" }, + new object[] { (byte)3, "below_pow2" }, + new object[] { (byte)10, "small" }, + new object[] { (byte)100, "middle" }, + new object[] { (byte)200, "large" } }; - public ByteTypeSerializerTests(byte value) : base(value) + public ByteTypeSerializerTests(byte value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/CharTypeSerializerTests.cs b/Tests/TypeSerializers/CharTypeSerializerTests.cs index 01102a5..380b0c2 100644 --- a/Tests/TypeSerializers/CharTypeSerializerTests.cs +++ b/Tests/TypeSerializers/CharTypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,32 +7,29 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class CharTypeSerializerTests : BaseTypeSerializerTests { - private static char[] Inputs => new[] + private static IEnumerable Inputs => new[] { - '\t', // tab - '\n', // newline - '\r', // carriage return - '\u00E9', // Unicode character é - '\u20AC', // Euro sign € - '\u3042', // Hiragana letter A - //'\uD83D', // Emoji - '\u0001', // ASCII control character (Start of Heading) - '\u4E9C', // Han character 亜 - 'a', // lowercase letter - 'Z', // uppercase letter - '5', // digit - ' ', // space - '!', // exclamation mark - 'g', // latin - 'ў', // cyrillic - '里', // chinese simplified - '爾', // chinese traditional - 'ة', // arabic - // TODO: this one currently breaks tests - //'\0', + new object[] { '\t', "tab" }, + new object[] { '\n', "newline" }, + new object[] { '\r', "carriage_return" }, + new object[] { '\u00E9', "unicode_e" }, + new object[] { '\u20AC', "euro" }, + new object[] { '\u3042', "hiragana_a" }, + new object[] { '\u0001', "ctrl_soh" }, + new object[] { '\u4E9C', "han_1" }, + new object[] { 'a', "a" }, + new object[] { 'Z', "Z" }, + new object[] { '5', "5" }, + new object[] { ' ', "space" }, + new object[] { '!', "exclamation" }, + new object[] { 'g', "g" }, + new object[] { 'ў', "cyrillic" }, + new object[] { '里', "chinese_simple" }, + new object[] { '爾', "chinese_trad" }, + new object[] { 'ة', "arabic" } }; - public CharTypeSerializerTests(char value) : base(value) + public CharTypeSerializerTests(char value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/DateTimeTypeSerializerTests.cs b/Tests/TypeSerializers/DateTimeTypeSerializerTests.cs index 9373419..f05c803 100644 --- a/Tests/TypeSerializers/DateTimeTypeSerializerTests.cs +++ b/Tests/TypeSerializers/DateTimeTypeSerializerTests.cs @@ -1,5 +1,6 @@ using System; using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -7,22 +8,22 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class DateTimeTypeSerializerTests : BaseTypeSerializerTests { - private static DateTime[] Inputs => new[] + private static IEnumerable Inputs => new[] { - DateTime.MinValue, // 0001-01-01 00:00:00 - DateTime.MaxValue, // 9999-12-31 23:59:59 - new DateTime(638542591551251841L, DateTimeKind.Local), - new DateTime(638542519494481194L, DateTimeKind.Utc), - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc), - new DateTime(2024, 6, 17, 0, 0, 0, DateTimeKind.Local), - new DateTime(2023, 6, 1, 12, 0, 0), // 2023-06-01 12:00:00 - new DateTime(1995, 7, 26, 8, 0, 0), // 1995-07-26 08:00:00 - new DateTime(2030, 1, 15, 17, 30, 0), // 2030-01-15 17:30:00 - new DateTime(1980, 5, 10, 3, 45, 0), // 1980-05-10 03:45:00 - new DateTime(2024, 12, 31, 23, 59, 59), // 2024-12-31 23:59:59 + new object[] { DateTime.MinValue, "min" }, + new object[] { DateTime.MaxValue, "max" }, + new object[] { new DateTime(638542591551251841L, DateTimeKind.Local), "ticks_local_1" }, + new object[] { new DateTime(638542519494481194L, DateTimeKind.Utc), "ticks_utc_1" }, + new object[] { new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc), "epoch_utc" }, + new object[] { new DateTime(2024, 6, 17, 0, 0, 0, DateTimeKind.Local), "2024_06_17_local" }, + new object[] { new DateTime(2023, 6, 1, 12, 0, 0), "2023_06_01_12_00" }, + new object[] { new DateTime(1995, 7, 26, 8, 0, 0), "1995_07_26_08_00" }, + new object[] { new DateTime(2030, 1, 15, 17, 30, 0), "2030_01_15_17_30" }, + new object[] { new DateTime(1980, 5, 10, 3, 45, 0), "1980_05_10_03_45" }, + new object[] { new DateTime(2024, 12, 31, 23, 59, 59), "2024_12_31_23_59_59" } }; - public DateTimeTypeSerializerTests(DateTime value) : base(value) + public DateTimeTypeSerializerTests(DateTime value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/DecimalTypeSerializerTests.cs b/Tests/TypeSerializers/DecimalTypeSerializerTests.cs index 2e27bbf..f9326fa 100644 --- a/Tests/TypeSerializers/DecimalTypeSerializerTests.cs +++ b/Tests/TypeSerializers/DecimalTypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,22 +7,22 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class DecimalTypeSerializerTests : BaseTypeSerializerTests { - private static decimal[] Inputs => new[] + private static IEnumerable Inputs => new[] { - decimal.MinValue, // -79228162514264337593543950335 - decimal.MaxValue, // 79228162514264337593543950335 - 0.0m, // zero - 1.0m, // smallest positive decimal - -1.0m, // smallest negative decimal - 3.1415926535897932384626433832m, // pi - -3.1415926535897932384626433832m, // negative pi - 1234567890123456789012345678.9m, // random positive value - -1234567890123456789012345678.9m, // random negative value - 1234.5678901234567890123456789m, // random positive value - -1234.5678901234567890123456789m // random negative value + new object[] { decimal.MinValue, "min" }, + new object[] { decimal.MaxValue, "max" }, + new object[] { 0.0m, "zero" }, + new object[] { 1.0m, "one" }, + new object[] { -1.0m, "minus_one" }, + new object[] { 3.1415926535897932384626433832m, "pi" }, + new object[] { -3.1415926535897932384626433832m, "minus_pi" }, + new object[] { 1234567890123456789012345678.9m, "big_pos" }, + new object[] { -1234567890123456789012345678.9m, "big_neg" }, + new object[] { 1234.5678901234567890123456789m, "rnd_pos" }, + new object[] { -1234.5678901234567890123456789m, "rnd_neg" } }; - public DecimalTypeSerializerTests(decimal value) : base(value) + public DecimalTypeSerializerTests(decimal value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/DoubleTypeSerializerTests.cs b/Tests/TypeSerializers/DoubleTypeSerializerTests.cs index 2621502..2292c2c 100644 --- a/Tests/TypeSerializers/DoubleTypeSerializerTests.cs +++ b/Tests/TypeSerializers/DoubleTypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,21 +7,21 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class DoubleTypeSerializerTests : BaseTypeSerializerTests { - private static double[] Inputs => new[] + private static IEnumerable Inputs => new[] { - double.MinValue, // -1.7976931348623157E+308 - double.MaxValue, // 1.7976931348623157E+308 - double.Epsilon, // 4.94065645841247E-324 - double.NegativeInfinity, // Negative infinity - double.PositiveInfinity, // Positive infinity - 0.0, // zero - 1.0, // smallest positive double - -1.0, // smallest negative double - 3.14159265358979, // pi - -3.14159265358979 // negative pi + new object[] { double.MinValue, "min" }, + new object[] { double.MaxValue, "max" }, + new object[] { double.Epsilon, "epsilon" }, + new object[] { double.NegativeInfinity, "neg_inf" }, + new object[] { double.PositiveInfinity, "pos_inf" }, + new object[] { 0.0, "zero" }, + new object[] { 1.0, "one" }, + new object[] { -1.0, "minus_one" }, + new object[] { 3.14159265358979, "pi" }, + new object[] { -3.14159265358979, "minus_pi" } }; - public DoubleTypeSerializerTests(double value) : base(value) + public DoubleTypeSerializerTests(double value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/EnumByteTypeSerializerTests.cs b/Tests/TypeSerializers/EnumByteTypeSerializerTests.cs index ba8a942..416b544 100644 --- a/Tests/TypeSerializers/EnumByteTypeSerializerTests.cs +++ b/Tests/TypeSerializers/EnumByteTypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,23 +7,16 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] public class EnumByteTypeSerializerTests : TypeSerializerTests> { - public enum ByteEnum : byte - { - Value1, - Value2, - Value3, - } + public enum ByteEnum : byte { Value1, Value2, Value3 } - public EnumByteTypeSerializerTests(ByteEnum defaultValue) - : base(defaultValue, new EnumTypeSerializer(ByteSerializer.Shared, false)) - { - } + public EnumByteTypeSerializerTests(ByteEnum defaultValue, string _) + : base(defaultValue, new EnumTypeSerializer(ByteSerializer.Shared, false)) { } - private static ByteEnum[] Inputs => new[] + private static IEnumerable Inputs => new[] { - ByteEnum.Value1, - ByteEnum.Value2, - ByteEnum.Value3 + new object[] { ByteEnum.Value1, "v1" }, + new object[] { ByteEnum.Value2, "v2" }, + new object[] { ByteEnum.Value3, "v3" } }; } @@ -30,23 +24,16 @@ public EnumByteTypeSerializerTests(ByteEnum defaultValue) [TestFixtureSource(nameof(Inputs))] public class EnumSByteTypeSerializerTests : TypeSerializerTests> { - public enum SByteEnum : sbyte - { - Value1, - Value2, - Value3, - } + public enum SByteEnum : sbyte { Value1, Value2, Value3 } - public EnumSByteTypeSerializerTests(SByteEnum defaultValue) - : base(defaultValue, new EnumTypeSerializer(SByteSerializer.Shared, false)) - { - } + public EnumSByteTypeSerializerTests(SByteEnum defaultValue, string _) + : base(defaultValue, new EnumTypeSerializer(SByteSerializer.Shared, false)) { } - private static SByteEnum[] Inputs => new[] + private static IEnumerable Inputs => new[] { - SByteEnum.Value1, - SByteEnum.Value2, - SByteEnum.Value3 + new object[] { SByteEnum.Value1, "v1" }, + new object[] { SByteEnum.Value2, "v2" }, + new object[] { SByteEnum.Value3, "v3" } }; } @@ -54,23 +41,16 @@ public EnumSByteTypeSerializerTests(SByteEnum defaultValue) [TestFixtureSource(nameof(Inputs))] public class EnumShortTypeSerializerTests : TypeSerializerTests> { - public enum ShortEnum : short - { - Value1, - Value2, - Value3, - } + public enum ShortEnum : short { Value1, Value2, Value3 } - public EnumShortTypeSerializerTests(ShortEnum defaultValue) - : base(defaultValue, new EnumTypeSerializer(Int16Serializer.Shared, false)) - { - } + public EnumShortTypeSerializerTests(ShortEnum defaultValue, string _) + : base(defaultValue, new EnumTypeSerializer(Int16Serializer.Shared, false)) { } - private static ShortEnum[] Inputs => new[] + private static IEnumerable Inputs => new[] { - ShortEnum.Value1, - ShortEnum.Value2, - ShortEnum.Value3 + new object[] { ShortEnum.Value1, "v1" }, + new object[] { ShortEnum.Value2, "v2" }, + new object[] { ShortEnum.Value3, "v3" } }; } @@ -78,23 +58,16 @@ public EnumShortTypeSerializerTests(ShortEnum defaultValue) [TestFixtureSource(nameof(Inputs))] public class EnumUShortTypeSerializerTests : TypeSerializerTests> { - public enum UShortEnum : ushort - { - Value1, - Value2, - Value3, - } + public enum UShortEnum : ushort { Value1, Value2, Value3 } - public EnumUShortTypeSerializerTests(UShortEnum defaultValue) - : base(defaultValue, new EnumTypeSerializer(UInt16Serializer.Shared, false)) - { - } + public EnumUShortTypeSerializerTests(UShortEnum defaultValue, string _) + : base(defaultValue, new EnumTypeSerializer(UInt16Serializer.Shared, false)) { } - private static UShortEnum[] Inputs => new[] + private static IEnumerable Inputs => new[] { - UShortEnum.Value1, - UShortEnum.Value2, - UShortEnum.Value3 + new object[] { UShortEnum.Value1, "v1" }, + new object[] { UShortEnum.Value2, "v2" }, + new object[] { UShortEnum.Value3, "v3" } }; } @@ -102,23 +75,16 @@ public EnumUShortTypeSerializerTests(UShortEnum defaultValue) [TestFixtureSource(nameof(Inputs))] public class EnumIntTypeSerializerTests : TypeSerializerTests> { - public enum IntEnum : int - { - Value1, - Value2, - Value3, - } + public enum IntEnum : int { Value1, Value2, Value3 } - public EnumIntTypeSerializerTests(IntEnum defaultValue) - : base(defaultValue, new EnumTypeSerializer(Int32Serializer.Shared, false)) - { - } + public EnumIntTypeSerializerTests(IntEnum defaultValue, string _) + : base(defaultValue, new EnumTypeSerializer(Int32Serializer.Shared, false)) { } - private static IntEnum[] Inputs => new[] + private static IEnumerable Inputs => new[] { - IntEnum.Value1, - IntEnum.Value2, - IntEnum.Value3 + new object[] { IntEnum.Value1, "v1" }, + new object[] { IntEnum.Value2, "v2" }, + new object[] { IntEnum.Value3, "v3" } }; } @@ -126,23 +92,16 @@ public EnumIntTypeSerializerTests(IntEnum defaultValue) [TestFixtureSource(nameof(Inputs))] public class EnumUIntTypeSerializerTests : TypeSerializerTests> { - public enum UIntEnum : uint - { - Value1, - Value2, - Value3, - } + public enum UIntEnum : uint { Value1, Value2, Value3 } - public EnumUIntTypeSerializerTests(UIntEnum defaultValue) - : base(defaultValue, new EnumTypeSerializer(UInt32Serializer.Shared, false)) - { - } + public EnumUIntTypeSerializerTests(UIntEnum defaultValue, string _) + : base(defaultValue, new EnumTypeSerializer(UInt32Serializer.Shared, false)) { } - private static UIntEnum[] Inputs => new[] + private static IEnumerable Inputs => new[] { - UIntEnum.Value1, - UIntEnum.Value2, - UIntEnum.Value3 + new object[] { UIntEnum.Value1, "v1" }, + new object[] { UIntEnum.Value2, "v2" }, + new object[] { UIntEnum.Value3, "v3" } }; } @@ -150,23 +109,16 @@ public EnumUIntTypeSerializerTests(UIntEnum defaultValue) [TestFixtureSource(nameof(Inputs))] public class EnumLongTypeSerializerTests : TypeSerializerTests> { - public enum LongEnum : long - { - Value1, - Value2, - Value3, - } + public enum LongEnum : long { Value1, Value2, Value3 } - public EnumLongTypeSerializerTests(LongEnum defaultValue) - : base(defaultValue, new EnumTypeSerializer(Int64Serializer.Shared, false)) - { - } + public EnumLongTypeSerializerTests(LongEnum defaultValue, string _) + : base(defaultValue, new EnumTypeSerializer(Int64Serializer.Shared, false)) { } - private static LongEnum[] Inputs => new[] + private static IEnumerable Inputs => new[] { - LongEnum.Value1, - LongEnum.Value2, - LongEnum.Value3 + new object[] { LongEnum.Value1, "v1" }, + new object[] { LongEnum.Value2, "v2" }, + new object[] { LongEnum.Value3, "v3" } }; } @@ -174,23 +126,16 @@ public EnumLongTypeSerializerTests(LongEnum defaultValue) [TestFixtureSource(nameof(Inputs))] public class EnumULongTypeSerializerTests : TypeSerializerTests> { - public enum ULongEnum : ulong - { - Value1, - Value2, - Value3, - } + public enum ULongEnum : ulong { Value1, Value2, Value3 } - public EnumULongTypeSerializerTests(ULongEnum defaultValue) - : base(defaultValue, new EnumTypeSerializer(UInt64Serializer.Shared, false)) - { - } + public EnumULongTypeSerializerTests(ULongEnum defaultValue, string _) + : base(defaultValue, new EnumTypeSerializer(UInt64Serializer.Shared, false)) { } - private static ULongEnum[] Inputs => new[] + private static IEnumerable Inputs => new[] { - ULongEnum.Value1, - ULongEnum.Value2, - ULongEnum.Value3 + new object[] { ULongEnum.Value1, "v1" }, + new object[] { ULongEnum.Value2, "v2" }, + new object[] { ULongEnum.Value3, "v3" } }; } -} \ No newline at end of file +} diff --git a/Tests/TypeSerializers/Int16TypeSerializerTests.cs b/Tests/TypeSerializers/Int16TypeSerializerTests.cs index 152cba1..938db3e 100644 --- a/Tests/TypeSerializers/Int16TypeSerializerTests.cs +++ b/Tests/TypeSerializers/Int16TypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,20 +7,20 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class Int16TypeSerializerTests : BaseTypeSerializerTests { - private static short[] Inputs => new[] + private static IEnumerable Inputs => new[] { - short.MinValue, // -32768 - short.MaxValue, // 32767 - (short)0, // zero - (short)1, // smallest positive short - (short)-1, // smallest negative short - (short)1024, // power of two - (short)-1024, // negative power of two - (short)12345, // random positive value - (short)-12345 // random negative value + new object[] { short.MinValue, "min" }, + new object[] { short.MaxValue, "max" }, + new object[] { (short)0, "zero" }, + new object[] { (short)1, "one" }, + new object[] { (short)-1, "minus_one" }, + new object[] { (short)1024, "pow2" }, + new object[] { (short)-1024, "minus_pow2" }, + new object[] { (short)12345, "rnd_pos" }, + new object[] { (short)-12345, "rnd_neg" } }; - public Int16TypeSerializerTests(short value) : base(value) + public Int16TypeSerializerTests(short value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/Int32TypeSerializerTests.cs b/Tests/TypeSerializers/Int32TypeSerializerTests.cs index 14f7bdc..229819f 100644 --- a/Tests/TypeSerializers/Int32TypeSerializerTests.cs +++ b/Tests/TypeSerializers/Int32TypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,19 +7,19 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class Int32TypeSerializerTests : BaseTypeSerializerTests { - private static int[] Inputs => new[] + private static IEnumerable Inputs => new[] { - int.MinValue, // -2147483648 - int.MaxValue, // 2147483647 - 0, // zero - 1, // smallest positive int - -1, // smallest negative int - 1024, // power of two - -1024, // negative power of two - 1234567890 // random positive value + new object[] { int.MinValue, "min" }, + new object[] { int.MaxValue, "max" }, + new object[] { 0, "zero" }, + new object[] { 1, "one" }, + new object[] { -1, "minus_one" }, + new object[] { 1024, "pow2" }, + new object[] { -1024, "minus_pow2" }, + new object[] { 1234567890, "rnd_pos" } }; - public Int32TypeSerializerTests(int value) : base(value) + public Int32TypeSerializerTests(int value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/Int64TypeSerializerTests.cs b/Tests/TypeSerializers/Int64TypeSerializerTests.cs index d44b9d5..9db798d 100644 --- a/Tests/TypeSerializers/Int64TypeSerializerTests.cs +++ b/Tests/TypeSerializers/Int64TypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,19 +7,19 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class Int64TypeSerializerTests : BaseTypeSerializerTests { - private static long[] Inputs => new[] + private static IEnumerable Inputs => new[] { - long.MinValue, // -9223372036854775808 - long.MaxValue, // 9223372036854775807 - 0L, // zero - 1L, // smallest positive long - -1L, // smallest negative long - 1024L, // power of two - -1024L, // negative power of two - 1234567890123L // random positive value + new object[] { long.MinValue, "min" }, + new object[] { long.MaxValue, "max" }, + new object[] { 0L, "zero" }, + new object[] { 1L, "one" }, + new object[] { -1L, "minus_one" }, + new object[] { 1024L, "pow2" }, + new object[] { -1024L, "minus_pow2" }, + new object[] { 1234567890123L, "rnd_pos" } }; - public Int64TypeSerializerTests(long value) : base(value) + public Int64TypeSerializerTests(long value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/KeyValueTypeSerializerTests.cs b/Tests/TypeSerializers/KeyValueTypeSerializerTests.cs index 582480b..673fce1 100644 --- a/Tests/TypeSerializers/KeyValueTypeSerializerTests.cs +++ b/Tests/TypeSerializers/KeyValueTypeSerializerTests.cs @@ -7,20 +7,20 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] public class KeyValueTypeSerializerTests : TypeSerializerTests, KeyValueTypeSerializer> { - public KeyValueTypeSerializerTests(KeyValuePair defaultValue) - : base(defaultValue, new KeyValueTypeSerializer(StringSerializer.Shared, Int32Serializer.Shared)) + private static IEnumerable Inputs => new[] { - } + new object[] { new KeyValuePair("key1", 1), "key1_1" }, + new object[] { new KeyValuePair("key2", 2), "key2_2" }, + new object[] { new KeyValuePair("key3", 3), "key3_3" }, + new object[] { new KeyValuePair("", 0), "empty_0" }, + new object[] { new KeyValuePair(null, 0), "null_0" }, + new object[] { new KeyValuePair("key with space", 12345), "space_12345" }, + new object[] { new KeyValuePair("long key with multiple words", 67890), "long_67890" } + }; - private static KeyValuePair[] Inputs => new[] + public KeyValueTypeSerializerTests(KeyValuePair defaultValue, string _) + : base(defaultValue, new KeyValueTypeSerializer(StringSerializer.Shared, Int32Serializer.Shared)) { - new KeyValuePair("key1", 1), - new KeyValuePair("key2", 2), - new KeyValuePair("key3", 3), - new KeyValuePair("", 0), // empty key - new KeyValuePair(null, 0), // null key - new KeyValuePair("key with space", 12345), - new KeyValuePair("long key with multiple words", 67890), - }; + } } } \ No newline at end of file diff --git a/Tests/TypeSerializers/QuaternionTypeSerializerTests.cs b/Tests/TypeSerializers/QuaternionTypeSerializerTests.cs index 6636f9e..05abf9f 100644 --- a/Tests/TypeSerializers/QuaternionTypeSerializerTests.cs +++ b/Tests/TypeSerializers/QuaternionTypeSerializerTests.cs @@ -1,5 +1,6 @@ using NUnit.Framework; using UnityEngine; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -7,43 +8,43 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class QuaternionTypeSerializerTests : BaseTypeSerializerTests { - private static Quaternion[] Inputs => new[] + private static IEnumerable Inputs => new[] { - Quaternion.identity, // identity quaternion - new Quaternion(0, 0, 0, 0), // zero quaternion - new Quaternion(1, 0, 0, 0), // unit x quaternion - new Quaternion(0, 1, 0, 0), // unit y quaternion - new Quaternion(0, 0, 1, 0), // unit z quaternion - new Quaternion(0, 0, 0, 1), // unit w quaternion - new Quaternion(1, 1, 1, 1), // all ones - new Quaternion(-1, -1, -1, -1), // all negatives - new Quaternion(float.MaxValue, 0, 0, 0), // max value x component - new Quaternion(0, float.MaxValue, 0, 0), // max value y component - new Quaternion(0, 0, float.MaxValue, 0), // max value z component - new Quaternion(0, 0, 0, float.MaxValue), // max value w component - new Quaternion(float.MinValue, 0, 0, 0), // min value x component - new Quaternion(0, float.MinValue, 0, 0), // min value y component - new Quaternion(0, 0, float.MinValue, 0), // min value z component - new Quaternion(0, 0, 0, float.MinValue), // min value w component - new Quaternion(0.707f, 0.707f, 0, 0), // 90 degree rotation around x-axis - new Quaternion(0, 0.707f, 0.707f, 0), // 90 degree rotation around y-axis - new Quaternion(0, 0, 0.707f, 0.707f), // 90 degree rotation around z-axis - new Quaternion(0.5f, 0.5f, 0.5f, 0.5f), // normalized quaternion with equal components - new Quaternion(-0.5f, -0.5f, -0.5f, -0.5f), // negative normalized quaternion with equal components - new Quaternion(0.1f, 0.2f, 0.3f, 0.4f), // non-unit quaternion - new Quaternion(1e-10f, 1e-10f, 1e-10f, 1e-10f), // very small components - new Quaternion(1e10f, 1e10f, 1e10f, 1e10f), // very large components - new Quaternion(float.PositiveInfinity, 0, 0, 0), // positive infinity x component - new Quaternion(0, float.PositiveInfinity, 0, 0), // positive infinity y component - new Quaternion(0, 0, float.PositiveInfinity, 0), // positive infinity z component - new Quaternion(0, 0, 0, float.PositiveInfinity), // positive infinity w component - new Quaternion(float.NegativeInfinity, 0, 0, 0), // negative infinity x component - new Quaternion(0, float.NegativeInfinity, 0, 0), // negative infinity y component - new Quaternion(0, 0, float.NegativeInfinity, 0), // negative infinity z component - new Quaternion(0, 0, 0, float.NegativeInfinity) // negative infinity w component + new object[] { Quaternion.identity, "identity" }, + new object[] { new Quaternion(0, 0, 0, 0), "zero" }, + new object[] { new Quaternion(1, 0, 0, 0), "unit_x" }, + new object[] { new Quaternion(0, 1, 0, 0), "unit_y" }, + new object[] { new Quaternion(0, 0, 1, 0), "unit_z" }, + new object[] { new Quaternion(0, 0, 0, 1), "unit_w" }, + new object[] { new Quaternion(1, 1, 1, 1), "all_ones" }, + new object[] { new Quaternion(-1, -1, -1, -1), "all_negatives" }, + new object[] { new Quaternion(float.MaxValue, 0, 0, 0), "max_x" }, + new object[] { new Quaternion(0, float.MaxValue, 0, 0), "max_y" }, + new object[] { new Quaternion(0, 0, float.MaxValue, 0), "max_z" }, + new object[] { new Quaternion(0, 0, 0, float.MaxValue), "max_w" }, + new object[] { new Quaternion(float.MinValue, 0, 0, 0), "min_x" }, + new object[] { new Quaternion(0, float.MinValue, 0, 0), "min_y" }, + new object[] { new Quaternion(0, 0, float.MinValue, 0), "min_z" }, + new object[] { new Quaternion(0, 0, 0, float.MinValue), "min_w" }, + new object[] { new Quaternion(0.707f, 0.707f, 0, 0), "rot_x_90" }, + new object[] { new Quaternion(0, 0.707f, 0.707f, 0), "rot_y_90" }, + new object[] { new Quaternion(0, 0, 0.707f, 0.707f), "rot_z_90" }, + new object[] { new Quaternion(0.5f, 0.5f, 0.5f, 0.5f), "all_half" }, + new object[] { new Quaternion(-0.5f, -0.5f, -0.5f, -0.5f), "all_minus_half" }, + new object[] { new Quaternion(0.1f, 0.2f, 0.3f, 0.4f), "small_components" }, + new object[] { new Quaternion(1e-10f, 1e-10f, 1e-10f, 1e-10f), "very_small" }, + new object[] { new Quaternion(1e10f, 1e10f, 1e10f, 1e10f), "very_large" }, + new object[] { new Quaternion(float.PositiveInfinity, 0, 0, 0), "pos_inf_x" }, + new object[] { new Quaternion(0, float.PositiveInfinity, 0, 0), "pos_inf_y" }, + new object[] { new Quaternion(0, 0, float.PositiveInfinity, 0), "pos_inf_z" }, + new object[] { new Quaternion(0, 0, 0, float.PositiveInfinity), "pos_inf_w" }, + new object[] { new Quaternion(float.NegativeInfinity, 0, 0, 0), "neg_inf_x" }, + new object[] { new Quaternion(0, float.NegativeInfinity, 0, 0), "neg_inf_y" }, + new object[] { new Quaternion(0, 0, float.NegativeInfinity, 0), "neg_inf_z" }, + new object[] { new Quaternion(0, 0, 0, float.NegativeInfinity), "neg_inf_w" } }; - public QuaternionTypeSerializerTests(Quaternion value) : base(value) + public QuaternionTypeSerializerTests(Quaternion value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/SByteTypeSerializerTests.cs b/Tests/TypeSerializers/SByteTypeSerializerTests.cs index f89b6cc..3a5ac45 100644 --- a/Tests/TypeSerializers/SByteTypeSerializerTests.cs +++ b/Tests/TypeSerializers/SByteTypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,20 +7,20 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class SByteTypeSerializerTests : BaseTypeSerializerTests { - private static sbyte[] Inputs => new[] + private static IEnumerable Inputs => new[] { - sbyte.MinValue, // -128 - sbyte.MaxValue, // 127 - (sbyte)0, // zero - (sbyte)1, // smallest positive sbyte - (sbyte)-1, // smallest negative sbyte - (sbyte)64, // positive power of two - (sbyte)-64, // negative power of two - (sbyte)10, // random positive value - (sbyte)-10 // random negative value + new object[] { sbyte.MinValue, "min" }, + new object[] { sbyte.MaxValue, "max" }, + new object[] { (sbyte)0, "zero" }, + new object[] { (sbyte)1, "one" }, + new object[] { (sbyte)-1, "minus_one" }, + new object[] { (sbyte)64, "pow2" }, + new object[] { (sbyte)-64, "minus_pow2" }, + new object[] { (sbyte)10, "rnd_pos" }, + new object[] { (sbyte)-10, "rnd_neg" } }; - public SByteTypeSerializerTests(sbyte value) : base(value) + public SByteTypeSerializerTests(sbyte value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/SingleTypeSerializerTests.cs b/Tests/TypeSerializers/SingleTypeSerializerTests.cs index 26a4622..1d8db18 100644 --- a/Tests/TypeSerializers/SingleTypeSerializerTests.cs +++ b/Tests/TypeSerializers/SingleTypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,21 +7,21 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class SingleTypeSerializerTests : BaseTypeSerializerTests { - private static float[] Inputs => new[] + private static IEnumerable Inputs => new[] { - float.MinValue, // -3.40282347E+38 - float.MaxValue, // 3.40282347E+38 - float.Epsilon, // 1.401298E-45 - float.NegativeInfinity, // Negative infinity - float.PositiveInfinity, // Positive infinity - 0f, // zero - 1f, // smallest positive float - -1f, // smallest negative float - 3.14159f, // pi - -3.14159f // negative pi + new object[] { float.MinValue, "min" }, + new object[] { float.MaxValue, "max" }, + new object[] { float.Epsilon, "epsilon" }, + new object[] { float.NegativeInfinity, "neg_inf" }, + new object[] { float.PositiveInfinity, "pos_inf" }, + new object[] { 0f, "zero" }, + new object[] { 1f, "one" }, + new object[] { -1f, "minus_one" }, + new object[] { 3.14159f, "pi" }, + new object[] { -3.14159f, "minus_pi" } }; - public SingleTypeSerializerTests(float value) : base(value) + public SingleTypeSerializerTests(float value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/StringTypeSerializerTests.cs b/Tests/TypeSerializers/StringTypeSerializerTests.cs index 8c6b652..3788490 100644 --- a/Tests/TypeSerializers/StringTypeSerializerTests.cs +++ b/Tests/TypeSerializers/StringTypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,35 +7,33 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class StringTypeSerializerTests : BaseTypeSerializerTests { - private static string[] Inputs => new[] + private static IEnumerable Inputs => new[] { - null, // null - "", // empty - "Hello world!", // latin - "Прывітанне сусвет!", // cyrillic - "你好世界", // chinese - "مرحبا بالعالم!", // arabic - "こんにちは世界", // japanese - "안녕하세요 세계", // korean - "שלום עולם!", // hebrew - "Bonjour le monde!", // french - "¡Hola mundo!", // spanish - "Olá mundo!", // portuguese - "Hallo Welt!", // german - "Ciao mondo!", // italian - "नमस्ते दुनिया!", // hindi - "👋 🌍", // emojis - "!@#$%^&*()_+-=[]{}|;':\",.<>/?", // special characters - " ", // whitespace - "Line1\nLine2\nLine3", // multiline - new string('a', 1000), // long string - "Leading and trailing spaces ", // leading/trailing spaces - "Mixed123Numbers456And789Text" // alphanumeric - // TODO: this one currently breaks tests - //"Null\0Character", // string with null character + new object[] { null, "null" }, + new object[] { "", "empty" }, + new object[] { "Hello world!", "latin" }, + new object[] { "Прывітанне сусвет!", "cyrillic" }, + new object[] { "你好世界", "chinese" }, + new object[] { "مرحبا بالعالم!", "arabic" }, + new object[] { "こんにちは世界", "japanese" }, + new object[] { "안녕하세요 세계", "korean" }, + new object[] { "שלום עולם!", "hebrew" }, + new object[] { "Bonjour le monde!", "french" }, + new object[] { "¡Hola mundo!", "spanish" }, + new object[] { "Olá mundo!", "portuguese" }, + new object[] { "Hallo Welt!", "german" }, + new object[] { "Ciao mondo!", "italian" }, + new object[] { "नमस्ते दुनिया!", "hindi" }, + new object[] { "👋 🌍", "emojis" }, + new object[] { "!@#$%^&*()_+-=[]{}|;':\",.<>/?", "special" }, + new object[] { " ", "whitespace" }, + new object[] { "Line1\nLine2\nLine3", "multiline" }, + new object[] { new string('a', 1000), "long" }, + new object[] { "Leading and trailing spaces ", "spaces" }, + new object[] { "Mixed123Numbers456And789Text", "alphanumeric" } }; - public StringTypeSerializerTests(string defaultValue) : base(defaultValue) + public StringTypeSerializerTests(string defaultValue, string _) : base(defaultValue) { } } diff --git a/Tests/TypeSerializers/TimeSpanTypeSerializerTests.cs b/Tests/TypeSerializers/TimeSpanTypeSerializerTests.cs index bf428e3..83d9ba7 100644 --- a/Tests/TypeSerializers/TimeSpanTypeSerializerTests.cs +++ b/Tests/TypeSerializers/TimeSpanTypeSerializerTests.cs @@ -1,5 +1,6 @@ using System; using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -7,21 +8,21 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class TimeSpanTypeSerializerTests : BaseTypeSerializerTests { - private static TimeSpan[] Inputs => new[] + private static IEnumerable Inputs => new[] { - TimeSpan.Zero, // 00:00:00 - TimeSpan.FromHours(1), // 01:00:00 - TimeSpan.FromMinutes(30), // 00:30:00 - TimeSpan.FromSeconds(45), // 00:00:45 - TimeSpan.FromMilliseconds(500), // 00:00:00.5000000 - TimeSpan.FromTicks(123456789), // 00:00:00.0123456 - TimeSpan.FromDays(2), // 2.00:00:00 - TimeSpan.FromDays(-2), // -2.00:00:00 - TimeSpan.FromHours(23) + TimeSpan.FromMinutes(59) + TimeSpan.FromSeconds(59), // 23:59:59 - TimeSpan.FromHours(-23) + TimeSpan.FromMinutes(-59) + TimeSpan.FromSeconds(-59), // -23:59:59 + new object[] { TimeSpan.Zero, "zero" }, + new object[] { TimeSpan.FromHours(1), "hour" }, + new object[] { TimeSpan.FromMinutes(30), "min_30" }, + new object[] { TimeSpan.FromSeconds(45), "sec_45" }, + new object[] { TimeSpan.FromMilliseconds(500), "ms_500" }, + new object[] { TimeSpan.FromTicks(123456789), "ticks_123456789" }, + new object[] { TimeSpan.FromDays(2), "days_2" }, + new object[] { TimeSpan.FromDays(-2), "days_minus_2" }, + new object[] { TimeSpan.FromHours(23) + TimeSpan.FromMinutes(59) + TimeSpan.FromSeconds(59), "23_59_59" }, + new object[] { TimeSpan.FromHours(-23) + TimeSpan.FromMinutes(-59) + TimeSpan.FromSeconds(-59), "minus_23_59_59" } }; - public TimeSpanTypeSerializerTests(TimeSpan value) : base(value) + public TimeSpanTypeSerializerTests(TimeSpan value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/UInt16TypeSerializerTests.cs b/Tests/TypeSerializers/UInt16TypeSerializerTests.cs index f78c879..a8e0370 100644 --- a/Tests/TypeSerializers/UInt16TypeSerializerTests.cs +++ b/Tests/TypeSerializers/UInt16TypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,17 +7,17 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class UInt16TypeSerializerTests : BaseTypeSerializerTests { - private static ushort[] Inputs => new[] + private static IEnumerable Inputs => new[] { - ushort.MinValue, // 0 - ushort.MaxValue, // 65535 - (ushort)0, // zero - (ushort)1, // smallest positive ushort - (ushort)1024, // power of two - (ushort)12345 // random positive value + new object[] { ushort.MinValue, "min" }, + new object[] { ushort.MaxValue, "max" }, + new object[] { (ushort)0, "zero" }, + new object[] { (ushort)1, "one" }, + new object[] { (ushort)1024, "pow2" }, + new object[] { (ushort)12345, "rnd" } }; - public UInt16TypeSerializerTests(ushort value) : base(value) + public UInt16TypeSerializerTests(ushort value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/UInt32TypeSerializerTests.cs b/Tests/TypeSerializers/UInt32TypeSerializerTests.cs index 1804b9e..b6aa168 100644 --- a/Tests/TypeSerializers/UInt32TypeSerializerTests.cs +++ b/Tests/TypeSerializers/UInt32TypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,17 +7,17 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class UInt32TypeSerializerTests : BaseTypeSerializerTests { - private static uint[] Inputs => new[] + private static IEnumerable Inputs => new[] { - uint.MinValue, // 0 - uint.MaxValue, // 4294967295 - 0u, // zero - 1u, // smallest positive uint - 1024u, // power of two - 1234567890u // random positive value + new object[] { uint.MinValue, "min" }, + new object[] { uint.MaxValue, "max" }, + new object[] { 0u, "zero" }, + new object[] { 1u, "one" }, + new object[] { 1024u, "pow2" }, + new object[] { 1234567890u, "rnd" } }; - public UInt32TypeSerializerTests(uint value) : base(value) + public UInt32TypeSerializerTests(uint value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/UInt64TypeSerializerTests.cs b/Tests/TypeSerializers/UInt64TypeSerializerTests.cs index e08287f..ca05cbc 100644 --- a/Tests/TypeSerializers/UInt64TypeSerializerTests.cs +++ b/Tests/TypeSerializers/UInt64TypeSerializerTests.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -6,17 +7,17 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class UInt64TypeSerializerTests : BaseTypeSerializerTests { - private static ulong[] Inputs => new[] + private static IEnumerable Inputs => new[] { - ulong.MinValue, // 0 - ulong.MaxValue, // 18446744073709551615 - 0UL, // zero - 1UL, // smallest positive ulong - 1024UL, // power of two - 1234567890123UL // random positive value + new object[] { ulong.MinValue, "min" }, + new object[] { ulong.MaxValue, "max" }, + new object[] { 0UL, "zero" }, + new object[] { 1UL, "one" }, + new object[] { 1024UL, "pow2" }, + new object[] { 1234567890123UL, "rnd_pos" } }; - public UInt64TypeSerializerTests(ulong value) : base(value) + public UInt64TypeSerializerTests(ulong value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/Vector2IntTypeSerializerTests.cs b/Tests/TypeSerializers/Vector2IntTypeSerializerTests.cs index 9b136c3..58690ce 100644 --- a/Tests/TypeSerializers/Vector2IntTypeSerializerTests.cs +++ b/Tests/TypeSerializers/Vector2IntTypeSerializerTests.cs @@ -1,5 +1,6 @@ using NUnit.Framework; using UnityEngine; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -7,39 +8,39 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class Vector2IntTypeSerializerTests : BaseTypeSerializerTests { - private static Vector2Int[] Inputs => new[] + private static IEnumerable Inputs => new[] { - Vector2Int.left, // left direction - Vector2Int.right, // right direction - Vector2Int.down, // down direction - Vector2Int.up, // up direction - Vector2Int.zero, // zero vector - Vector2Int.one, // one vector - new Vector2Int(int.MaxValue, int.MaxValue), // Max values - new Vector2Int(int.MinValue, int.MinValue), // Min values - new Vector2Int(1, -1), // mixed sign values - new Vector2Int(-2, 4), // mixed sign values - new Vector2Int(123, 789), // large values - new Vector2Int(-10, 0), // negative value and zero - new Vector2Int(0, -10), // zero and negative value - new Vector2Int(10, 10), // identical positive values - new Vector2Int(-10, -10), // identical negative values - new Vector2Int(1, 1), // small positive values - new Vector2Int(-1, -1), // small negative values - new Vector2Int(0, 1), // zero and positive value - new Vector2Int(1, 0), // positive value and zero - new Vector2Int(-1, 0), // negative value and zero - new Vector2Int(0, -1), // zero and negative value - new Vector2Int(100, -100), // mixed large values - new Vector2Int(-100, 100), // mixed large values - new Vector2Int(256, -256), // powers of 2 values - new Vector2Int(-256, 256), // powers of 2 values - new Vector2Int(32767, -32768), // max and min short values - new Vector2Int(-32768, 32767) // min and max short values + new object[] { Vector2Int.left, "left direction" }, + new object[] { Vector2Int.right, "right direction" }, + new object[] { Vector2Int.down, "down direction" }, + new object[] { Vector2Int.up, "up direction" }, + new object[] { Vector2Int.zero, "zero vector" }, + new object[] { Vector2Int.one, "one vector" }, + new object[] { new Vector2Int(int.MaxValue, int.MaxValue), "Max values" }, + new object[] { new Vector2Int(int.MinValue, int.MinValue), "Min values" }, + new object[] { new Vector2Int(1, -1), "mixed sign values" }, + new object[] { new Vector2Int(-2, 4), "mixed sign values" }, + new object[] { new Vector2Int(123, 789), "large values" }, + new object[] { new Vector2Int(-10, 0), "negative value and zero" }, + new object[] { new Vector2Int(0, -10), "zero and negative value" }, + new object[] { new Vector2Int(10, 10), "identical positive values" }, + new object[] { new Vector2Int(-10, -10), "identical negative values" }, + new object[] { new Vector2Int(1, 1), "small positive values" }, + new object[] { new Vector2Int(-1, -1), "small negative values" }, + new object[] { new Vector2Int(0, 1), "zero and positive value" }, + new object[] { new Vector2Int(1, 0), "positive value and zero" }, + new object[] { new Vector2Int(-1, 0), "negative value and zero" }, + new object[] { new Vector2Int(0, -1), "zero and negative value" }, + new object[] { new Vector2Int(100, -100), "mixed large values" }, + new object[] { new Vector2Int(-100, 100), "mixed large values" }, + new object[] { new Vector2Int(256, -256), "powers of 2 values" }, + new object[] { new Vector2Int(-256, 256), "powers of 2 values" }, + new object[] { new Vector2Int(32767, -32768), "max and min short values" }, + new object[] { new Vector2Int(-32768, 32767), "min and max short values" } }; - public Vector2IntTypeSerializerTests(Vector2Int value) : base(value) + public Vector2IntTypeSerializerTests(Vector2Int value, string _) : base(value) { } } -} \ No newline at end of file +} diff --git a/Tests/TypeSerializers/Vector2TypeSerializerTests.cs b/Tests/TypeSerializers/Vector2TypeSerializerTests.cs index 70bb8cf..b7f001d 100644 --- a/Tests/TypeSerializers/Vector2TypeSerializerTests.cs +++ b/Tests/TypeSerializers/Vector2TypeSerializerTests.cs @@ -1,5 +1,6 @@ using NUnit.Framework; using UnityEngine; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -7,32 +8,32 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class Vector2TypeSerializerTests : BaseTypeSerializerTests { - private static Vector2[] Inputs => new[] + private static IEnumerable Inputs => new[] { - Vector2.left, - Vector2.right, - Vector2.down, - Vector2.up, - Vector2.zero, - Vector2.one, - Vector2.positiveInfinity, // positive infinity - Vector2.negativeInfinity, // negative infinity - new Vector2(float.MaxValue, float.MaxValue), // Max values - new Vector2(float.MinValue, float.MinValue), // Min values - new Vector2(1.5f, -1.5f), // fractional values - new Vector2(-2.3f, 4.5f), // mixed sign values - new Vector2(123.456f, 789.123f), // large fractional values - new Vector2(-0.1f, 0.1f), // small fractional values - new Vector2(0f, -10f), // zero and negative value - new Vector2(-10f, 0f), // negative value and zero - new Vector2(10f, 10f), // identical positive values - new Vector2(-10f, -10f), // identical negative values - new Vector2(0.001f, 0.001f), // very small positive values - new Vector2(-0.001f, -0.001f), // very small negative values - new Vector2(float.Epsilon, float.Epsilon) // smallest positive float + new object[] { Vector2.left, "left" }, + new object[] { Vector2.right, "right" }, + new object[] { Vector2.down, "down" }, + new object[] { Vector2.up, "up" }, + new object[] { Vector2.zero, "zero" }, + new object[] { Vector2.one, "one" }, + new object[] { Vector2.positiveInfinity, "positive infinity" }, + new object[] { Vector2.negativeInfinity, "negative infinity" }, + new object[] { new Vector2(float.MaxValue, float.MaxValue), "Max values" }, + new object[] { new Vector2(float.MinValue, float.MinValue), "Min values" }, + new object[] { new Vector2(1.5f, -1.5f), "fractional values" }, + new object[] { new Vector2(-2.3f, 4.5f), "mixed sign values" }, + new object[] { new Vector2(123.456f, 789.123f), "large fractional values" }, + new object[] { new Vector2(-0.1f, 0.1f), "small fractional values" }, + new object[] { new Vector2(0f, -10f), "zero and negative value" }, + new object[] { new Vector2(-10f, 0f), "negative value and zero" }, + new object[] { new Vector2(10f, 10f), "identical positive values" }, + new object[] { new Vector2(-10f, -10f), "identical negative values" }, + new object[] { new Vector2(0.001f, 0.001f), "very small positive values" }, + new object[] { new Vector2(-0.001f, -0.001f), "very small negative values" }, + new object[] { new Vector2(float.Epsilon, float.Epsilon), "smallest positive float" } }; - public Vector2TypeSerializerTests(Vector2 defaultValue) : base(defaultValue) + public Vector2TypeSerializerTests(Vector2 defaultValue, string _) : base(defaultValue) { } } diff --git a/Tests/TypeSerializers/Vector3IntTypeSerializerTests.cs b/Tests/TypeSerializers/Vector3IntTypeSerializerTests.cs index a535bb5..b31cd9b 100644 --- a/Tests/TypeSerializers/Vector3IntTypeSerializerTests.cs +++ b/Tests/TypeSerializers/Vector3IntTypeSerializerTests.cs @@ -1,5 +1,6 @@ using NUnit.Framework; using UnityEngine; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -7,40 +8,40 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class Vector3IntTypeSerializerTests : BaseTypeSerializerTests { - private static Vector3Int[] Inputs => new[] + private static IEnumerable Inputs => new[] { - Vector3Int.left, // left direction - Vector3Int.right, // right direction - Vector3Int.down, // down direction - Vector3Int.up, // up direction - Vector3Int.forward, // forward direction - Vector3Int.back, // back direction - Vector3Int.zero, // zero vector - Vector3Int.one, // one vector - new Vector3Int(int.MaxValue, int.MaxValue, int.MaxValue), // Max values - new Vector3Int(int.MinValue, int.MinValue, int.MinValue), // Min values - new Vector3Int(1, -1, 1), // mixed sign values - new Vector3Int(-2, 4, -2), // mixed sign values - new Vector3Int(123, 789, -456), // large values - new Vector3Int(-10, 0, 10), // negative, zero, positive values - new Vector3Int(0, -10, 10), // zero, negative, positive values - new Vector3Int(10, 10, 10), // identical positive values - new Vector3Int(-10, -10, -10), // identical negative values - new Vector3Int(1, 1, 1), // small positive values - new Vector3Int(-1, -1, -1), // small negative values - new Vector3Int(0, 1, 0), // zero and positive value - new Vector3Int(1, 0, 1), // positive value and zero - new Vector3Int(-1, 0, -1), // negative value and zero - new Vector3Int(0, -1, 0), // zero and negative value - new Vector3Int(100, -100, 100), // mixed large values - new Vector3Int(-100, 100, -100), // mixed large values - new Vector3Int(256, -256, 256), // powers of 2 values - new Vector3Int(-256, 256, -256), // powers of 2 values - new Vector3Int(32767, -32768, 32767), // max and min short values - new Vector3Int(-32768, 32767, -32768) // min and max short values + new object[] { Vector3Int.left, "left direction" }, + new object[] { Vector3Int.right, "right direction" }, + new object[] { Vector3Int.down, "down direction" }, + new object[] { Vector3Int.up, "up direction" }, + new object[] { Vector3Int.forward, "forward direction" }, + new object[] { Vector3Int.back, "back direction" }, + new object[] { Vector3Int.zero, "zero vector" }, + new object[] { Vector3Int.one, "one vector" }, + new object[] { new Vector3Int(int.MaxValue, int.MaxValue, int.MaxValue), "Max values" }, + new object[] { new Vector3Int(int.MinValue, int.MinValue, int.MinValue), "Min values" }, + new object[] { new Vector3Int(1, -1, 1), "mixed sign values" }, + new object[] { new Vector3Int(-2, 4, -2), "mixed sign values" }, + new object[] { new Vector3Int(123, 789, -456), "large values" }, + new object[] { new Vector3Int(-10, 0, 10), "negative, zero, positive values" }, + new object[] { new Vector3Int(0, -10, 10), "zero, negative, positive values" }, + new object[] { new Vector3Int(10, 10, 10), "identical positive values" }, + new object[] { new Vector3Int(-10, -10, -10), "identical negative values" }, + new object[] { new Vector3Int(1, 1, 1), "small positive values" }, + new object[] { new Vector3Int(-1, -1, -1), "small negative values" }, + new object[] { new Vector3Int(0, 1, 0), "zero and positive value" }, + new object[] { new Vector3Int(1, 0, 1), "positive value and zero" }, + new object[] { new Vector3Int(-1, 0, -1), "negative value and zero" }, + new object[] { new Vector3Int(0, -1, 0), "zero and negative value" }, + new object[] { new Vector3Int(100, -100, 100), "mixed large values" }, + new object[] { new Vector3Int(-100, 100, -100), "mixed large values" }, + new object[] { new Vector3Int(256, -256, 256), "powers of 2 values" }, + new object[] { new Vector3Int(-256, 256, -256), "powers of 2 values" }, + new object[] { new Vector3Int(32767, -32768, 32767), "max and min short values" }, + new object[] { new Vector3Int(-32768, 32767, -32768), "min and max short values" } }; - public Vector3IntTypeSerializerTests(Vector3Int value) : base(value) + public Vector3IntTypeSerializerTests(Vector3Int value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/Vector3TypeSerializerTests.cs b/Tests/TypeSerializers/Vector3TypeSerializerTests.cs index d88b9bd..999da23 100644 --- a/Tests/TypeSerializers/Vector3TypeSerializerTests.cs +++ b/Tests/TypeSerializers/Vector3TypeSerializerTests.cs @@ -1,5 +1,6 @@ using NUnit.Framework; using UnityEngine; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -7,37 +8,37 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class Vector3TypeSerializerTests : BaseTypeSerializerTests { - private static Vector3[] Inputs => new[] + private static IEnumerable Inputs => new[] { - Vector3.left, - Vector3.right, - Vector3.down, - Vector3.up, - Vector3.forward, - Vector3.back, - Vector3.zero, - Vector3.one, - Vector3.positiveInfinity, // positive infinity - Vector3.negativeInfinity, // negative infinity - new Vector3(float.MaxValue, float.MaxValue, float.MaxValue), // Max values - new Vector3(float.MinValue, float.MinValue, float.MinValue), // Min values - new Vector3(1.5f, -1.5f, 2.5f), // fractional values - new Vector3(-2.3f, 4.5f, -3.3f), // mixed sign values - new Vector3(123.456f, 789.123f, -456.789f), // large fractional values - new Vector3(-0.1f, 0.1f, -0.1f), // small fractional values - new Vector3(0f, -10f, 10f), // zero and positive/negative value - new Vector3(-10f, 0f, -10f), // negative value and zero - new Vector3(10f, 10f, 10f), // identical positive values - new Vector3(-10f, -10f, -10f), // identical negative values - new Vector3(0.001f, 0.001f, 0.001f), // very small positive values - new Vector3(-0.001f, -0.001f, -0.001f), // very small negative values - new Vector3(float.Epsilon, float.Epsilon, float.Epsilon), // smallest positive float - new Vector3(float.PositiveInfinity, float.NegativeInfinity, 0), // mixed infinity and zero - new Vector3(-0.5f, 0.5f, -0.5f), // small mixed sign values - new Vector3(3.1415f, 2.7182f, 1.618f), // mathematical constants + new object[] { Vector3.left, "left" }, + new object[] { Vector3.right, "right" }, + new object[] { Vector3.down, "down" }, + new object[] { Vector3.up, "up" }, + new object[] { Vector3.forward, "forward" }, + new object[] { Vector3.back, "back" }, + new object[] { Vector3.zero, "zero" }, + new object[] { Vector3.one, "one" }, + new object[] { Vector3.positiveInfinity, "positive infinity" }, + new object[] { Vector3.negativeInfinity, "negative infinity" }, + new object[] { new Vector3(float.MaxValue, float.MaxValue, float.MaxValue), "Max values" }, + new object[] { new Vector3(float.MinValue, float.MinValue, float.MinValue), "Min values" }, + new object[] { new Vector3(1.5f, -1.5f, 2.5f), "fractional values" }, + new object[] { new Vector3(-2.3f, 4.5f, -3.3f), "mixed sign values" }, + new object[] { new Vector3(123.456f, 789.123f, -456.789f), "large fractional values" }, + new object[] { new Vector3(-0.1f, 0.1f, -0.1f), "small fractional values" }, + new object[] { new Vector3(0f, -10f, 10f), "zero and positive/negative value" }, + new object[] { new Vector3(-10f, 0f, -10f), "negative value and zero" }, + new object[] { new Vector3(10f, 10f, 10f), "identical positive values" }, + new object[] { new Vector3(-10f, -10f, -10f), "identical negative values" }, + new object[] { new Vector3(0.001f, 0.001f, 0.001f), "very small positive values" }, + new object[] { new Vector3(-0.001f, -0.001f, -0.001f), "very small negative values" }, + new object[] { new Vector3(float.Epsilon, float.Epsilon, float.Epsilon), "smallest positive float" }, + new object[] { new Vector3(float.PositiveInfinity, float.NegativeInfinity, 0), "mixed infinity and zero" }, + new object[] { new Vector3(-0.5f, 0.5f, -0.5f), "small mixed sign values" }, + new object[] { new Vector3(3.1415f, 2.7182f, 1.618f), "mathematical constants" } }; - public Vector3TypeSerializerTests(Vector3 value) : base(value) + public Vector3TypeSerializerTests(Vector3 value, string _) : base(value) { } } diff --git a/Tests/TypeSerializers/Vector4TypeSerializerTests.cs b/Tests/TypeSerializers/Vector4TypeSerializerTests.cs index c354e80..7770682 100644 --- a/Tests/TypeSerializers/Vector4TypeSerializerTests.cs +++ b/Tests/TypeSerializers/Vector4TypeSerializerTests.cs @@ -1,5 +1,6 @@ using NUnit.Framework; using UnityEngine; +using System.Collections.Generic; namespace Appegy.Storage.TypeSerializers { @@ -7,34 +8,34 @@ namespace Appegy.Storage.TypeSerializers [TestFixtureSource(nameof(Inputs))] internal class Vector4TypeSerializerTests : BaseTypeSerializerTests { - private static Vector4[] Inputs => new[] + private static IEnumerable Inputs => new[] { - Vector4.zero, // all zeros - Vector4.one, // all ones - Vector4.positiveInfinity, // positive infinity - Vector4.negativeInfinity, // negative infinity - new Vector4(float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue), // Max values - new Vector4(float.MinValue, float.MinValue, float.MinValue, float.MinValue), // Min values - new Vector4(1.5f, -1.5f, 2.5f, -2.5f), // fractional values - new Vector4(-2.3f, 4.5f, -3.3f, 6.7f), // mixed sign values - new Vector4(123.456f, 789.123f, -456.789f, 321.654f), // large fractional values - new Vector4(-0.1f, 0.1f, -0.1f, 0.1f), // small fractional values - new Vector4(0f, -10f, 10f, -20f), // zero and positive/negative value - new Vector4(-10f, 0f, -10f, 0f), // negative value and zero - new Vector4(10f, 10f, 10f, 10f), // identical positive values - new Vector4(-10f, -10f, -10f, -10f), // identical negative values - new Vector4(0.001f, 0.001f, 0.001f, 0.001f), // very small positive values - new Vector4(-0.001f, -0.001f, -0.001f, -0.001f), // very small negative values - new Vector4(float.Epsilon, float.Epsilon, float.Epsilon, float.Epsilon), // smallest positive float - new Vector4(float.PositiveInfinity, float.NegativeInfinity, 0, -0), // mixed infinity and zero - new Vector4(-0.5f, 0.5f, -0.5f, 0.5f), // small mixed sign values - new Vector4(3.1415f, 2.7182f, 1.618f, 0.5772f), // mathematical constants - new Vector4(0f, 1f, 0f, 1f), // alternating zero and one - new Vector4(-1f, -2f, -3f, -4f), // sequential negative values - new Vector4(1f, 2f, 3f, 4f), // sequential positive values + new object[] { Vector4.zero, "all zeros" }, + new object[] { Vector4.one, "all ones" }, + new object[] { Vector4.positiveInfinity, "positive infinity" }, + new object[] { Vector4.negativeInfinity, "negative infinity" }, + new object[] { new Vector4(float.MaxValue, float.MaxValue, float.MaxValue, float.MaxValue), "Max values" }, + new object[] { new Vector4(float.MinValue, float.MinValue, float.MinValue, float.MinValue), "Min values" }, + new object[] { new Vector4(1.5f, -1.5f, 2.5f, -2.5f), "fractional values" }, + new object[] { new Vector4(-2.3f, 4.5f, -3.3f, 6.7f), "mixed sign values" }, + new object[] { new Vector4(123.456f, 789.123f, -456.789f, 321.654f), "large fractional values" }, + new object[] { new Vector4(-0.1f, 0.1f, -0.1f, 0.1f), "small fractional values" }, + new object[] { new Vector4(0f, -10f, 10f, -20f), "zero and positive/negative value" }, + new object[] { new Vector4(-10f, 0f, -10f, 0f), "negative value and zero" }, + new object[] { new Vector4(10f, 10f, 10f, 10f), "identical positive values" }, + new object[] { new Vector4(-10f, -10f, -10f, -10f), "identical negative values" }, + new object[] { new Vector4(0.001f, 0.001f, 0.001f, 0.001f), "very small positive values" }, + new object[] { new Vector4(-0.001f, -0.001f, -0.001f, -0.001f), "very small negative values" }, + new object[] { new Vector4(float.Epsilon, float.Epsilon, float.Epsilon, float.Epsilon), "smallest positive float" }, + new object[] { new Vector4(float.PositiveInfinity, float.NegativeInfinity, 0, -0), "mixed infinity and zero" }, + new object[] { new Vector4(-0.5f, 0.5f, -0.5f, 0.5f), "small mixed sign values" }, + new object[] { new Vector4(3.1415f, 2.7182f, 1.618f, 0.5772f), "mathematical constants" }, + new object[] { new Vector4(0f, 1f, 0f, 1f), "alternating zero and one" }, + new object[] { new Vector4(-1f, -2f, -3f, -4f), "sequential negative values" }, + new object[] { new Vector4(1f, 2f, 3f, 4f), "sequential positive values" } }; - public Vector4TypeSerializerTests(Vector4 value) : base(value) + public Vector4TypeSerializerTests(Vector4 value, string _) : base(value) { } }