void () { final CompiledPattern pattern = compilePattern("class A extends '_B* {}", true); assertEquals("MAXIMUM UNLIMITED not applicable for B", checkApplicableConstraints(options, pattern)); assertEquals("MINIMUM ZERO not applicable for b", checkApplicableConstraints(options, compilePattern("'_a?.'_b?", true))); assertNull(checkApplicableConstraints(options, compilePattern("case '_a* :", true))); assertEquals("TEXT HIERARCHY not applicable for a", checkApplicableConstraints(options, compilePattern("int '_a:* ;", true))); assertEquals("TEXT HIERARCHY not applicable for a", checkApplicableConstraints(options, compilePattern("void '_a:* ();", true))); assertEquals("MINIMUM ZERO not applicable for st", checkApplicableConstraints(options, compilePattern("if (true) '_st{0,0};", true))); assertEquals("MAXIMUM UNLIMITED not applicable for st", checkApplicableConstraints(options, compilePattern("while (true) '_st+;", true))); assertNull(checkApplicableConstraints(options, compilePattern("class A { '_body* }", false))); assertEquals("MINIMUM ZERO not applicable for var", checkApplicableConstraints(options, compilePattern("'_a instanceof ('_Type '_var{0,0})", true))); }