Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed broken unit tests under Linux. #4614

Merged
merged 1 commit into from Mar 31, 2016

Conversation

@cra0zy
Copy link
Member

commented Mar 7, 2016

No description provided.

Assert.NotNull(externalReferences.Texture);
Assert.IsTrue(externalReferences.Texture.Filename.EndsWith(@"\Xml\grass.tga"));
Assert.IsTrue(externalReferences.Texture.Filename.EndsWith(pathSeparator + "Xml" + pathSeparator + "grass.tga"));

This comment has been minimized.

Copy link
@tomspilman

tomspilman Mar 7, 2016

Member

Can we just make these forward slashes in the xml file? I don't think that would make the test worse and it should work on both Windows and non-Windows platforms.

This comment has been minimized.

Copy link
@cra0zy

cra0zy Mar 8, 2016

Author Member

I am confused by what you mean by that... if you mean the "17_ExternalReferences.xml" xml file, that file contains file name, not file path... plus it will get autoconverted to correct slashes.

This comment has been minimized.

Copy link
@cra0zy

cra0zy Mar 19, 2016

Author Member

I think I found a nicer way of doing this, good now?

This comment has been minimized.

Copy link
@KonajuGames

KonajuGames Mar 19, 2016

Contributor

I understand how this works now. The filename stored in the object created by the deserialization gets the platform-specific path separators. In XNA of course it used Windows path separators, but other platforms get the forward slashes. So we need the test to check for the correct platform path separators.

@cra0zy cra0zy force-pushed the cra0zy:nunittestfixups branch from cc8823c to 624bf4d Mar 17, 2016

@cra0zy cra0zy force-pushed the cra0zy:nunittestfixups branch 9 times, most recently from 5700330 to a229677 Mar 17, 2016

@cra0zy cra0zy force-pushed the cra0zy:nunittestfixups branch from a229677 to 6fd168e Mar 19, 2016

@@ -136,6 +136,7 @@
<!-- Covers compatible GL implementations, such as ANGLE and OpenGL -->
</Service>
<Service Name="_XNADesignProvided">
<AddDefine>XNADESIGNPROVIDED</AddDefine>

This comment has been minimized.

Copy link
@tomspilman

tomspilman Mar 31, 2016

Member

@cra0zy - What is the reason for this?

This comment has been minimized.

Copy link
@cra0zy

cra0zy Mar 31, 2016

Author Member

Vector classes

This comment has been minimized.

Copy link
@tomspilman

tomspilman Mar 31, 2016

Member

I saw that... just wasn't sure what the problem is.

My guess is that previously we were only setting the type converters on Windows builds and with this it now appears on Mac and Linux too?

This comment has been minimized.

Copy link
@cra0zy

cra0zy Mar 31, 2016

Author Member

Yes, plus in the future if we want to add more platforms to it, all we have to do is just connect the service, no need to modify any .cs files.

@tomspilman

This comment has been minimized.

Copy link
Member

commented Mar 31, 2016

Thanks @cra0zy !

@tomspilman tomspilman added this to the 3.6 Release milestone Mar 31, 2016

@tomspilman tomspilman merged commit e7799dd into MonoGame:develop Mar 31, 2016

5 checks passed

Build Mac, iOS, and Linux Finished TeamCity Build MonoGame :: Build Mac : Running
Details
Build Windows, Web, Android, and OUYA Finished TeamCity Build MonoGame :: Build Windows : Running
Details
Package Mac and Linux Finished TeamCity Build MonoGame :: Package Mac and Linux : Running
Details
Package Windows SDK Finished TeamCity Build MonoGame :: Package Windows : Running
Details
Test Windows Finished TeamCity Build MonoGame :: Test Windows : Tests passed: 598, ignored: 6
Details

@cra0zy cra0zy deleted the cra0zy:nunittestfixups branch Mar 31, 2016

@tomspilman tomspilman referenced this pull request Mar 31, 2016

@tomspilman tomspilman changed the title [Nunit] Fixed few Unix tests Fixed broken unit tests under Linux. Apr 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.