aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-03-30 06:09:52 +0100
committerSven Gothel <[email protected]>2019-03-30 06:09:52 +0100
commit31869130c3580a1a1c9e2f57e48d5712a3eebda1 (patch)
treea559bf7455913f2c7621f8e15cfa10c4867ee532 /src/test
parentb83a912f19685e81b71c950914f0f82cc0e534bf (diff)
Bug 1366 - Use String.format((Locale)null, "..." ..) avoiding Locale output for System related Operations
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java3
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java3
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java3
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java5
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00BaseAWT.java3
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java3
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java3
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/UITestCase.java3
8 files changed, 17 insertions, 9 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
index 36e263f78..f37f6b7e0 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
@@ -30,6 +30,7 @@ package com.jogamp.opengl.test.junit.graph;
import java.io.File;
import java.io.IOException;
import java.net.URL;
+import java.util.Locale;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2ES2;
@@ -343,7 +344,7 @@ public class TestTextRendererNEWT00 extends UITestCase {
public void printScreen(final int renderModes, final GLAutoDrawable drawable, final String dir, final String objName, final boolean exportAlpha) throws GLException, IOException {
final String modeS = Region.getRenderModeString(renderModes);
- final String bname = String.format("%s-msaa%02d-fontsz%02.1f-%03dx%03d-%s%04d", objName,
+ final String bname = String.format((Locale)null, "%s-msaa%02d-fontsz%02.1f-%03dx%03d-%s%04d", objName,
drawable.getChosenGLCapabilities().getNumSamples(),
TestTextRendererNEWT00.fontSizeFixed, drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), modeS, vbaaSampleCount[0]);
final String filename = dir + bname +".png";
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
index 37d457057..b452e091d 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT10.java
@@ -29,6 +29,7 @@ package com.jogamp.opengl.test.junit.graph;
import java.io.File;
import java.io.IOException;
+import java.util.Locale;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2ES2;
@@ -242,7 +243,7 @@ public class TestTextRendererNEWT10 extends UITestCase {
final String objName = getSimpleTestName(".")+"-snap"+screenshot_num;
screenshot_num++;
final String modeS = Region.getRenderModeString(renderModes);
- final String bname = String.format("%s-msaa%02d-fontsz%02.1f-%03dx%03d-%s%04d", objName,
+ final String bname = String.format((Locale)null, "%s-msaa%02d-fontsz%02.1f-%03dx%03d-%s%04d", objName,
drawable.getChosenGLCapabilities().getNumSamples(),
TestTextRendererNEWT10.fontSize, drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), modeS, sampleCount);
final String filename = dir + bname +".png";
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java
index 678361f24..e6ae83911 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWTBugXXXX.java
@@ -29,6 +29,7 @@ package com.jogamp.opengl.test.junit.graph;
import java.io.File;
import java.io.IOException;
+import java.util.Locale;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2ES2;
@@ -212,7 +213,7 @@ public class TestTextRendererNEWTBugXXXX extends UITestCase {
final String objName = getSimpleTestName(".")+"-snap"+screenshot_num;
screenshot_num++;
final String modeS = Region.getRenderModeString(renderModes);
- final String bname = String.format("%s-msaa%02d-fontsz%02.1f-%03dx%03d-%s%04d", objName,
+ final String bname = String.format((Locale)null, "%s-msaa%02d-fontsz%02.1f-%03dx%03d-%s%04d", objName,
drawable.getChosenGLCapabilities().getNumSamples(),
TestTextRendererNEWTBugXXXX.fontSize, drawable.getSurfaceWidth(), drawable.getSurfaceHeight(), modeS, sampleCount);
final String filename = dir + bname +".png";
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
index 33b7e2787..a55ed26c0 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
@@ -6,6 +6,7 @@ import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.Locale;
import com.jogamp.opengl.GL;
import com.jogamp.opengl.GL2ES2;
@@ -790,7 +791,7 @@ public class GPUUISceneGLListener0A implements GLEventListener {
public void printScreen(final GL gl) {
final String modeS = Region.getRenderModeString(jogampLabel.getRenderModes());
- final String filename = String.format("GraphUIDemo-shot%03d-%03dx%03d-S_%s_%02d.png",
+ final String filename = String.format((Locale)null, "GraphUIDemo-shot%03d-%03dx%03d-S_%s_%02d.png",
shotCount++, renderer.getWidth(), renderer.getHeight(),
modeS, sceneUIController.getSampleCount());
gl.glFinish(); // just make sure rendering finished ..
@@ -948,7 +949,7 @@ public class GPUUISceneGLListener0A implements GLEventListener {
// final float dy = -(ny - dragLastY);
shapeEvent.shape.translate(dx, dy, 0f);
final float[] tx = shapeEvent.shape.getTranslate();
- actionText = String.format("Pos %6.2f / %6.2f / %6.2f", tx[0], tx[1], tx[2]);
+ actionText = String.format((Locale)null, "Pos %6.2f / %6.2f / %6.2f", tx[0], tx[1], tx[2]);
}
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00BaseAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00BaseAWT.java
index 7b28c6896..cf0adab67 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00BaseAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/GLReadBuffer00BaseAWT.java
@@ -30,6 +30,7 @@ package com.jogamp.opengl.test.junit.jogl.acore;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
+import java.util.Locale;
import javax.imageio.ImageIO;
import com.jogamp.opengl.GL;
@@ -85,7 +86,7 @@ public abstract class GLReadBuffer00BaseAWT extends GLReadBuffer00Base {
}
public void snapshot(final int sn, final GL gl, final String fileSuffix, final String destPath) {
final GLDrawable drawable = gl.getContext().getGLReadDrawable();
- final String postSNDetail = String.format("awt-usr%03d", textRendererGLEL.userCounter);
+ final String postSNDetail = String.format((Locale)null, "awt-usr%03d", textRendererGLEL.userCounter);
final String filenameAWT = getSnapshotFilename(sn, postSNDetail,
drawable.getChosenGLCapabilities(), drawable.getSurfaceWidth(), drawable.getSurfaceHeight(),
glReadBufferUtil.hasAlpha(), fileSuffix, destPath);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java
index 3add9685d..f558f698f 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLReadBuffer01GLWindowNEWT.java
@@ -28,6 +28,7 @@
package com.jogamp.opengl.test.junit.jogl.acore;
import java.io.File;
+import java.util.Locale;
import com.jogamp.nativewindow.util.Dimension;
import com.jogamp.nativewindow.util.DimensionImmutable;
@@ -184,7 +185,7 @@ public class TestGLReadBuffer01GLWindowNEWT extends GLReadBuffer00Base {
}
public void snapshot(final int sn, final GLAutoDrawable drawable, final String fileSuffix, final String destPath) {
final GL gl = drawable.getGL();
- final String postSNDetail = String.format("jgl-usr%03d", textRendererGLEL.userCounter);
+ final String postSNDetail = String.format((Locale)null, "jgl-usr%03d", textRendererGLEL.userCounter);
final String filenameJGL = getSnapshotFilename(sn, postSNDetail,
drawable.getChosenGLCapabilities(), drawable.getSurfaceWidth(), drawable.getSurfaceHeight(),
glReadBufferUtil.hasAlpha(), fileSuffix, destPath);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java
index be662fd1f..9c4943176 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/tile/TiledPrintingAWTBase.java
@@ -39,6 +39,7 @@ import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
+import java.util.Locale;
import com.jogamp.opengl.GLAutoDrawable;
import javax.print.StreamPrintService;
@@ -139,7 +140,7 @@ public abstract class TiledPrintingAWTBase extends UITestCase {
final String simpleTestName = getSimpleTestName(".");
final String onoffscrn = 0 > offscrnImageType ? "on_screen" : "offscrn_"+offscrnImageType;
final String aa = 0 <= numSamples ? "aa"+numSamples : "aaN";
- return String.format("%-"+maxSimpleTestNameLen+"s-n%04d-%s-dpi%03d-%s-tSz%04dx%04d-resize%d.%s",
+ return String.format((Locale)null, "%-"+maxSimpleTestNameLen+"s-n%04d-%s-dpi%03d-%s-tSz%04dx%04d-resize%d.%s",
simpleTestName, printCount, onoffscrn, dpi, aa, tileWidth, tileHeight, resizeWithinPrintTest?1:0, suffix).replace(' ', '_');
}
private PrintableBase doPrintAutoImpl(final Container cont, final PrinterJob job,
diff --git a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
index 2b1bb7062..7003b3980 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
@@ -36,6 +36,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import java.util.Locale;
import java.util.StringTokenizer;
import java.util.concurrent.atomic.AtomicInteger;
@@ -241,7 +242,7 @@ public abstract class UITestCase extends SingletonJunitCase {
final String aaext = caps.getSampleExtension();
postSNDetail = null != postSNDetail ? "-"+postSNDetail : "";
- filenameBaseName = String.format("%-"+maxSimpleTestNameLen+"s-n%04d%s-%-6s-%s-%s-B%s-F%s_I%s-D%02d-St%02d-Sa%02d_%s-%04dx%04d.%s",
+ filenameBaseName = String.format((Locale)null, "%-"+maxSimpleTestNameLen+"s-n%04d%s-%-6s-%s-%s-B%s-F%s_I%s-D%02d-St%02d-Sa%02d_%s-%04dx%04d.%s",
simpleTestName, sn, postSNDetail, caps.getGLProfile().getName(), accel,
scrnm, dblb, F_pfmt, pfmt, depthBits, stencilBits, samples, aaext,
width, height, fileSuffix).replace(' ', '_');