@Test public final void testFloatingArrayAlreadyAssigned() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); b.setStrictChecking(true); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); this.expected.expect(JCGLExceptionAttributeAlreadyAssigned.class); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayAlreadyAssigned() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); b.setStrictChecking(true); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); this.expected.expect(JCGLExceptionAttributeAlreadyAssigned.class); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadIndex() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( -1, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadStride() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, -1, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadElements0() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( 0, a, -1, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadElements0() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( 0, a, -1, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadOffset() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 100L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadElements1() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( 0, a, 5, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadStride() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, -1, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadOffset() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 100L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadElements1() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( 0, a, 5, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayBadIndex() { final Interfaces i_main = this.getInterfaces("main"); final JCGLArrayBuffersType ga_main = i_main.getArrayBuffers(); final JCGLArrayObjectsType go_main = i_main.getArrayObjects(); final JCGLArrayBufferType a = ga_main.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go_main.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); this.expected.expect(RangeCheckException.class); b.setAttributeFloatingPoint( -1, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayDeleted() { final Interfaces i = this.getInterfaces("main"); final JCGLArrayBuffersType ga = i.getArrayBuffers(); final JCGLArrayObjectsType go = i.getArrayObjects(); final JCGLArrayBufferType a = ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); ga.arrayBufferDelete(a); this.expected.expect(JCGLExceptionDeleted.class); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testFloatingArrayDeleted() { final Interfaces i = this.getInterfaces("main"); final JCGLArrayBuffersType ga = i.getArrayBuffers(); final JCGLArrayObjectsType go = i.getArrayObjects(); final JCGLArrayBufferType a = ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); ga.arrayBufferDelete(a); this.expected.expect(JCGLExceptionDeleted.class); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); Assert.fail(); }
@Test public final void testArrayDeleteDeleted() { final Interfaces i = this.getInterfaces("main"); final JCGLArrayBuffersType ga = i.getArrayBuffers(); final JCGLArrayObjectsType go = i.getArrayObjects(); final JCGLArrayBufferType a = ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); final JCGLArrayObjectType ai = go.arrayObjectAllocate(b); go.arrayObjectDelete(ai); this.expected.expect(JCGLExceptionDeleted.class); go.arrayObjectDelete(ai); Assert.fail(); }
@Test public final void testArrayDeleteDeleted() { final Interfaces i = this.getInterfaces("main"); final JCGLArrayBuffersType ga = i.getArrayBuffers(); final JCGLArrayObjectsType go = i.getArrayObjects(); final JCGLArrayBufferType a = ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); final JCGLArrayObjectType ai = go.arrayObjectAllocate(b); go.arrayObjectDelete(ai); this.expected.expect(JCGLExceptionDeleted.class); go.arrayObjectDelete(ai); Assert.fail(); }
@Test public final void testArrayBindDeleted() { final Interfaces i = this.getInterfaces("main"); final JCGLArrayBuffersType ga = i.getArrayBuffers(); final JCGLArrayObjectsType go = i.getArrayObjects(); final JCGLArrayBufferType a = ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); final JCGLArrayObjectType ai = go.arrayObjectAllocate(b); Assert.assertEquals(ai, go.arrayObjectGetCurrentlyBound()); go.arrayObjectDelete(ai); this.expected.expect(JCGLExceptionDeleted.class); go.arrayObjectBind(ai); Assert.fail(); }
@Test public final void testArrayBindDeleted() { final Interfaces i = this.getInterfaces("main"); final JCGLArrayBuffersType ga = i.getArrayBuffers(); final JCGLArrayObjectsType go = i.getArrayObjects(); final JCGLArrayBufferType a = ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); final JCGLArrayObjectType ai = go.arrayObjectAllocate(b); Assert.assertEquals(ai, go.arrayObjectGetCurrentlyBound()); go.arrayObjectDelete(ai); this.expected.expect(JCGLExceptionDeleted.class); go.arrayObjectBind(ai); Assert.fail(); }
@Test public final void testArrayBindDeleteBindPreserves() { final Interfaces i = this.getInterfaces("main"); final JCGLArrayBuffersType ga = i.getArrayBuffers(); final JCGLArrayObjectsType go = i.getArrayObjects(); final JCGLArrayBufferType a = ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); final JCGLArrayObjectType a0 = go.arrayObjectAllocate(b); final JCGLArrayObjectType a1 = go.arrayObjectAllocate(b); go.arrayObjectBind(a0); Assert.assertEquals(a0, go.arrayObjectGetCurrentlyBound()); go.arrayObjectDelete(a1); Assert.assertEquals(a0, go.arrayObjectGetCurrentlyBound()); }
@Test public final void testArrayBindDeleteBindPreserves() { final Interfaces i = this.getInterfaces("main"); final JCGLArrayBuffersType ga = i.getArrayBuffers(); final JCGLArrayObjectsType go = i.getArrayObjects(); final JCGLArrayBufferType a = ga.arrayBufferAllocate(100L, JCGLUsageHint.USAGE_STATIC_DRAW); final JCGLArrayObjectBuilderType b = go.arrayObjectNewBuilder(); Assert.assertTrue(b.getMaximumVertexAttributes() >= 16); b.setAttributeFloatingPoint( 0, a, 4, JCGLScalarType.TYPE_FLOAT, 16, 0L, false); final JCGLArrayObjectType a0 = go.arrayObjectAllocate(b); final JCGLArrayObjectType a1 = go.arrayObjectAllocate(b); go.arrayObjectBind(a0); Assert.assertEquals(a0, go.arrayObjectGetCurrentlyBound()); go.arrayObjectDelete(a1); Assert.assertEquals(a0, go.arrayObjectGetCurrentlyBound()); }