From ffde09410fb78c43bd45d6c5e62606789dced6eb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 3 Sep 2014 15:42:37 +0200 Subject: Bug 1059 _and_ version-compat breackage of commit c78ceb642d0ef5bb5bf27ff8ff1495175ee2e983 Commit c78ceb642d0ef5bb5bf27ff8ff1495175ee2e983 changed: - public static final String GL4 = "GL4"; + public static final String GL4 = "GL4".intern(); which is identified by semver as incompatible, due to Bug 1059 (no more inlining of interned string references). --- .../opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/test/com') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java index 5861d4233..dfa34be34 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java @@ -30,6 +30,7 @@ package com.jogamp.opengl.test.junit.jogl.acore; import java.io.IOException; +import org.junit.Assert; import org.junit.Test; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @@ -44,7 +45,19 @@ import com.jogamp.opengl.test.junit.util.UITestCase; public class TestGLProfile00NEWT extends UITestCase { @Test - public void testInitSingleton() throws InterruptedException { + public void test01InternedString() { + final String s1 = "GL2"; + final String s2 = "GL2"; + Assert.assertEquals(s1, s2); + Assert.assertTrue("s1-ref != s2-ref", s1 == s2); + Assert.assertTrue("s1-ref != 'GL2'-ref", s1 == "GL2"); + + Assert.assertEquals("GL2", GLProfile.GL2); + Assert.assertTrue("GLProfile-ref != 'GL2'-ref", GLProfile.GL2 == "GL2"); + } + + @Test + public void test02InitSingleton() throws InterruptedException { GLProfile.initSingleton(); System.err.println("Desktop"); final GLDrawableFactory desktopFactory = GLDrawableFactory.getDesktopFactory(); -- cgit v1.2.3