2014-08-04 21:12:06 +00:00
|
|
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
|
2014-12-03 23:14:02 +00:00
|
|
|
#include <osquery/core.h>
|
2014-08-04 21:12:06 +00:00
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <glog/logging.h>
|
|
|
|
|
|
|
|
#include "osquery/core/test_util.h"
|
|
|
|
|
2014-08-15 07:25:30 +00:00
|
|
|
namespace osquery {
|
|
|
|
namespace core {
|
2014-08-04 21:12:06 +00:00
|
|
|
|
|
|
|
class TextTests : public testing::Test {};
|
|
|
|
|
2014-08-04 23:08:49 +00:00
|
|
|
TEST_F(TextTests, test_split) {
|
2014-08-06 22:55:46 +00:00
|
|
|
for (const auto& i : generateSplitStringTestData()) {
|
2014-08-04 23:08:49 +00:00
|
|
|
EXPECT_EQ(split(i.test_string), i.test_vector);
|
2014-08-04 21:12:06 +00:00
|
|
|
}
|
|
|
|
}
|
2014-08-15 07:25:30 +00:00
|
|
|
}
|
|
|
|
}
|
2014-08-04 21:12:06 +00:00
|
|
|
|
|
|
|
int main(int argc, char* argv[]) {
|
2014-09-10 01:43:27 +00:00
|
|
|
google::InitGoogleLogging(argv[0]);
|
2014-08-04 21:12:06 +00:00
|
|
|
testing::InitGoogleTest(&argc, argv);
|
|
|
|
return RUN_ALL_TESTS();
|
|
|
|
}
|