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