Skip to content

Commit d8efc9b

Browse files
committed
Opt out generic inheritance test cases from Unity build because Mono 2.7.3 AOT fails with bizarre NullReferenceException.
1 parent 768ea40 commit d8efc9b

13 files changed

+72
-11
lines changed

test/MsgPack.UnitTest.CodeDom/Serialization/ArrayCodeDomBasedAutoMessagePackSerializerTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,9 @@ public class ExclusionAndInclusionSimulatously
22482248

22492249
#endregion -- Exclusion --
22502250

2251-
// Issue 119
2251+
#if !UNITY
2252+
// Mono 2.7.3 AOT fails when these classes are used...
2253+
// Issue 119
22522254
#region -- Generic --
22532255

22542256
[Test]
@@ -2337,6 +2339,9 @@ public void TestGenericRecordDerived_Reference_Success()
23372339

23382340
#endregion -- Generic --
23392341

2342+
#endif // !UNITY
2343+
2344+
23402345
public class HasInitOnlyField
23412346
{
23422347
public readonly string Field = "ABC";

test/MsgPack.UnitTest.CodeDom/Serialization/MapCodeDomBasedAutoMessagePackSerializerTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2254,7 +2254,9 @@ public class ExclusionAndInclusionSimulatously
22542254

22552255
#endregion -- Exclusion --
22562256

2257-
// Issue 119
2257+
#if !UNITY
2258+
// Mono 2.7.3 AOT fails when these classes are used...
2259+
// Issue 119
22582260
#region -- Generic --
22592261

22602262
[Test]
@@ -2343,6 +2345,9 @@ public void TestGenericRecordDerived_Reference_Success()
23432345

23442346
#endregion -- Generic --
23452347

2348+
#endif // !UNITY
2349+
2350+
23462351
public class HasInitOnlyField
23472352
{
23482353
public readonly string Field = "ABC";

test/MsgPack.UnitTest/Serialization/ArrayContextBasedAutoMessagePackSerializerTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,9 @@ public class ExclusionAndInclusionSimulatously
22482248

22492249
#endregion -- Exclusion --
22502250

2251-
// Issue 119
2251+
#if !UNITY
2252+
// Mono 2.7.3 AOT fails when these classes are used...
2253+
// Issue 119
22522254
#region -- Generic --
22532255

22542256
[Test]
@@ -2337,6 +2339,9 @@ public void TestGenericRecordDerived_Reference_Success()
23372339

23382340
#endregion -- Generic --
23392341

2342+
#endif // !UNITY
2343+
2344+
23402345
public class HasInitOnlyField
23412346
{
23422347
public readonly string Field = "ABC";

test/MsgPack.UnitTest/Serialization/ArrayExpressionBasedAutoMessagePackSerializerTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,9 @@ public class ExclusionAndInclusionSimulatously
22482248

22492249
#endregion -- Exclusion --
22502250

2251-
// Issue 119
2251+
#if !UNITY
2252+
// Mono 2.7.3 AOT fails when these classes are used...
2253+
// Issue 119
22522254
#region -- Generic --
22532255

22542256
[Test]
@@ -2337,6 +2339,9 @@ public void TestGenericRecordDerived_Reference_Success()
23372339

23382340
#endregion -- Generic --
23392341

2342+
#endif // !UNITY
2343+
2344+
23402345
public class HasInitOnlyField
23412346
{
23422347
public readonly string Field = "ABC";

test/MsgPack.UnitTest/Serialization/ArrayFieldBasedAutoMessagePackSerializerTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,9 @@ public class ExclusionAndInclusionSimulatously
22482248

22492249
#endregion -- Exclusion --
22502250

2251-
// Issue 119
2251+
#if !UNITY
2252+
// Mono 2.7.3 AOT fails when these classes are used...
2253+
// Issue 119
22522254
#region -- Generic --
22532255

22542256
[Test]
@@ -2337,6 +2339,9 @@ public void TestGenericRecordDerived_Reference_Success()
23372339

23382340
#endregion -- Generic --
23392341

2342+
#endif // !UNITY
2343+
2344+
23402345
public class HasInitOnlyField
23412346
{
23422347
public readonly string Field = "ABC";

test/MsgPack.UnitTest/Serialization/ArrayReflectionBasedAutoMessagePackSerializerTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2248,7 +2248,9 @@ public class ExclusionAndInclusionSimulatously
22482248

22492249
#endregion -- Exclusion --
22502250

2251-
// Issue 119
2251+
#if !UNITY
2252+
// Mono 2.7.3 AOT fails when these classes are used...
2253+
// Issue 119
22522254
#region -- Generic --
22532255

22542256
[Test]
@@ -2337,6 +2339,9 @@ public void TestGenericRecordDerived_Reference_Success()
23372339

23382340
#endregion -- Generic --
23392341

2342+
#endif // !UNITY
2343+
2344+
23402345
public class HasInitOnlyField
23412346
{
23422347
public readonly string Field = "ABC";

test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,6 +1338,8 @@ public static IEqualityComparer<T> GetEqualityComparer<T>()
13381338
}
13391339
}
13401340

1341+
#if !UNITY
1342+
// Mono 2.7.3 AOT fails when these classes are used...
13411343
// Issue 119
13421344
public abstract class GenericClass<T>
13431345
{
@@ -1376,6 +1378,7 @@ public class GenericRecordReferenceClass : GenericRecordClass<string>
13761378
public GenericRecordReferenceClass( string genericField, string genericProperty )
13771379
: base( genericField, genericProperty ) { }
13781380
}
1381+
#endif // !UNITY
13791382

13801383
#region -- Polymorphism --
13811384
#region ---- KnownType ----

test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.tt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,8 @@ foreach( Tuple<Object, string, string, bool> __item in __fields )
930930
}
931931
}
932932

933+
#if !UNITY
934+
// Mono 2.7.3 AOT fails when these classes are used...
933935
// Issue 119
934936
public abstract class GenericClass<T>
935937
{
@@ -968,6 +970,7 @@ foreach( Tuple<Object, string, string, bool> __item in __fields )
968970
public GenericRecordReferenceClass( string genericField, string genericProperty )
969971
: base( genericField, genericProperty ) { }
970972
}
973+
#endif // !UNITY
971974

972975
<#
973976
GeneratePolymorphismTestTypes();

test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.ttinclude

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2240,7 +2240,9 @@ namespace MsgPack.Serialization
22402240

22412241
#endregion -- Exclusion --
22422242

2243-
// Issue 119
2243+
#if !UNITY
2244+
// Mono 2.7.3 AOT fails when these classes are used...
2245+
// Issue 119
22442246
#region -- Generic --
22452247
<#+
22462248
foreach( var target in new [] { "Generic", "GenericRecord" } )
@@ -2295,6 +2297,9 @@ namespace MsgPack.Serialization
22952297

22962298
#endregion -- Generic --
22972299

2300+
#endif // !UNITY
2301+
2302+
22982303
<#+
22992304
}
23002305
#>

test/MsgPack.UnitTest/Serialization/MapContextBasedAutoMessagePackSerializerTest.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2254,7 +2254,9 @@ public class ExclusionAndInclusionSimulatously
22542254

22552255
#endregion -- Exclusion --
22562256

2257-
// Issue 119
2257+
#if !UNITY
2258+
// Mono 2.7.3 AOT fails when these classes are used...
2259+
// Issue 119
22582260
#region -- Generic --
22592261

22602262
[Test]
@@ -2343,6 +2345,9 @@ public void TestGenericRecordDerived_Reference_Success()
23432345

23442346
#endregion -- Generic --
23452347

2348+
#endif // !UNITY
2349+
2350+
23462351
public class HasInitOnlyField
23472352
{
23482353
public readonly string Field = "ABC";

0 commit comments

Comments
 (0)