From 6c30050195849cd385422fc6e65230c16b818215 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 19 Jun 2013 05:29:59 +0200 Subject: Fix URLCompositionTest for Bug 757 (3): If file, replace '/' in expected result w/ OS specific File.separatorChar Take 3 (duh!): JRE impl. varies .. i.e. plain URL w/o JAR path differs from URL w/ JAR scheme on Windows .. well. --- src/junit/com/jogamp/common/net/URLCompositionTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/junit') diff --git a/src/junit/com/jogamp/common/net/URLCompositionTest.java b/src/junit/com/jogamp/common/net/URLCompositionTest.java index 9380d79..5d19c1d 100644 --- a/src/junit/com/jogamp/common/net/URLCompositionTest.java +++ b/src/junit/com/jogamp/common/net/URLCompositionTest.java @@ -130,8 +130,10 @@ public class URLCompositionTest extends JunitTracer { } else { expectedOS = expected; } - System.err.println("expected: "+expected+", "+expectedOS); - Assert.assertEquals(expectedOS, actual); + System.err.println("expected: orig "+expected+", OS "+expectedOS); + final boolean equalsA = expected.equals(actual); + final boolean equalsB = expectedOS.equals(actual); + Assert.assertTrue("No match, neither expected orig or OS w/ url", equalsA || equalsB); System.err.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"); } -- cgit v1.2.3