@Test
public void testQualifiers() throws Exception {

  final String prog = "in vec3 blah; out vec3 bloo; void foo(in float x, out float y);";
  final TranslationUnit tu = ParseHelper.parse(prog);
  assertEquals(3, tu.getTopLevelDeclarations().size());
  {
    final Declaration decl = tu.getTopLevelDeclarations().get(0);
    final VariablesDeclaration variablesDeclaration = (VariablesDeclaration) decl;
    assertTrue(variablesDeclaration.getBaseType().hasQualifier(TypeQualifier.SHADER_INPUT));
    assertFalse(variablesDeclaration.getBaseType().hasQualifier(TypeQualifier.IN_PARAM));
  }
  {
    final Declaration decl = tu.getTopLevelDeclarations().get(1);
    final VariablesDeclaration variablesDeclaration = (VariablesDeclaration) decl;
    assertTrue(variablesDeclaration.getBaseType().hasQualifier(TypeQualifier.SHADER_OUTPUT));
    assertFalse(variablesDeclaration.getBaseType().hasQualifier(TypeQualifier.OUT_PARAM));
  }
  {
    final Declaration decl = tu.getTopLevelDeclarations().get(2);
    FunctionPrototype proto = (FunctionPrototype) decl;
    assertTrue(proto.getParameters().get(0).getType().hasQualifier(TypeQualifier.IN_PARAM));
    assertFalse(proto.getParameters().get(0).getType().hasQualifier(TypeQualifier.SHADER_INPUT));
    assertTrue(proto.getParameters().get(1).getType().hasQualifier(TypeQualifier.OUT_PARAM));
    assertFalse(proto.getParameters().get(1).getType().hasQualifier(TypeQualifier.SHADER_OUTPUT));
  }
}