From bffc19813a9f990344c6771615e8fc2b9eb16669 Mon Sep 17 00:00:00 2001 From: liaogang Date: Thu, 22 Dec 2016 17:08:42 +0800 Subject: [PATCH] Remove all bazel tests in third party --- third_party/gflags_test/gflags_test.cc | 33 ------------------- third_party/glog_test/glog_test.cc | 7 ---- third_party/protobuf_test/example.proto | 7 ---- third_party/protobuf_test/example_lib.cc | 9 ----- third_party/protobuf_test/example_lib.h | 13 -------- third_party/protobuf_test/example_lib_test.cc | 15 --------- 6 files changed, 84 deletions(-) delete mode 100644 third_party/gflags_test/gflags_test.cc delete mode 100644 third_party/glog_test/glog_test.cc delete mode 100644 third_party/protobuf_test/example.proto delete mode 100644 third_party/protobuf_test/example_lib.cc delete mode 100644 third_party/protobuf_test/example_lib.h delete mode 100644 third_party/protobuf_test/example_lib_test.cc diff --git a/third_party/gflags_test/gflags_test.cc b/third_party/gflags_test/gflags_test.cc deleted file mode 100644 index 53286e7e5b..0000000000 --- a/third_party/gflags_test/gflags_test.cc +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include - -#include "gflags/gflags.h" -#include "gtest/gtest.h" - -DEFINE_bool(verbose, false, "Display program name before message"); -DEFINE_string(message, "Hello world!", "Message to print"); - -static bool IsNonEmptyMessage(const char *flagname, const std::string &value) { - return value[0] != '\0'; -} -DEFINE_validator(message, &IsNonEmptyMessage); - -namespace third_party { -namespace gflags_test { - -TEST(GflagsTest, ParseAndPrint) { - gflags::SetUsageMessage("some usage message"); - gflags::SetVersionString("1.0.0"); - int argc = 1; - char program_name[] = "gflags_test"; - char **argv = new char *[2]; - argv[0] = program_name; - argv[1] = NULL; - gflags::ParseCommandLineFlags(&argc, reinterpret_cast(&argv), true); - EXPECT_EQ("gflags_test", std::string(gflags::ProgramInvocationShortName())); - EXPECT_EQ("Hello world!", FLAGS_message); - gflags::ShutDownCommandLineFlags(); -} - -} // namespace gflags_test -} // namespace third_party diff --git a/third_party/glog_test/glog_test.cc b/third_party/glog_test/glog_test.cc deleted file mode 100644 index f1d737d625..0000000000 --- a/third_party/glog_test/glog_test.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include - -#include "glog/logging.h" -#include "gtest/gtest.h" - -TEST(GlogTest, Logging) { LOG(INFO) << "Hello world"; } diff --git a/third_party/protobuf_test/example.proto b/third_party/protobuf_test/example.proto deleted file mode 100644 index 6a7eada9c1..0000000000 --- a/third_party/protobuf_test/example.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package third_party.protobuf_test; - -message Greeting { - string name = 1; -} diff --git a/third_party/protobuf_test/example_lib.cc b/third_party/protobuf_test/example_lib.cc deleted file mode 100644 index ced377bc0a..0000000000 --- a/third_party/protobuf_test/example_lib.cc +++ /dev/null @@ -1,9 +0,0 @@ -#include "third_party/protobuf_test/example_lib.h" - -namespace third_party { -namespace protobuf_test { - -std::string get_greet(const Greeting& who) { return "Hello " + who.name(); } - -} // namespace protobuf_test -} // namespace thrid_party diff --git a/third_party/protobuf_test/example_lib.h b/third_party/protobuf_test/example_lib.h deleted file mode 100644 index 516326e812..0000000000 --- a/third_party/protobuf_test/example_lib.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include "third_party/protobuf_test/example.pb.h" - -#include - -namespace third_party { -namespace protobuf_test { - -std::string get_greet(const Greeting &who); - -} // namespace protobuf_test -} // namespace third_party diff --git a/third_party/protobuf_test/example_lib_test.cc b/third_party/protobuf_test/example_lib_test.cc deleted file mode 100644 index 6229f56e60..0000000000 --- a/third_party/protobuf_test/example_lib_test.cc +++ /dev/null @@ -1,15 +0,0 @@ -#include "third_party/protobuf_test/example_lib.h" - -#include "gtest/gtest.h" - -namespace third_party { -namespace protobuf_test { - -TEST(ProtobufTest, GetGreet) { - Greeting g; - g.set_name("Paddle"); - EXPECT_EQ("Hello Paddle", get_greet(g)); -} - -} // namespace protobuf_test -} // namespace third_party -- GitLab