Beispiel #1
0
void testing(RDOValue value1, RDOValue value2)
{
	testException(boost::bind(&RDOValue::operator+=, &value1, boost::cref(value2)));
	testException(boost::bind(&RDOValue::operator-=, &value1, boost::cref(value2)));
	testException(boost::bind(&RDOValue::operator*=, &value1, boost::cref(value2)));
	testException(boost::bind(&RDOValue::operator/=, &value1, boost::cref(value2)));
	testException(boost::bind(&RDOValue::operator>,  &value1, boost::cref(value2)));
	testException(boost::bind(&RDOValue::operator<,  &value1, boost::cref(value2)));
	testException(boost::bind(&RDOValue::operator>=, &value1, boost::cref(value2)));
	testException(boost::bind(&RDOValue::operator<=, &value1, boost::cref(value2)));
	testException(boost::bind(&RDOValue::operator==, &value1, boost::cref(value2)));
}
Beispiel #2
0
void TestExceptionContainsFileAndLineInfo::run()
{
    static const char* const testSource(__FILE__);
    static const size_t line(__LINE__);

    TestCase::TestFailed testException(testSource,
				       line,
				       "TestFailed exception");

    EXPECT_TRUE(0 == strcmp(testSource, testException.src_));
    EXPECT_TRUE(line == testException.line_);
}