diff options
author | Sven Gothel <sgothel@jausoft.com> | 2012-12-31 16:39:15 +0100 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2012-12-31 16:39:15 +0100 |
commit | 921b33825340d27deec2883ded21cb7434decc94 (patch) | |
tree | 164ce843d4939144f63fd7d7db24124c86a332d4 /src/test | |
parent | 96f8f55a8db5f430fc17ce9ea1bf45e4728ab6ac (diff) |
Update PNGJ 0.85 -> 1.12 (w/ interlace read support) ; Added PNG Interlace read tests (TestPNGTextureFromFileNEWT)
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileAWT.java | 10 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java | 56 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscI01-160x90.png | bin | 0 -> 3729 bytes | |||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscIG01-160x90.png | bin | 0 -> 3745 bytes | |||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscN01-160x90.png | bin | 0 -> 2785 bytes |
5 files changed, 52 insertions, 14 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileAWT.java index 7dbccd5e0..07f35b5a5 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileAWT.java @@ -83,10 +83,12 @@ public class TestPNGTextureFromFileAWT extends UITestCase { public void initTest() throws IOException { grayTextureStream = TestPNGTextureFromFileAWT.class.getResourceAsStream( "grayscale_texture.png" ); Assert.assertNotNull(grayTextureStream); - URLConnection testTextureUrlConn = IOUtil.getResource("jogl/util/data/av/test-ntsc01-160x90.png", this.getClass().getClassLoader()); - Assert.assertNotNull(testTextureUrlConn); - testTextureStream = testTextureUrlConn.getInputStream(); - Assert.assertNotNull(testTextureStream); + { + URLConnection testTextureUrlConn = IOUtil.getResource(this.getClass(), "test-ntscN01-160x90.png"); + Assert.assertNotNull(testTextureUrlConn); + testTextureStream = testTextureUrlConn.getInputStream(); + Assert.assertNotNull(testTextureStream); + } } @After diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java index e9ef9b9b6..fe21f86a9 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java @@ -61,22 +61,40 @@ public class TestPNGTextureFromFileNEWT extends UITestCase { static boolean showFPS = false; static long duration = 100; // ms InputStream grayTextureStream; - InputStream testTextureStream; + InputStream testTextureStreamN; + InputStream testTextureStreamI; + InputStream testTextureStreamIG; @Before public void initTest() throws IOException { grayTextureStream = TestPNGTextureFromFileNEWT.class.getResourceAsStream( "grayscale_texture.png" ); Assert.assertNotNull(grayTextureStream); - URLConnection testTextureUrlConn = IOUtil.getResource("jogl/util/data/av/test-ntsc01-160x90.png", this.getClass().getClassLoader()); - Assert.assertNotNull(testTextureUrlConn); - testTextureStream = testTextureUrlConn.getInputStream(); - Assert.assertNotNull(testTextureStream); + { + URLConnection testTextureUrlConn = IOUtil.getResource(this.getClass(), "test-ntscN01-160x90.png"); + Assert.assertNotNull(testTextureUrlConn); + testTextureStreamN = testTextureUrlConn.getInputStream(); + Assert.assertNotNull(testTextureStreamN); + } + { + URLConnection testTextureUrlConn = IOUtil.getResource(this.getClass(), "test-ntscI01-160x90.png"); + Assert.assertNotNull(testTextureUrlConn); + testTextureStreamI = testTextureUrlConn.getInputStream(); + Assert.assertNotNull(testTextureStreamI); + } + { + URLConnection testTextureUrlConn = IOUtil.getResource(this.getClass(), "test-ntscIG01-160x90.png"); + Assert.assertNotNull(testTextureUrlConn); + testTextureStreamIG = testTextureUrlConn.getInputStream(); + Assert.assertNotNull(testTextureStreamIG); + } } @After public void cleanupTest() { grayTextureStream = null; - testTextureStream = null; + testTextureStreamN = null; + testTextureStreamI = null; + testTextureStreamIG = null; } public void testImpl(boolean useFFP, final InputStream istream) throws InterruptedException, IOException { @@ -146,12 +164,30 @@ public class TestPNGTextureFromFileNEWT extends UITestCase { } @Test - public void testTestPNGJLoaderGL2() throws InterruptedException, IOException { - testImpl(true, testTextureStream); + public void testTestN_PNGJLoaderGL2() throws InterruptedException, IOException { + testImpl(true, testTextureStreamN); + } + @Test + public void testTestN_PNGJLoaderES2() throws InterruptedException, IOException { + testImpl(false, testTextureStreamN); + } + + @Test + public void testTestI_PNGJLoaderGL2() throws InterruptedException, IOException { + testImpl(true, testTextureStreamI); + } + @Test + public void testTestI_PNGJLoaderES2() throws InterruptedException, IOException { + testImpl(false, testTextureStreamI); + } + + @Test + public void testTestIG_PNGJLoaderGL2() throws InterruptedException, IOException { + testImpl(true, testTextureStreamIG); } @Test - public void testTestPNGJLoaderES2() throws InterruptedException, IOException { - testImpl(false, testTextureStream); + public void testTestIG_PNGJLoaderES2() throws InterruptedException, IOException { + testImpl(false, testTextureStreamIG); } public static void main(String args[]) throws IOException { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscI01-160x90.png b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscI01-160x90.png Binary files differnew file mode 100644 index 000000000..e579c58c6 --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscI01-160x90.png diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscIG01-160x90.png b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscIG01-160x90.png Binary files differnew file mode 100644 index 000000000..b90a90988 --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscIG01-160x90.png diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscN01-160x90.png b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscN01-160x90.png Binary files differnew file mode 100644 index 000000000..3df47432e --- /dev/null +++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/test-ntscN01-160x90.png |