functionFoo.accept(analyzer);
assertEquals(2, analyzer.getScore());
}
public void testNestedTernaryOperator() throws Exception {
TranslationUnit unit = parse(
"int foo(int a, int b) { " +
" return a > 0 ? (b < 0 ? -1 : 0) : 1; " +
"} "
);
FunctionDefinition functionFoo = unit.getChild(0);
functionFoo.accept(analyzer);
assertEquals(3, analyzer.getScore());
}