aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-03 15:42:37 +0200
committerSven Gothel <[email protected]>2014-09-03 15:42:37 +0200
commitffde09410fb78c43bd45d6c5e62606789dced6eb (patch)
tree66aed6741bb713f450039edf6819d5ffab7b483b /src/test/com
parent9b7ab72d9b098942ee599a106b142cac8c16fd9b (diff)
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).
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java15
1 files changed, 14 insertions, 1 deletions
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();