jenetics / jpx

JPX - Java GPX library
Apache License 2.0
202 stars 30 forks source link

New line issues in tests #167

Closed ngx472 closed 10 months ago

ngx472 commented 1 year ago

Hi

Just installed on Windows and several test failed. e.g. issue162_NumberFormattingParsing The issue is that the following string has CRLF as line ends final var string = GPX.Writer.DEFAULT.toString(gpx); Whereas the expected value happens to have LF only (depends on the IDE setup and whether the file was touched and saved) The solution would be to compare while ignoring line endings. I believe it should be a feature of junit but team disagrees https://github.com/junit-team/junit5/issues/2394

Thanks Ngx

jenetics commented 1 year ago

This can be fixed by using AssertJ and use

org.assertj.core.api.Assertions
    .assertThat("asdf")
    .isEqualToIgnoringNewLines("sdf");

instead the native TestNG assertion.

jenetics commented 10 months ago

Merged into r3.1.0.