osquery-1/osquery/core/text_tests.cpp

26 lines
510 B
C++
Raw Normal View History

2014-08-04 21:12:06 +00:00
// Copyright 2004-present Facebook. All Rights Reserved.
#include "osquery/core.h"
#include <gtest/gtest.h>
#include <glog/logging.h>
#include "osquery/core/test_util.h"
namespace osquery { namespace core {
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
}
}
}}
int main(int argc, char* argv[]) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}