status default constructor

This commit is contained in:
mike@arpaia.co 2014-09-06 03:41:10 -07:00
parent e23e7bdab8
commit 7d387ec605
2 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,12 @@ TEST_F(StatusTests, test_constructor) {
EXPECT_EQ(s.getMessage(), "message");
}
TEST_F(StatusTests, test_constructor_2) {
Status s;
EXPECT_EQ(s.getCode(), 0);
EXPECT_EQ(s.getMessage(), "OK");
}
TEST_F(StatusTests, test_ok) {
auto s1 = Status(5, "message");
EXPECT_FALSE(s1.ok());

View File

@ -9,6 +9,7 @@ namespace osquery {
class Status {
public:
Status() : code_(0), message_("OK") {}
Status(int c, std::string m) : code_(c), message_(m) {}
public: