Closed applejag closed 4 years ago
Turns out referencing the correct NUnit.Framework version (3.5.0.0) in the Newtonsoft.Json.Tests then it can be build by the side and then Unity will see the tests from within the precompiled dll and they're fully runnable.
For reference, found the correct NUnit version by inspecting the Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll, from within the Unity project.
Tested in Unity 2019.2.11f1.
For reasons I do not know, there are 5 tests that did not run. Unity won't show which they are. Shows 0 tests if I filter to only show tests that did not run. Weird /shrug
Fixed by #36
Description
Newtonsoft.Json 12.0.3 introduced usage of the nullable context. It works fine when building the package thanks to the
Microsoft.Net.Compilers.Toolset
NuGet package that can compile to .NET Framework even if the code contains nullable references syntax.Less so lucky with Mono inside Unity.
Expected behavior
Mono compiles the Newtonsoft.Json.Tests code to then let Unity Test Framework run all the NUnit tests.
Actual behavior
Syntax error.
Full logs: https://app.circleci.com/jobs/github/jilleJr/Newtonsoft.Json-for-Unity/468
Details
Host machine OS running Unity Editor ๐ Linux
Unity build target ๐ Linux (Mono)
Newtonsoft.Json-for-Unity package version ๐ 12.0.301
I was using Unity version ๐ 2019.2.11f1, 2018.4.14f1