From 9f7db53bddf6dc495c698799839f659212509956 Mon Sep 17 00:00:00 2001 From: Gunnar Morling Date: Sun, 16 Jun 2013 17:53:15 +0200 Subject: [PATCH] Fix tests that failed on Win+jdk6 (error messages are preceeded with source file path) (from Andreas) --- .../erronuous/ErronuousCollectionMappingTest.java | 4 ++-- .../attributereference/ErroneousMappingsTest.java | 4 ++-- .../erroneous/typemismatch/ErroneousMappingsTest.java | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/processor/src/test/java/org/mapstruct/ap/test/collection/erronuous/ErronuousCollectionMappingTest.java b/processor/src/test/java/org/mapstruct/ap/test/collection/erronuous/ErronuousCollectionMappingTest.java index ac90935b5..8bf7a0733 100644 --- a/processor/src/test/java/org/mapstruct/ap/test/collection/erronuous/ErronuousCollectionMappingTest.java +++ b/processor/src/test/java/org/mapstruct/ap/test/collection/erronuous/ErronuousCollectionMappingTest.java @@ -44,11 +44,11 @@ public class ErronuousCollectionMappingTest extends MapperTestBase { @Diagnostic(type = ErronuousMapper.class, kind = Kind.ERROR, line = 28, - messageRegExp = "Can't generate mapping method from iterable type to non-iterable type\\."), + messageRegExp = ".*Can't generate mapping method from iterable type to non-iterable type\\."), @Diagnostic(type = ErronuousMapper.class, kind = Kind.ERROR, line = 30, - messageRegExp = "Can't generate mapping method from non-iterable type to iterable type\\.") + messageRegExp = ".*Can't generate mapping method from non-iterable type to iterable type\\.") } ) public void shouldFailToGenerateMappingFromListToString() { diff --git a/processor/src/test/java/org/mapstruct/ap/test/erroneous/attributereference/ErroneousMappingsTest.java b/processor/src/test/java/org/mapstruct/ap/test/erroneous/attributereference/ErroneousMappingsTest.java index 74eccdf2c..9fcbcf501 100644 --- a/processor/src/test/java/org/mapstruct/ap/test/erroneous/attributereference/ErroneousMappingsTest.java +++ b/processor/src/test/java/org/mapstruct/ap/test/erroneous/attributereference/ErroneousMappingsTest.java @@ -44,11 +44,11 @@ public class ErroneousMappingsTest extends MapperTestBase { @Diagnostic(type = ErroneousMapper.class, kind = Kind.ERROR, line = 27, - messageRegExp = "Unknown property \"bar\" in return type.*"), + messageRegExp = ".*Unknown property \"bar\" in return type.*"), @Diagnostic(type = ErroneousMapper.class, kind = Kind.ERROR, line = 30, - messageRegExp = "Unknown property \"bar\" in parameter type.*") + messageRegExp = ".*Unknown property \"bar\" in parameter type.*") } ) public void shouldFailToGenerateMappings() { diff --git a/processor/src/test/java/org/mapstruct/ap/test/erroneous/typemismatch/ErroneousMappingsTest.java b/processor/src/test/java/org/mapstruct/ap/test/erroneous/typemismatch/ErroneousMappingsTest.java index ad31b6a91..761513783 100644 --- a/processor/src/test/java/org/mapstruct/ap/test/erroneous/typemismatch/ErroneousMappingsTest.java +++ b/processor/src/test/java/org/mapstruct/ap/test/erroneous/typemismatch/ErroneousMappingsTest.java @@ -44,19 +44,19 @@ public class ErroneousMappingsTest extends MapperTestBase { @Diagnostic(type = ErroneousMapper.class, kind = Kind.ERROR, line = 26, - messageRegExp = "Can't map property \"boolean foo\" to \"int foo\"\\."), + messageRegExp = ".*Can't map property \"boolean foo\" to \"int foo\"\\."), @Diagnostic(type = ErroneousMapper.class, kind = Kind.ERROR, line = 28, - messageRegExp = "Can't map property \"int foo\" to \"boolean foo\"\\."), + messageRegExp = ".*Can't map property \"int foo\" to \"boolean foo\"\\."), @Diagnostic(type = ErroneousMapper.class, kind = Kind.ERROR, line = 30, - messageRegExp = "Can't generate mapping method with primitive return type\\."), + messageRegExp = ".*Can't generate mapping method with primitive return type\\."), @Diagnostic(type = ErroneousMapper.class, kind = Kind.ERROR, line = 32, - messageRegExp = "Can't generate mapping method with primitive parameter type\\.") + messageRegExp = ".*Can't generate mapping method with primitive parameter type\\.") } ) public void shouldFailToGenerateMappings() {