@Test(expected = IllegalArgumentException.class) public void testFloatingHalf() { JCGLScalarIntegralType.fromScalar(JCGLScalarType.TYPE_HALF_FLOAT); }
@Test(expected = IllegalArgumentException.class) public void testFloating() { JCGLScalarIntegralType.fromScalar(JCGLScalarType.TYPE_FLOAT); } }
@Test public void testFromScalarIntegral() { for (final JCGLScalarIntegralType v : JCGLScalarIntegralType.values()) { final JCGLScalarType t = JCGLScalarType.fromScalarIntegral(v); final JCGLScalarIntegralType r = JCGLScalarIntegralType.fromScalar(t); Assert.assertEquals(v, r); } } }
this.array_buffer, attr.count, JCGLScalarIntegralType.fromScalar(attr.type), this.vertex_size, attr.offset);
@Test public void testFromScalar() { for (final JCGLScalarType v : JCGLScalarType.values()) { switch (v) { case TYPE_HALF_FLOAT: case TYPE_FLOAT: continue; case TYPE_BYTE: case TYPE_INT: case TYPE_SHORT: case TYPE_UNSIGNED_BYTE: case TYPE_UNSIGNED_INT: case TYPE_UNSIGNED_SHORT: break; } final JCGLScalarIntegralType t = JCGLScalarIntegralType.fromScalar(v); final JCGLScalarType r = JCGLScalarType.fromScalarIntegral(t); Assert.assertEquals(v, r); } }