public class EqualTest_boolean extends TestCase {
public void test_exits() throws Exception {
String sql = "true";
String sql_c = "false";
SQLBooleanExpr exprA, exprB, exprC;
{
SQLExprParser parser = new MySqlExprParser(sql);
exprA = (SQLBooleanExpr) parser.expr();
}
{
SQLExprParser parser = new MySqlExprParser(sql);
exprB = (SQLBooleanExpr) parser.expr();
}
{
SQLExprParser parser = new MySqlExprParser(sql_c);
exprC = (SQLBooleanExpr) parser.expr();
}
Assert.assertEquals(exprA, exprB);
Assert.assertNotEquals(exprA, exprC);
Assert.assertTrue(exprA.equals(exprA));
Assert.assertFalse(exprA.equals(new Object()));
Assert.assertEquals(exprA.hashCode(), exprB.hashCode());
Assert.assertEquals(new SQLBooleanExpr(), new SQLBooleanExpr());
Assert.assertEquals(new SQLBooleanExpr().hashCode(), new SQLBooleanExpr().hashCode());
}