com.wallstop-studios.unity-helpers 2.0.0-rc79.4 → 2.0.0-rc79.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/dependabot.yml +5 -1
- package/.github/workflows/npm-publish.yml +2 -2
- package/Runtime/Core/Extension/EnumExtensions.cs +1 -1
- package/Runtime/Core/Extension/IReadonlyListExtensions.cs +1 -1
- package/Runtime/Core/Extension/IReadonlyListExtensions.cs.meta +1 -1
- package/Runtime/Core/Extension/StringExtensions.cs +1 -1
- package/Runtime/Core/Helper/ReflectionHelpers.cs +1368 -22
- package/Runtime/Core/Helper/StringInList.cs +3 -21
- package/Runtime/Core/Threading/SingleThreadedThreadPool.cs +157 -49
- package/Runtime/Utils/Buffers.cs +2 -2
- package/Runtime/Utils/SevenZip/Common/CRC.cs +9 -0
- package/Runtime/Utils/SevenZip/Common/InBuffer.cs +15 -2
- package/Runtime/Utils/SevenZip/Common/OutBuffer.cs +7 -2
- package/Runtime/Utils/SevenZip/Compress/LZ/LzBinTree.cs +50 -0
- package/Runtime/Utils/SevenZip/Compress/LZ/LzInWindow.cs +26 -0
- package/Runtime/Utils/SevenZip/Compress/LZ/LzOutWindow.cs +27 -0
- package/Runtime/Utils/SevenZip/Compress/LZMA/LzmaBase.cs +9 -0
- package/Runtime/Utils/SevenZip/Compress/LZMA/LzmaDecoder.cs +80 -17
- package/Runtime/Utils/SevenZip/Compress/LZMA/LzmaEncoder.cs +265 -30
- package/Runtime/Utils/SevenZip/Compress/RangeCoder/RangeCoder.cs +9 -0
- package/Runtime/Utils/SevenZip/Compress/RangeCoder/RangeCoderBit.cs +13 -1
- package/Runtime/Utils/SevenZip/Compress/RangeCoder/RangeCoderBitTree.cs +11 -4
- package/Tests/Runtime/Core/Threading/SingleThreadedThreadPoolTests.cs +54 -0
- package/Tests/Runtime/Core/Threading/SingleThreadedThreadPoolTests.cs.meta +3 -0
- package/Tests/Runtime/Core/Threading.meta +3 -0
- package/Tests/Runtime/Core.meta +3 -0
- package/Tests/Runtime/DataStructures/BalancedKDTreeTests.cs +1 -1
- package/Tests/Runtime/DataStructures/CyclicBufferTests.cs +1 -1
- package/Tests/Runtime/DataStructures/QuadTreeTests.cs +1 -1
- package/Tests/Runtime/DataStructures/SpatialTreeTests.cs +1 -1
- package/Tests/Runtime/DataStructures/UnbalancedKDTreeTests.cs +1 -1
- package/Tests/Runtime/Extensions/DictionaryExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/EnumExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/IListExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/IReadonlyListExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/IReadonlyListExtensionTests.cs.meta +1 -1
- package/Tests/Runtime/Extensions/LoggingExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/RandomExtensionTests.cs +1 -1
- package/Tests/Runtime/Extensions/StringExtensionTests.cs +1 -1
- package/Tests/Runtime/Helper/ObjectHelperTests.cs +1 -1
- package/Tests/Runtime/Helper/ReflectionHelperTests.cs +961 -0
- package/Tests/Runtime/Helper/WallMathTests.cs +1 -1
- package/Tests/Runtime/Performance/KDTreePerformanceTests.cs +1 -1
- package/Tests/Runtime/Performance/QuadTreePerformanceTests.cs +1 -1
- package/Tests/Runtime/Performance/SpatialTreePerformanceTest.cs +1 -2
- package/Tests/Runtime/Performance/UnbalancedKDTreeTests.cs +1 -1
- package/Tests/Runtime/Random/RandomTestBase.cs +2 -2
- package/Tests/Runtime/Serialization/JsonSerializationTest.cs +1 -1
- package/Tests/Runtime/Utils/BuffersTests.cs +6 -6
- package/Tests/Runtime/Utils/BuffersTests.cs.meta +1 -1
- package/package.json +3 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Helper
|
|
2
2
|
{
|
|
3
|
-
using Core.Extension;
|
|
4
3
|
using NUnit.Framework;
|
|
5
4
|
using UnityEngine;
|
|
5
|
+
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
6
6
|
using WallstopStudios.UnityHelpers.Core.Helper;
|
|
7
7
|
using WallstopStudios.UnityHelpers.Core.Random;
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Performance
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
-
using Core.DataStructure;
|
|
5
4
|
using UnityEngine;
|
|
5
|
+
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
6
|
|
|
7
7
|
public sealed class KDTreePerformanceTests : SpatialTreePerformanceTest<KDTree<Vector2>>
|
|
8
8
|
{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Performance
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
-
using Core.DataStructure;
|
|
5
4
|
using UnityEngine;
|
|
5
|
+
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
6
|
|
|
7
7
|
public sealed class QuadTreePerformanceTests : SpatialTreePerformanceTest<QuadTree<Vector2>>
|
|
8
8
|
{
|
|
@@ -4,12 +4,11 @@ namespace WallstopStudios.UnityHelpers.Tests.Performance
|
|
|
4
4
|
using System.Collections;
|
|
5
5
|
using System.Collections.Generic;
|
|
6
6
|
using System.Diagnostics;
|
|
7
|
-
using System.Linq;
|
|
8
7
|
using System.Threading.Tasks;
|
|
9
|
-
using Core.DataStructure;
|
|
10
8
|
using NUnit.Framework;
|
|
11
9
|
using UnityEngine;
|
|
12
10
|
using UnityEngine.TestTools;
|
|
11
|
+
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
13
12
|
|
|
14
13
|
public abstract class SpatialTreePerformanceTest<TTree>
|
|
15
14
|
where TTree : ISpatialTree<Vector2>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
namespace WallstopStudios.UnityHelpers.Tests.Performance
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
-
using Core.DataStructure;
|
|
5
4
|
using UnityEngine;
|
|
5
|
+
using WallstopStudios.UnityHelpers.Core.DataStructure;
|
|
6
6
|
|
|
7
7
|
public sealed class UnbalancedKDTreeTests : SpatialTreePerformanceTest<KDTree<Vector2>>
|
|
8
8
|
{
|
|
@@ -4,9 +4,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Random
|
|
|
4
4
|
using System.Collections.Generic;
|
|
5
5
|
using System.Linq;
|
|
6
6
|
using System.Runtime.CompilerServices;
|
|
7
|
-
using Core.DataStructure.Adapters;
|
|
8
|
-
using Core.Extension;
|
|
9
7
|
using NUnit.Framework;
|
|
8
|
+
using WallstopStudios.UnityHelpers.Core.DataStructure.Adapters;
|
|
9
|
+
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
10
10
|
using WallstopStudios.UnityHelpers.Core.Random;
|
|
11
11
|
using WallstopStudios.UnityHelpers.Core.Serialization;
|
|
12
12
|
|
|
@@ -5,9 +5,9 @@ namespace WallstopStudios.UnityHelpers.Tests.Serialization
|
|
|
5
5
|
using System.Linq;
|
|
6
6
|
using System.Runtime.Serialization;
|
|
7
7
|
using System.Text.Json.Serialization;
|
|
8
|
-
using Core.Extension;
|
|
9
8
|
using NUnit.Framework;
|
|
10
9
|
using UnityEngine;
|
|
10
|
+
using WallstopStudios.UnityHelpers.Core.Extension;
|
|
11
11
|
using WallstopStudios.UnityHelpers.Core.Helper;
|
|
12
12
|
using WallstopStudios.UnityHelpers.Core.Random;
|
|
13
13
|
using WallstopStudios.UnityHelpers.Core.Serialization;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
namespace WallstopStudios.UnityHelpers.Tests.Utils
|
|
2
2
|
{
|
|
3
3
|
using System.Collections.Generic;
|
|
4
4
|
using NUnit.Framework;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
public void GenericPoolListTests()
|
|
12
12
|
{
|
|
13
13
|
{
|
|
14
|
-
using PooledResource<List<int>> firstList =
|
|
15
|
-
using PooledResource<List<int>> secondList =
|
|
14
|
+
using PooledResource<List<int>> firstList = WallstopGenericPool<List<int>>.Get();
|
|
15
|
+
using PooledResource<List<int>> secondList = WallstopGenericPool<List<int>>.Get();
|
|
16
16
|
Assert.AreNotEqual(firstList, secondList);
|
|
17
17
|
firstList.resource.Add(1);
|
|
18
18
|
Assert.AreEqual(1, firstList.resource.Count);
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
{
|
|
25
25
|
// Ensure cleared
|
|
26
|
-
using PooledResource<List<int>> firstList =
|
|
26
|
+
using PooledResource<List<int>> firstList = WallstopGenericPool<List<int>>.Get();
|
|
27
27
|
Assert.AreEqual(0, firstList.resource.Count);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
{
|
|
34
34
|
for (int i = 0; i < 100; ++i)
|
|
35
35
|
{
|
|
36
|
-
using PooledResource<int[]> resource =
|
|
36
|
+
using PooledResource<int[]> resource = WallstopArrayPool<int>.Get(i);
|
|
37
37
|
Assert.AreEqual(i, resource.resource.Length);
|
|
38
38
|
for (int j = 0; j < i; ++j)
|
|
39
39
|
{
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
for (int i = 0; i < 100; ++i)
|
|
45
45
|
{
|
|
46
|
-
using PooledResource<int[]> resource =
|
|
46
|
+
using PooledResource<int[]> resource = WallstopArrayPool<int>.Get(i);
|
|
47
47
|
Assert.AreEqual(i, resource.resource.Length);
|
|
48
48
|
for (int j = 0; j < i; ++j)
|
|
49
49
|
{
|
package/package.json
CHANGED