Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix PlatformTests #13517
Fixed the failing tests in PlatformTest.
The AppDomain.CurrentDomain.BaseDirectory property was a bit of a gotcha because I got a trailing backslash from it when debugging the game, but not in the test.
Perhaps the BUG-comment is redundant, if it is missing the separator we just add it in the property.
Two tests fails:
Expected string length 43 but was 42. Strings differ at index 34.
at OpenRA.Test.PlatformTest.ResolvePath() in C:\Users\musku\Source\Repos\OpenRA\OpenRA.Test\OpenRA.Game\PlatformTest.cs:line 36
Expected string length 10 but was 11. Strings differ at index 2.
at OpenRA.Test.PlatformTest.UnresolvePath() in C:\Users\musku\Source\Repos\OpenRA\OpenRA.Test\OpenRA.Game\PlatformTest.cs:line 52
Alright, I wonder why we get different outcome on Win10.
I found another one having same problem
One guy answered that it has something to do with the appdomains
After digging some more it seems that it has been a source to problems that the apppool is initialized differently.
Here's a bug for corecrl where they say it's a error in the host.
It seems to run properly if I run it using visual studio's mstest-tool (had to add NUnit3TestAdapter nuget reference, are we not using Nuget-packages btw?)
And if I run with resharper's testrunner it fails with the error I have written above.