TEST(GTestError, TestMessage) { Error::CPtr e = Error::create(Error::TIMEOUT); String::CPtr strTimeout = String::create("Timeout"); ASSERT_TRUE(e->message()->equals(strTimeout)); }
TEST(GTestError, TestMessage2) { String::CPtr foo = String::create("foo"); Error::CPtr e = Error::create(Error::ANY, foo); ASSERT_TRUE(e->message()->equals(foo)); }
TEST(GTestError, TestValueOf) { String::CPtr strEOF = String::create("end of file"); Error::CPtr e = Error::valueOf(UV_EOF); ASSERT_TRUE(e->message()->equals(strEOF)); }