Skip to content

Some tests fail on Windows due to line.separator differences #56

@joelittlejohn

Description

@joelittlejohn

Original author: PaulGr...@gmail.com (July 04, 2012 21:29:38)

line.separator on Windows is \r\n, but static test case data assumes \n.

What steps will reproduce the problem?

  1. cd jsonschema2pojo-core
  2. mvn test

What is the expected output?

Results :

Tests run: 75, Failures: 0, Errors: 0, Skipped: 0

What do you see instead?

Failed tests:
applyWithNoAdditionalPropertiesAllowed(com.googlecode.jsonschema2pojo.rules.AdditionalPropertiesRuleTest):
applyWithDefaultAdditionalProperties(com.googlecode.jsonschema2pojo.rules.AdditionalPropertiesRuleTest):
applyWithAdditionalPropertiesStringSchema(com.googlecode.jsonschema2pojo.rules.AdditionalPropertiesRuleTest):
applyWithAdditionalPropertiesObjectSchema(com.googlecode.jsonschema2pojo.rules.AdditionalPropertiesRuleTest):
applyCreatesTextEnum(com.googlecode.jsonschema2pojo.rules.EnumRuleTest):
applyCreatesTextEnumWithSpaces(com.googlecode.jsonschema2pojo.rules.EnumRuleTest):
applyCreatesNumberEnum(com.googlecode.jsonschema2pojo.rules.EnumRuleTest):

Sample individual test:

java.lang.AssertionError:
Expected: "public class DummyClass {\n\n\n}\n"
got: "public class DummyClass {\r\n\r\n\r\n}\r\n"

at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:21)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
at com.googlecode.jsonschema2pojo.rules.AdditionalPropertiesRuleTest.applyWithNoAdditionalPropertiesAllowed(AdditionalPropertiesRuleTest.java:101)

What version of the product are you using? On what Java version?

Tried tests on:

Windows - failed.
Ubuntu - passed.

Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=56

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions