Closed TobiasNx closed 1 month ago
@blackwinter could you help me how I would continue here? I would suggest to drop the _default
version of metamorph.
I've changed the default handling according to our last discussion:
default
from options.__default
from map.(27634d1)
Still needs tests and documentation.
@blackwinter I added tests and tried them locally but they still seem to fail:
MetafixLookupTest > shouldUseDefaultOptionValueIfNotFound() STANDARD_ERROR
[Test worker] WARN org.metafacture.metafix.validation.XtextValidator - The FixStandaloneSetup file '/tmp/metafix1977380759175164437.fix' has 1 issue:
[Test worker] WARN org.metafacture.metafix.validation.XtextValidator - - ERROR: no viable alternative at input 'default' (2:28)
MetafixLookupTest > shouldUseDefaultOptionValueIfNotFound() FAILED
org.metafacture.metafix.FixParseException: Invalid FixStandaloneSetup resource: /tmp/metafix1977380759175164437.fix
at app//org.metafacture.metafix.validation.XtextValidator.getValidatedResource(XtextValidator.java:73)
at app//org.metafacture.metafix.FixStandaloneSetup.parseFix(FixStandaloneSetup.java:31)
at app//org.metafacture.metafix.FixStandaloneSetup.parseFix(FixStandaloneSetup.java:36)
at app//org.metafacture.metafix.Metafix.getRecordTransformer(Metafix.java:205)
at app//org.metafacture.metafix.Metafix.<init>(Metafix.java:119)
at app//org.metafacture.metafix.MetafixTestHelpers.fix(MetafixTestHelpers.java:151)
at app//org.metafacture.metafix.MetafixTestHelpers.assertFix(MetafixTestHelpers.java:133)
at app//org.metafacture.metafix.MetafixTestHelpers.assertFix(MetafixTestHelpers.java:112)
at app//org.metafacture.metafix.MetafixLookupTest.shouldUseDefaultOptionValueIfNotFound(MetafixLookupTest.java:643)
Could it be that default
is a reserved keyword and needs to be quoted (like var
)?
I adde @fsteeg for code review
Resolves #333.