@Test public final void testVertexShaderCompileEmpty1() { 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.shaderCompileVertex("empty1", lines); }
@Test public final void testVertexShaderCompileEmpty1() { 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.shaderCompileVertex("empty1", lines); }
@Test public final void testVertexShaderCompileEmpty0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileVertex("empty0", new ArrayList<>(0)); }
@Test public final void testVertexShaderCompileEmpty0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileVertex("empty0", new ArrayList<>(0)); }
@Test public final void testVertexShaderCompileInvalid0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileVertex("invalid0", this.getShaderLines("invalid0.vert")); }
@Test public final void testVertexShaderCompileInvalid0() { final JCGLShadersType s = this.getShaders("main"); this.expected.expect(JCGLExceptionProgramCompileError.class); s.shaderCompileVertex("invalid0", this.getShaderLines("invalid0.vert")); }
@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 testVertexShaderDeleteDeleted() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); s.shaderDeleteVertex(v); this.expected.expect(JCGLExceptionDeleted.class); s.shaderDeleteVertex(v); }
@Test public final void testVertexShaderDeleteIdentity() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); s.shaderDeleteVertex(v); Assert.assertTrue(v.isDeleted()); }
@Test public final void testVertexShaderDeleteDeleted() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); s.shaderDeleteVertex(v); this.expected.expect(JCGLExceptionDeleted.class); s.shaderDeleteVertex(v); }
@Test public final void testVertexShaderDeleteIdentity() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); s.shaderDeleteVertex(v); Assert.assertTrue(v.isDeleted()); }
@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 testProgramDeleteDeleted() { 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.shaderDeleteProgram(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 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 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 testVertexShaderCompileValidIdentities() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); Assert.assertEquals("valid0", v.name()); Assert.assertFalse(v.isDeleted()); Assert.assertTrue(v.glName() > 0); }
@Test public final void testVertexShaderCompileValidIdentities() { final JCGLShadersType s = this.getShaders("main"); final JCGLVertexShaderType v = s.shaderCompileVertex("valid0", this.getShaderLines("valid0.vert")); Assert.assertEquals("valid0", v.getName()); Assert.assertFalse(v.isDeleted()); Assert.assertTrue(v.getGLName() > 0); }