Skip to content

Commit 4d830bf

Browse files
test - fix
This resolves the trunk failures due to updates in collections.
1 parent ab77240 commit 4d830bf

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

com.unity.netcode.gameobjects/Tests/Runtime/NetworkVariableTests.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2509,7 +2509,11 @@ public string DictionaryStr<TKey, TVal>(Dictionary<TKey, TVal> list)
25092509

25102510
for (var i = 0; i < changed2Removes; ++i)
25112511
{
2512+
#if UTP_TRANSPORT_2_0_ABOVE
2513+
var which = rand.Next(changed2.Count);
2514+
#else
25122515
var which = rand.Next(changed2.Count());
2516+
#endif
25132517
T toRemove = default;
25142518
foreach (var check in changed2)
25152519
{
@@ -2581,7 +2585,11 @@ public string DictionaryStr<TKey, TVal>(Dictionary<TKey, TVal> list)
25812585

25822586
for (var i = 0; i < changed2Removes; ++i)
25832587
{
2588+
#if UTP_TRANSPORT_2_0_ABOVE
2589+
var which = rand.Next(changed2.Count);
2590+
#else
25842591
var which = rand.Next(changed2.Count());
2592+
#endif
25852593
TKey toRemove = default;
25862594
foreach (var check in changed2)
25872595
{
@@ -2598,7 +2606,11 @@ public string DictionaryStr<TKey, TVal>(Dictionary<TKey, TVal> list)
25982606

25992607
for (var i = 0; i < changed2Changes; ++i)
26002608
{
2609+
#if UTP_TRANSPORT_2_0_ABOVE
2610+
var which = rand.Next(changed2.Count);
2611+
#else
26012612
var which = rand.Next(changed2.Count());
2613+
#endif
26022614
TKey key = default;
26032615
foreach (var check in changed2)
26042616
{
@@ -3959,7 +3971,11 @@ public string NativeHashMapStr<TKey, TVal>(NativeHashMap<TKey, TVal> list)
39593971

39603972
for (var i = 0; i < changed2Removes; ++i)
39613973
{
3974+
#if UTP_TRANSPORT_2_0_ABOVE
3975+
var which = rand.Next(changed2.Count);
3976+
#else
39623977
var which = rand.Next(changed2.Count());
3978+
#endif
39633979
T toRemove = default;
39643980
foreach (var check in changed2)
39653981
{
@@ -4032,7 +4048,11 @@ public string NativeHashMapStr<TKey, TVal>(NativeHashMap<TKey, TVal> list)
40324048

40334049
for (var i = 0; i < changed2Removes; ++i)
40344050
{
4051+
#if UTP_TRANSPORT_2_0_ABOVE
4052+
var which = rand.Next(changed2.Count);
4053+
#else
40354054
var which = rand.Next(changed2.Count());
4055+
#endif
40364056
TKey toRemove = default;
40374057
foreach (var check in changed2)
40384058
{
@@ -4049,7 +4069,11 @@ public string NativeHashMapStr<TKey, TVal>(NativeHashMap<TKey, TVal> list)
40494069

40504070
for (var i = 0; i < changed2Changes; ++i)
40514071
{
4072+
#if UTP_TRANSPORT_2_0_ABOVE
4073+
var which = rand.Next(changed2.Count);
4074+
#else
40524075
var which = rand.Next(changed2.Count());
4076+
#endif
40534077
TKey key = default;
40544078
foreach (var check in changed2)
40554079
{

0 commit comments

Comments
 (0)