@Test
public void getFieldIndex() {

  StructDefinitionType t = new StructDefinitionType(new StructNameType("astruct"),
      Arrays.asList("x", "y"),
      Arrays.asList(BasicType.VEC4, BasicType.IVEC3));
  assertEquals(0, t.getFieldIndex("x"));
  assertEquals(1, t.getFieldIndex("y"));
}