mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
30 lines
672 B
C++
30 lines
672 B
C++
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#include <gtest/gtest.h>
|
|
#include <glog/logging.h>
|
|
|
|
#include "osquery/core/test_util.h"
|
|
#include "osquery/database.h"
|
|
|
|
using namespace osquery::core;
|
|
|
|
namespace osquery {
|
|
namespace tables {
|
|
|
|
osquery::db::QueryData parseEtcHostsContent(const std::string& content);
|
|
|
|
class EtcHostsTests : public testing::Test {};
|
|
|
|
TEST_F(EtcHostsTests, test_parse_etc_hosts_content) {
|
|
EXPECT_EQ(parseEtcHostsContent(getEtcHostsContent()),
|
|
getEtcHostsExpectedResults());
|
|
}
|
|
}
|
|
}
|
|
|
|
int main(int argc, char* argv[]) {
|
|
testing::InitGoogleTest(&argc, argv);
|
|
google::InitGoogleLogging(argv[0]);
|
|
return RUN_ALL_TESTS();
|
|
}
|