Skip to content

Commit 0d1f868

Browse files
committed
Fix tests
1 parent bcd319e commit 0d1f868

File tree

4 files changed

+27
-26
lines changed

4 files changed

+27
-26
lines changed

Tests/Runtime/NativeArrayExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public void CopyFromTest<T>(T[] testData)
1313
where T : unmanaged
1414
{
1515
NativeArray<T> testNativeArray =
16-
new(testData.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
16+
new NativeArray<T>(testData.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
1717
try
1818
{
1919
Assert.IsTrue(testNativeArray.IsCreated);
@@ -35,7 +35,7 @@ public void CopyFromTest<T>(T[] testData)
3535
public void CopyTo<T>(T[] testData)
3636
where T : unmanaged
3737
{
38-
NativeArray<T> testNativeArray = new(testData, Allocator.Temp);
38+
NativeArray<T> testNativeArray = new NativeArray<T>(testData, Allocator.Temp);
3939
try
4040
{
4141
Assert.IsTrue(testNativeArray.IsCreated);

Tests/Runtime/NativeSliceExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public void CopyFromTest<T>(T[] testData)
1313
where T : unmanaged
1414
{
1515
NativeArray<T> testNativeArray =
16-
new(testData.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
16+
new NativeArray<T>(testData.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
1717
NativeSlice<T> testNativeSlice = testNativeArray.Slice();
1818

1919
try
@@ -37,7 +37,7 @@ public void CopyFromTest<T>(T[] testData)
3737
public void CopyTo<T>(T[] testData)
3838
where T : unmanaged
3939
{
40-
NativeArray<T> testNativeArray = new(testData, Allocator.Temp);
40+
NativeArray<T> testNativeArray = new NativeArray<T>(testData, Allocator.Temp);
4141
NativeSlice<T> testNativeSlice = testNativeArray.Slice();
4242

4343
try

Tests/Runtime/SpanExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public void CopyToReadOnlyTest<T>(T[] testData)
1313
where T : unmanaged
1414
{
1515
NativeArray<T> testNativeArray =
16-
new(testData.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
16+
new NativeArray<T>(testData.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
1717

1818
try
1919
{
@@ -37,7 +37,7 @@ public void CopyToTest<T>(T[] testData)
3737
where T : unmanaged
3838
{
3939
NativeArray<T> testNativeArray =
40-
new(testData.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
40+
new NativeArray<T>(testData.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
4141

4242
try
4343
{
Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{
2-
"name": "VoltstroStudios.NativeArraySpanExtensions.Tests",
3-
"rootNamespace": "VoltstroStudios.NativeArraySpanExtensions.Tests",
4-
"references": [
5-
"UnityEngine.TestRunner",
6-
"UnityEditor.TestRunner",
7-
"VoltstroStudios.NativeArraySpanExtensions"
8-
],
9-
"includePlatforms": [],
10-
"excludePlatforms": [],
11-
"allowUnsafeCode": false,
12-
"overrideReferences": true,
13-
"precompiledReferences": [
14-
"nunit.framework.dll"
15-
],
16-
"autoReferenced": false,
17-
"defineConstraints": [
18-
"UNITY_INCLUDE_TESTS"
19-
],
20-
"versionDefines": [],
21-
"noEngineReferences": false
2+
"name": "VoltstroStudios.NativeArraySpanExtensions.Tests",
3+
"rootNamespace": "VoltstroStudios.NativeArraySpanExtensions.Tests",
4+
"references": [
5+
"UnityEngine.TestRunner",
6+
"UnityEditor.TestRunner",
7+
"VoltstroStudios.NativeArraySpanExtensions"
8+
],
9+
"includePlatforms": [],
10+
"excludePlatforms": [],
11+
"allowUnsafeCode": false,
12+
"overrideReferences": true,
13+
"precompiledReferences": [
14+
"nunit.framework.dll",
15+
"System.Memory.dll"
16+
],
17+
"autoReferenced": false,
18+
"defineConstraints": [
19+
"UNITY_INCLUDE_TESTS"
20+
],
21+
"versionDefines": [],
22+
"noEngineReferences": false
2223
}

0 commit comments

Comments
 (0)