1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Testcase for cast ambiguities, bug 100641 and 106279.

This commit is contained in:
Markus Schorn 2008-02-13 14:39:58 +00:00
parent 466f54cc91
commit ea7f5375cd

View file

@ -4195,4 +4195,24 @@ public class AST2Tests extends AST2BaseTest {
}
}
}
// void isTrue( int field, int bit ){
// return ((field) & (bit));
// }
// void test() {
// int foux=0, bhar=0;
// foux = (foux) - bhar1;
// }
public void testBug100641_106279_castAmbiguity() throws Exception {
StringBuffer[] buffer = getContents(1);
final String content1 = buffer[0].toString();
boolean cpp= false;
do {
BindingAssertionHelper ba= new BindingAssertionHelper(content1, cpp);
ba.assertNonProblem("field)", 5);
ba.assertNonProblem("bit))", 3);
ba.assertNonProblem("foux)", 4);
cpp= !cpp;
} while(cpp);
}
}