@Test public void test_class_fields() throws Exception { Symbol field = SYMBOL_MODEL.getSymbols("$field1").get(0); Symbol constantField = SYMBOL_MODEL.getSymbols("CONSTANT_FIELD").get(0); assertThat(field.hasModifier("public")).isTrue(); assertThat(field.is(Symbol.Kind.FIELD)).isTrue(); assertThat(constantField.hasModifier("const")).isTrue(); assertThat(constantField.is(Symbol.Kind.FIELD)).isTrue(); }
@Test public void test_global_constant() throws Exception { Symbol constant = SYMBOL_MODEL.getSymbols("CONSTANT").get(0); assertThat(constant.hasModifier("const")).isTrue(); assertThat(constant.is(Symbol.Kind.VARIABLE)).isTrue(); }