// Integer::getType() TEST(Integer, get_type) { // Setup Integer* x = new Integer(0); // Assertion EXPECT_TRUE(x->getType() == ExpressionType::Integer_); // Clean up delete(x); }
static void Test002(TestUnit *tu) { tu->runTestCase(__FUNCTION__); Atom *a = Evaluator::eval( ListGenerator::generate( StringSeparator("(* 1 2 3 5)") )); Integer *result = dynamic_cast<Integer*>(a); tu->assertTrue(result->getType() == "Integer", __LINE__); tu->assertTrue(result->getValue() == 30, __LINE__); return ; }