2014-12-18 18:50:47 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*
|
|
|
|
*/
|
2014-08-04 21:12:06 +00:00
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
2015-01-21 21:36:55 +00:00
|
|
|
|
|
|
|
#include <osquery/core.h>
|
|
|
|
#include <osquery/logger.h>
|
2014-08-04 21:12:06 +00:00
|
|
|
|
|
|
|
#include "osquery/core/test_util.h"
|
|
|
|
|
2014-08-15 07:25:30 +00:00
|
|
|
namespace osquery {
|
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();
|
|
|
|
}
|