@Test public final void testFragmentShaderCompileEmpty1() { final JCGLShadersType s = this.getShaders("main"); final List<String> lines = new ArrayList<>(3); lines.add(" "); lines.add("\t"); lines.add("\n"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileFragment("empty1", lines); }
@Test public final void testFragmentShaderCompileEmpty1() { final JCGLShadersType s = this.getShaders("main"); final List<String> lines = new ArrayList<>(3); lines.add(" "); lines.add("\t"); lines.add("\n"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileFragment("empty1", lines); }
@Test public final void testFragmentShaderCompileEmpty0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileFragment("empty0", new ArrayList<>(0)); }
@Test public final void testFragmentShaderCompileEmpty0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileFragment("empty0", new ArrayList<>(0)); }
@Test public final void testFragmentShaderCompileInvalid0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileFragment("invalid0", this.getShaderLines("invalid0.frag")); }
@Test public final void testFragmentShaderCompileInvalid0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileFragment("invalid0", this.getShaderLines("invalid0.frag")); }
@Test public final void testProgramLinkIncompatible() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex( "incompatible0", this.getShaderLines("incompatible0.vert")); final JCGLFragmentShaderType f = s.shaderCompileFragment( "incompatible0", this.getShaderLines("incompatible0.frag")); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderLinkProgram("incompatible0", v, Optional.empty(), f); }
@Test public final void testProgramLinkIncompatible() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex( "incompatible0", this.getShaderLines("incompatible0.vert")); final JCGLFragmentShaderType f = s.shaderCompileFragment( "incompatible0", this.getShaderLines("incompatible0.frag")); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderLinkProgram("incompatible0", v, Optional.empty(), f); }
@Test public final void testFragmentShaderDeleteIdentity() { final JCGLShadersType s = this.getShaders("main"); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteFragment(f); Assert.assertTrue(f.isDeleted()); }
@Test public final void testFragmentShaderDeleteDeleted() { final JCGLShadersType s = this.getShaders("main"); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteFragment(f); this.expected.expect(JCGLExceptionDeleted.class); s.shaderDeleteFragment(f); }
@Test public final void testFragmentShaderDeleteIdentity() { final JCGLShadersType s = this.getShaders("main"); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteFragment(f); Assert.assertTrue(f.isDeleted()); }
@Test public final void testFragmentShaderDeleteDeleted() { final JCGLShadersType s = this.getShaders("main"); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteFragment(f); this.expected.expect(JCGLExceptionDeleted.class); s.shaderDeleteFragment(f); }
@Test public final void testProgramActivateDeleted() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); final JCGLProgramShaderType p = s.shaderLinkProgram("valid0", v, Optional.empty(), f); s.shaderDeleteProgram(p); this.expected.expect(JCGLExceptionDeleted.class); s.shaderActivateProgram(p); }
@Test public final void testProgramActivateDeleted() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); final JCGLProgramShaderType p = s.shaderLinkProgram("valid0", v, Optional.empty(), f); s.shaderDeleteProgram(p); this.expected.expect(JCGLExceptionDeleted.class); s.shaderActivateProgram(p); }
@Test public final void testProgramLinkDeletedFragment() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteFragment(f); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testProgramLinkDeletedFragment() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteFragment(f); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testProgramLinkDeletedVertex() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteVertex(v); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testProgramLinkDeletedVertex() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); final JCGLGeometryShaderType g = s.shaderCompileGeometry("valid0", this.getShaderLines("valid0.geom")); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); s.shaderDeleteVertex(v); this.expected.expect(JCGLExceptionDeleted.class); s.shaderLinkProgram("valid0", v, Optional.of(g), f); }
@Test public final void testFragmentShaderCompileValidIdentities() { final JCGLShadersType s = this.getShaders("main"); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); Assert.assertEquals("valid0", f.name()); Assert.assertFalse(f.isDeleted()); Assert.assertTrue(f.glName() > 0); }
@Test public final void testFragmentShaderCompileValidIdentities() { final JCGLShadersType s = this.getShaders("main"); final JCGLFragmentShaderType f = s.shaderCompileFragment("valid0", this.getShaderLines("valid0.frag")); Assert.assertEquals("valid0", f.getName()); Assert.assertFalse(f.isDeleted()); Assert.assertTrue(f.getGLName() > 0); }