You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by hu...@apache.org on 2016/05/09 10:12:08 UTC
[23/52] [abbrv] [partial] incubator-hawq git commit: HAWQ-707. Remove
gtest/gmock dependency from libyarn/libhdfs3
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a5b68bab/depends/googletest/googlemock/test/gmock-more-actions_test.cc
----------------------------------------------------------------------
diff --git a/depends/googletest/googlemock/test/gmock-more-actions_test.cc b/depends/googletest/googlemock/test/gmock-more-actions_test.cc
deleted file mode 100644
index 77e15bd..0000000
--- a/depends/googletest/googlemock/test/gmock-more-actions_test.cc
+++ /dev/null
@@ -1,708 +0,0 @@
-// Copyright 2007, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the built-in actions in gmock-more-actions.h.
-
-#include "gmock/gmock-more-actions.h"
-
-#include <functional>
-#include <sstream>
-#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-#include "gtest/internal/gtest-linked_ptr.h"
-
-namespace testing {
-namespace gmock_more_actions_test {
-
-using ::std::plus;
-using ::std::string;
-using testing::get;
-using testing::make_tuple;
-using testing::tuple;
-using testing::tuple_element;
-using testing::_;
-using testing::Action;
-using testing::ActionInterface;
-using testing::DeleteArg;
-using testing::Invoke;
-using testing::Return;
-using testing::ReturnArg;
-using testing::ReturnPointee;
-using testing::SaveArg;
-using testing::SaveArgPointee;
-using testing::SetArgReferee;
-using testing::StaticAssertTypeEq;
-using testing::Unused;
-using testing::WithArg;
-using testing::WithoutArgs;
-using testing::internal::linked_ptr;
-
-// For suppressing compiler warnings on conversion possibly losing precision.
-inline short Short(short n) { return n; } // NOLINT
-inline char Char(char ch) { return ch; }
-
-// Sample functions and functors for testing Invoke() and etc.
-int Nullary() { return 1; }
-
-class NullaryFunctor {
- public:
- int operator()() { return 2; }
-};
-
-bool g_done = false;
-void VoidNullary() { g_done = true; }
-
-class VoidNullaryFunctor {
- public:
- void operator()() { g_done = true; }
-};
-
-bool Unary(int x) { return x < 0; }
-
-const char* Plus1(const char* s) { return s + 1; }
-
-void VoidUnary(int /* n */) { g_done = true; }
-
-bool ByConstRef(const string& s) { return s == "Hi"; }
-
-const double g_double = 0;
-bool ReferencesGlobalDouble(const double& x) { return &x == &g_double; }
-
-string ByNonConstRef(string& s) { return s += "+"; } // NOLINT
-
-struct UnaryFunctor {
- int operator()(bool x) { return x ? 1 : -1; }
-};
-
-const char* Binary(const char* input, short n) { return input + n; } // NOLINT
-
-void VoidBinary(int, char) { g_done = true; }
-
-int Ternary(int x, char y, short z) { return x + y + z; } // NOLINT
-
-void VoidTernary(int, char, bool) { g_done = true; }
-
-int SumOf4(int a, int b, int c, int d) { return a + b + c + d; }
-
-int SumOfFirst2(int a, int b, Unused, Unused) { return a + b; }
-
-void VoidFunctionWithFourArguments(char, int, float, double) { g_done = true; }
-
-string Concat4(const char* s1, const char* s2, const char* s3,
- const char* s4) {
- return string(s1) + s2 + s3 + s4;
-}
-
-int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; }
-
-struct SumOf5Functor {
- int operator()(int a, int b, int c, int d, int e) {
- return a + b + c + d + e;
- }
-};
-
-string Concat5(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5) {
- return string(s1) + s2 + s3 + s4 + s5;
-}
-
-int SumOf6(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
-}
-
-struct SumOf6Functor {
- int operator()(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
- }
-};
-
-string Concat6(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6) {
- return string(s1) + s2 + s3 + s4 + s5 + s6;
-}
-
-string Concat7(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
-}
-
-string Concat8(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
-}
-
-string Concat9(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
-}
-
-string Concat10(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9,
- const char* s10) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
-}
-
-class Foo {
- public:
- Foo() : value_(123) {}
-
- int Nullary() const { return value_; }
-
- short Unary(long x) { return static_cast<short>(value_ + x); } // NOLINT
-
- string Binary(const string& str, char c) const { return str + c; }
-
- int Ternary(int x, bool y, char z) { return value_ + x + y*z; }
-
- int SumOf4(int a, int b, int c, int d) const {
- return a + b + c + d + value_;
- }
-
- int SumOfLast2(Unused, Unused, int a, int b) const { return a + b; }
-
- int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; }
-
- int SumOf6(int a, int b, int c, int d, int e, int f) {
- return a + b + c + d + e + f;
- }
-
- string Concat7(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
- }
-
- string Concat8(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
- }
-
- string Concat9(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
- }
-
- string Concat10(const char* s1, const char* s2, const char* s3,
- const char* s4, const char* s5, const char* s6,
- const char* s7, const char* s8, const char* s9,
- const char* s10) {
- return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
- }
-
- private:
- int value_;
-};
-
-// Tests using Invoke() with a nullary function.
-TEST(InvokeTest, Nullary) {
- Action<int()> a = Invoke(Nullary); // NOLINT
- EXPECT_EQ(1, a.Perform(make_tuple()));
-}
-
-// Tests using Invoke() with a unary function.
-TEST(InvokeTest, Unary) {
- Action<bool(int)> a = Invoke(Unary); // NOLINT
- EXPECT_FALSE(a.Perform(make_tuple(1)));
- EXPECT_TRUE(a.Perform(make_tuple(-1)));
-}
-
-// Tests using Invoke() with a binary function.
-TEST(InvokeTest, Binary) {
- Action<const char*(const char*, short)> a = Invoke(Binary); // NOLINT
- const char* p = "Hello";
- EXPECT_EQ(p + 2, a.Perform(make_tuple(p, Short(2))));
-}
-
-// Tests using Invoke() with a ternary function.
-TEST(InvokeTest, Ternary) {
- Action<int(int, char, short)> a = Invoke(Ternary); // NOLINT
- EXPECT_EQ(6, a.Perform(make_tuple(1, '\2', Short(3))));
-}
-
-// Tests using Invoke() with a 4-argument function.
-TEST(InvokeTest, FunctionThatTakes4Arguments) {
- Action<int(int, int, int, int)> a = Invoke(SumOf4); // NOLINT
- EXPECT_EQ(1234, a.Perform(make_tuple(1000, 200, 30, 4)));
-}
-
-// Tests using Invoke() with a 5-argument function.
-TEST(InvokeTest, FunctionThatTakes5Arguments) {
- Action<int(int, int, int, int, int)> a = Invoke(SumOf5); // NOLINT
- EXPECT_EQ(12345, a.Perform(make_tuple(10000, 2000, 300, 40, 5)));
-}
-
-// Tests using Invoke() with a 6-argument function.
-TEST(InvokeTest, FunctionThatTakes6Arguments) {
- Action<int(int, int, int, int, int, int)> a = Invoke(SumOf6); // NOLINT
- EXPECT_EQ(123456, a.Perform(make_tuple(100000, 20000, 3000, 400, 50, 6)));
-}
-
-// A helper that turns the type of a C-string literal from const
-// char[N] to const char*.
-inline const char* CharPtr(const char* s) { return s; }
-
-// Tests using Invoke() with a 7-argument function.
-TEST(InvokeTest, FunctionThatTakes7Arguments) {
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*)> a =
- Invoke(Concat7);
- EXPECT_EQ("1234567",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"))));
-}
-
-// Tests using Invoke() with a 8-argument function.
-TEST(InvokeTest, FunctionThatTakes8Arguments) {
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*)> a =
- Invoke(Concat8);
- EXPECT_EQ("12345678",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"))));
-}
-
-// Tests using Invoke() with a 9-argument function.
-TEST(InvokeTest, FunctionThatTakes9Arguments) {
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*,
- const char*)> a = Invoke(Concat9);
- EXPECT_EQ("123456789",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"), CharPtr("9"))));
-}
-
-// Tests using Invoke() with a 10-argument function.
-TEST(InvokeTest, FunctionThatTakes10Arguments) {
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*,
- const char*, const char*)> a = Invoke(Concat10);
- EXPECT_EQ("1234567890",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"), CharPtr("9"),
- CharPtr("0"))));
-}
-
-// Tests using Invoke() with functions with parameters declared as Unused.
-TEST(InvokeTest, FunctionWithUnusedParameters) {
- Action<int(int, int, double, const string&)> a1 =
- Invoke(SumOfFirst2);
- string s("hi");
- EXPECT_EQ(12, a1.Perform(
- tuple<int, int, double, const string&>(10, 2, 5.6, s)));
-
- Action<int(int, int, bool, int*)> a2 =
- Invoke(SumOfFirst2);
- EXPECT_EQ(23, a2.Perform(make_tuple(20, 3, true, static_cast<int*>(NULL))));
-}
-
-// Tests using Invoke() with methods with parameters declared as Unused.
-TEST(InvokeTest, MethodWithUnusedParameters) {
- Foo foo;
- Action<int(string, bool, int, int)> a1 =
- Invoke(&foo, &Foo::SumOfLast2);
- EXPECT_EQ(12, a1.Perform(make_tuple(CharPtr("hi"), true, 10, 2)));
-
- Action<int(char, double, int, int)> a2 =
- Invoke(&foo, &Foo::SumOfLast2);
- EXPECT_EQ(23, a2.Perform(make_tuple('a', 2.5, 20, 3)));
-}
-
-// Tests using Invoke() with a functor.
-TEST(InvokeTest, Functor) {
- Action<long(long, int)> a = Invoke(plus<long>()); // NOLINT
- EXPECT_EQ(3L, a.Perform(make_tuple(1, 2)));
-}
-
-// Tests using Invoke(f) as an action of a compatible type.
-TEST(InvokeTest, FunctionWithCompatibleType) {
- Action<long(int, short, char, bool)> a = Invoke(SumOf4); // NOLINT
- EXPECT_EQ(4321, a.Perform(make_tuple(4000, Short(300), Char(20), true)));
-}
-
-// Tests using Invoke() with an object pointer and a method pointer.
-
-// Tests using Invoke() with a nullary method.
-TEST(InvokeMethodTest, Nullary) {
- Foo foo;
- Action<int()> a = Invoke(&foo, &Foo::Nullary); // NOLINT
- EXPECT_EQ(123, a.Perform(make_tuple()));
-}
-
-// Tests using Invoke() with a unary method.
-TEST(InvokeMethodTest, Unary) {
- Foo foo;
- Action<short(long)> a = Invoke(&foo, &Foo::Unary); // NOLINT
- EXPECT_EQ(4123, a.Perform(make_tuple(4000)));
-}
-
-// Tests using Invoke() with a binary method.
-TEST(InvokeMethodTest, Binary) {
- Foo foo;
- Action<string(const string&, char)> a = Invoke(&foo, &Foo::Binary);
- string s("Hell");
- EXPECT_EQ("Hello", a.Perform(
- tuple<const string&, char>(s, 'o')));
-}
-
-// Tests using Invoke() with a ternary method.
-TEST(InvokeMethodTest, Ternary) {
- Foo foo;
- Action<int(int, bool, char)> a = Invoke(&foo, &Foo::Ternary); // NOLINT
- EXPECT_EQ(1124, a.Perform(make_tuple(1000, true, Char(1))));
-}
-
-// Tests using Invoke() with a 4-argument method.
-TEST(InvokeMethodTest, MethodThatTakes4Arguments) {
- Foo foo;
- Action<int(int, int, int, int)> a = Invoke(&foo, &Foo::SumOf4); // NOLINT
- EXPECT_EQ(1357, a.Perform(make_tuple(1000, 200, 30, 4)));
-}
-
-// Tests using Invoke() with a 5-argument method.
-TEST(InvokeMethodTest, MethodThatTakes5Arguments) {
- Foo foo;
- Action<int(int, int, int, int, int)> a = Invoke(&foo, &Foo::SumOf5); // NOLINT
- EXPECT_EQ(12345, a.Perform(make_tuple(10000, 2000, 300, 40, 5)));
-}
-
-// Tests using Invoke() with a 6-argument method.
-TEST(InvokeMethodTest, MethodThatTakes6Arguments) {
- Foo foo;
- Action<int(int, int, int, int, int, int)> a = // NOLINT
- Invoke(&foo, &Foo::SumOf6);
- EXPECT_EQ(123456, a.Perform(make_tuple(100000, 20000, 3000, 400, 50, 6)));
-}
-
-// Tests using Invoke() with a 7-argument method.
-TEST(InvokeMethodTest, MethodThatTakes7Arguments) {
- Foo foo;
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*)> a =
- Invoke(&foo, &Foo::Concat7);
- EXPECT_EQ("1234567",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"))));
-}
-
-// Tests using Invoke() with a 8-argument method.
-TEST(InvokeMethodTest, MethodThatTakes8Arguments) {
- Foo foo;
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*)> a =
- Invoke(&foo, &Foo::Concat8);
- EXPECT_EQ("12345678",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"))));
-}
-
-// Tests using Invoke() with a 9-argument method.
-TEST(InvokeMethodTest, MethodThatTakes9Arguments) {
- Foo foo;
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*,
- const char*)> a = Invoke(&foo, &Foo::Concat9);
- EXPECT_EQ("123456789",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"), CharPtr("9"))));
-}
-
-// Tests using Invoke() with a 10-argument method.
-TEST(InvokeMethodTest, MethodThatTakes10Arguments) {
- Foo foo;
- Action<string(const char*, const char*, const char*, const char*,
- const char*, const char*, const char*, const char*,
- const char*, const char*)> a = Invoke(&foo, &Foo::Concat10);
- EXPECT_EQ("1234567890",
- a.Perform(make_tuple(CharPtr("1"), CharPtr("2"), CharPtr("3"),
- CharPtr("4"), CharPtr("5"), CharPtr("6"),
- CharPtr("7"), CharPtr("8"), CharPtr("9"),
- CharPtr("0"))));
-}
-
-// Tests using Invoke(f) as an action of a compatible type.
-TEST(InvokeMethodTest, MethodWithCompatibleType) {
- Foo foo;
- Action<long(int, short, char, bool)> a = // NOLINT
- Invoke(&foo, &Foo::SumOf4);
- EXPECT_EQ(4444, a.Perform(make_tuple(4000, Short(300), Char(20), true)));
-}
-
-// Tests using WithoutArgs with an action that takes no argument.
-TEST(WithoutArgsTest, NoArg) {
- Action<int(int n)> a = WithoutArgs(Invoke(Nullary)); // NOLINT
- EXPECT_EQ(1, a.Perform(make_tuple(2)));
-}
-
-// Tests using WithArg with an action that takes 1 argument.
-TEST(WithArgTest, OneArg) {
- Action<bool(double x, int n)> b = WithArg<1>(Invoke(Unary)); // NOLINT
- EXPECT_TRUE(b.Perform(make_tuple(1.5, -1)));
- EXPECT_FALSE(b.Perform(make_tuple(1.5, 1)));
-}
-
-TEST(ReturnArgActionTest, WorksForOneArgIntArg0) {
- const Action<int(int)> a = ReturnArg<0>();
- EXPECT_EQ(5, a.Perform(make_tuple(5)));
-}
-
-TEST(ReturnArgActionTest, WorksForMultiArgBoolArg0) {
- const Action<bool(bool, bool, bool)> a = ReturnArg<0>();
- EXPECT_TRUE(a.Perform(make_tuple(true, false, false)));
-}
-
-TEST(ReturnArgActionTest, WorksForMultiArgStringArg2) {
- const Action<string(int, int, string, int)> a = ReturnArg<2>();
- EXPECT_EQ("seven", a.Perform(make_tuple(5, 6, string("seven"), 8)));
-}
-
-TEST(SaveArgActionTest, WorksForSameType) {
- int result = 0;
- const Action<void(int n)> a1 = SaveArg<0>(&result);
- a1.Perform(make_tuple(5));
- EXPECT_EQ(5, result);
-}
-
-TEST(SaveArgActionTest, WorksForCompatibleType) {
- int result = 0;
- const Action<void(bool, char)> a1 = SaveArg<1>(&result);
- a1.Perform(make_tuple(true, 'a'));
- EXPECT_EQ('a', result);
-}
-
-TEST(SaveArgPointeeActionTest, WorksForSameType) {
- int result = 0;
- const int value = 5;
- const Action<void(const int*)> a1 = SaveArgPointee<0>(&result);
- a1.Perform(make_tuple(&value));
- EXPECT_EQ(5, result);
-}
-
-TEST(SaveArgPointeeActionTest, WorksForCompatibleType) {
- int result = 0;
- char value = 'a';
- const Action<void(bool, char*)> a1 = SaveArgPointee<1>(&result);
- a1.Perform(make_tuple(true, &value));
- EXPECT_EQ('a', result);
-}
-
-TEST(SaveArgPointeeActionTest, WorksForLinkedPtr) {
- int result = 0;
- linked_ptr<int> value(new int(5));
- const Action<void(linked_ptr<int>)> a1 = SaveArgPointee<0>(&result);
- a1.Perform(make_tuple(value));
- EXPECT_EQ(5, result);
-}
-
-TEST(SetArgRefereeActionTest, WorksForSameType) {
- int value = 0;
- const Action<void(int&)> a1 = SetArgReferee<0>(1);
- a1.Perform(tuple<int&>(value));
- EXPECT_EQ(1, value);
-}
-
-TEST(SetArgRefereeActionTest, WorksForCompatibleType) {
- int value = 0;
- const Action<void(int, int&)> a1 = SetArgReferee<1>('a');
- a1.Perform(tuple<int, int&>(0, value));
- EXPECT_EQ('a', value);
-}
-
-TEST(SetArgRefereeActionTest, WorksWithExtraArguments) {
- int value = 0;
- const Action<void(bool, int, int&, const char*)> a1 = SetArgReferee<2>('a');
- a1.Perform(tuple<bool, int, int&, const char*>(true, 0, value, "hi"));
- EXPECT_EQ('a', value);
-}
-
-// A class that can be used to verify that its destructor is called: it will set
-// the bool provided to the constructor to true when destroyed.
-class DeletionTester {
- public:
- explicit DeletionTester(bool* is_deleted)
- : is_deleted_(is_deleted) {
- // Make sure the bit is set to false.
- *is_deleted_ = false;
- }
-
- ~DeletionTester() {
- *is_deleted_ = true;
- }
-
- private:
- bool* is_deleted_;
-};
-
-TEST(DeleteArgActionTest, OneArg) {
- bool is_deleted = false;
- DeletionTester* t = new DeletionTester(&is_deleted);
- const Action<void(DeletionTester*)> a1 = DeleteArg<0>(); // NOLINT
- EXPECT_FALSE(is_deleted);
- a1.Perform(make_tuple(t));
- EXPECT_TRUE(is_deleted);
-}
-
-TEST(DeleteArgActionTest, TenArgs) {
- bool is_deleted = false;
- DeletionTester* t = new DeletionTester(&is_deleted);
- const Action<void(bool, int, int, const char*, bool,
- int, int, int, int, DeletionTester*)> a1 = DeleteArg<9>();
- EXPECT_FALSE(is_deleted);
- a1.Perform(make_tuple(true, 5, 6, CharPtr("hi"), false, 7, 8, 9, 10, t));
- EXPECT_TRUE(is_deleted);
-}
-
-#if GTEST_HAS_EXCEPTIONS
-
-TEST(ThrowActionTest, ThrowsGivenExceptionInVoidFunction) {
- const Action<void(int n)> a = Throw('a');
- EXPECT_THROW(a.Perform(make_tuple(0)), char);
-}
-
-class MyException {};
-
-TEST(ThrowActionTest, ThrowsGivenExceptionInNonVoidFunction) {
- const Action<double(char ch)> a = Throw(MyException());
- EXPECT_THROW(a.Perform(make_tuple('0')), MyException);
-}
-
-TEST(ThrowActionTest, ThrowsGivenExceptionInNullaryFunction) {
- const Action<double()> a = Throw(MyException());
- EXPECT_THROW(a.Perform(make_tuple()), MyException);
-}
-
-#endif // GTEST_HAS_EXCEPTIONS
-
-// Tests that SetArrayArgument<N>(first, last) sets the elements of the array
-// pointed to by the N-th (0-based) argument to values in range [first, last).
-TEST(SetArrayArgumentTest, SetsTheNthArray) {
- typedef void MyFunction(bool, int*, char*);
- int numbers[] = { 1, 2, 3 };
- Action<MyFunction> a = SetArrayArgument<1>(numbers, numbers + 3);
-
- int n[4] = {};
- int* pn = n;
- char ch[4] = {};
- char* pch = ch;
- a.Perform(make_tuple(true, pn, pch));
- EXPECT_EQ(1, n[0]);
- EXPECT_EQ(2, n[1]);
- EXPECT_EQ(3, n[2]);
- EXPECT_EQ(0, n[3]);
- EXPECT_EQ('\0', ch[0]);
- EXPECT_EQ('\0', ch[1]);
- EXPECT_EQ('\0', ch[2]);
- EXPECT_EQ('\0', ch[3]);
-
- // Tests first and last are iterators.
- std::string letters = "abc";
- a = SetArrayArgument<2>(letters.begin(), letters.end());
- std::fill_n(n, 4, 0);
- std::fill_n(ch, 4, '\0');
- a.Perform(make_tuple(true, pn, pch));
- EXPECT_EQ(0, n[0]);
- EXPECT_EQ(0, n[1]);
- EXPECT_EQ(0, n[2]);
- EXPECT_EQ(0, n[3]);
- EXPECT_EQ('a', ch[0]);
- EXPECT_EQ('b', ch[1]);
- EXPECT_EQ('c', ch[2]);
- EXPECT_EQ('\0', ch[3]);
-}
-
-// Tests SetArrayArgument<N>(first, last) where first == last.
-TEST(SetArrayArgumentTest, SetsTheNthArrayWithEmptyRange) {
- typedef void MyFunction(bool, int*);
- int numbers[] = { 1, 2, 3 };
- Action<MyFunction> a = SetArrayArgument<1>(numbers, numbers);
-
- int n[4] = {};
- int* pn = n;
- a.Perform(make_tuple(true, pn));
- EXPECT_EQ(0, n[0]);
- EXPECT_EQ(0, n[1]);
- EXPECT_EQ(0, n[2]);
- EXPECT_EQ(0, n[3]);
-}
-
-// Tests SetArrayArgument<N>(first, last) where *first is convertible
-// (but not equal) to the argument type.
-TEST(SetArrayArgumentTest, SetsTheNthArrayWithConvertibleType) {
- typedef void MyFunction(bool, int*);
- char chars[] = { 97, 98, 99 };
- Action<MyFunction> a = SetArrayArgument<1>(chars, chars + 3);
-
- int codes[4] = { 111, 222, 333, 444 };
- int* pcodes = codes;
- a.Perform(make_tuple(true, pcodes));
- EXPECT_EQ(97, codes[0]);
- EXPECT_EQ(98, codes[1]);
- EXPECT_EQ(99, codes[2]);
- EXPECT_EQ(444, codes[3]);
-}
-
-// Test SetArrayArgument<N>(first, last) with iterator as argument.
-TEST(SetArrayArgumentTest, SetsTheNthArrayWithIteratorArgument) {
- typedef void MyFunction(bool, std::back_insert_iterator<std::string>);
- std::string letters = "abc";
- Action<MyFunction> a = SetArrayArgument<1>(letters.begin(), letters.end());
-
- std::string s;
- a.Perform(make_tuple(true, back_inserter(s)));
- EXPECT_EQ(letters, s);
-}
-
-TEST(ReturnPointeeTest, Works) {
- int n = 42;
- const Action<int()> a = ReturnPointee(&n);
- EXPECT_EQ(42, a.Perform(make_tuple()));
-
- n = 43;
- EXPECT_EQ(43, a.Perform(make_tuple()));
-}
-
-} // namespace gmock_generated_actions_test
-} // namespace testing
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a5b68bab/depends/googletest/googlemock/test/gmock-nice-strict_test.cc
----------------------------------------------------------------------
diff --git a/depends/googletest/googlemock/test/gmock-nice-strict_test.cc b/depends/googletest/googlemock/test/gmock-nice-strict_test.cc
deleted file mode 100644
index d0adcbb..0000000
--- a/depends/googletest/googlemock/test/gmock-nice-strict_test.cc
+++ /dev/null
@@ -1,424 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
-
-#include "gmock/gmock-generated-nice-strict.h"
-
-#include <string>
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-#include "gtest/gtest-spi.h"
-
-// This must not be defined inside the ::testing namespace, or it will
-// clash with ::testing::Mock.
-class Mock {
- public:
- Mock() {}
-
- MOCK_METHOD0(DoThis, void());
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock);
-};
-
-namespace testing {
-namespace gmock_nice_strict_test {
-
-using testing::internal::string;
-using testing::GMOCK_FLAG(verbose);
-using testing::HasSubstr;
-using testing::NaggyMock;
-using testing::NiceMock;
-using testing::StrictMock;
-
-#if GTEST_HAS_STREAM_REDIRECTION
-using testing::internal::CaptureStdout;
-using testing::internal::GetCapturedStdout;
-#endif
-
-// Defines some mock classes needed by the tests.
-
-class Foo {
- public:
- virtual ~Foo() {}
-
- virtual void DoThis() = 0;
- virtual int DoThat(bool flag) = 0;
-};
-
-class MockFoo : public Foo {
- public:
- MockFoo() {}
- void Delete() { delete this; }
-
- MOCK_METHOD0(DoThis, void());
- MOCK_METHOD1(DoThat, int(bool flag));
-
- private:
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFoo);
-};
-
-class MockBar {
- public:
- explicit MockBar(const string& s) : str_(s) {}
-
- MockBar(char a1, char a2, string a3, string a4, int a5, int a6,
- const string& a7, const string& a8, bool a9, bool a10) {
- str_ = string() + a1 + a2 + a3 + a4 + static_cast<char>(a5) +
- static_cast<char>(a6) + a7 + a8 + (a9 ? 'T' : 'F') + (a10 ? 'T' : 'F');
- }
-
- virtual ~MockBar() {}
-
- const string& str() const { return str_; }
-
- MOCK_METHOD0(This, int());
- MOCK_METHOD2(That, string(int, bool));
-
- private:
- string str_;
-
- GTEST_DISALLOW_COPY_AND_ASSIGN_(MockBar);
-};
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that a raw mock generates warnings for uninteresting calls.
-TEST(RawMockTest, WarningForUninterestingCall) {
- const string saved_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = "warning";
-
- MockFoo raw_foo;
-
- CaptureStdout();
- raw_foo.DoThis();
- raw_foo.DoThat(true);
- EXPECT_THAT(GetCapturedStdout(),
- HasSubstr("Uninteresting mock function call"));
-
- GMOCK_FLAG(verbose) = saved_flag;
-}
-
-// Tests that a raw mock generates warnings for uninteresting calls
-// that delete the mock object.
-TEST(RawMockTest, WarningForUninterestingCallAfterDeath) {
- const string saved_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = "warning";
-
- MockFoo* const raw_foo = new MockFoo;
-
- ON_CALL(*raw_foo, DoThis())
- .WillByDefault(Invoke(raw_foo, &MockFoo::Delete));
-
- CaptureStdout();
- raw_foo->DoThis();
- EXPECT_THAT(GetCapturedStdout(),
- HasSubstr("Uninteresting mock function call"));
-
- GMOCK_FLAG(verbose) = saved_flag;
-}
-
-// Tests that a raw mock generates informational logs for
-// uninteresting calls.
-TEST(RawMockTest, InfoForUninterestingCall) {
- MockFoo raw_foo;
-
- const string saved_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = "info";
- CaptureStdout();
- raw_foo.DoThis();
- EXPECT_THAT(GetCapturedStdout(),
- HasSubstr("Uninteresting mock function call"));
-
- GMOCK_FLAG(verbose) = saved_flag;
-}
-
-// Tests that a nice mock generates no warning for uninteresting calls.
-TEST(NiceMockTest, NoWarningForUninterestingCall) {
- NiceMock<MockFoo> nice_foo;
-
- CaptureStdout();
- nice_foo.DoThis();
- nice_foo.DoThat(true);
- EXPECT_EQ("", GetCapturedStdout());
-}
-
-// Tests that a nice mock generates no warning for uninteresting calls
-// that delete the mock object.
-TEST(NiceMockTest, NoWarningForUninterestingCallAfterDeath) {
- NiceMock<MockFoo>* const nice_foo = new NiceMock<MockFoo>;
-
- ON_CALL(*nice_foo, DoThis())
- .WillByDefault(Invoke(nice_foo, &MockFoo::Delete));
-
- CaptureStdout();
- nice_foo->DoThis();
- EXPECT_EQ("", GetCapturedStdout());
-}
-
-// Tests that a nice mock generates informational logs for
-// uninteresting calls.
-TEST(NiceMockTest, InfoForUninterestingCall) {
- NiceMock<MockFoo> nice_foo;
-
- const string saved_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = "info";
- CaptureStdout();
- nice_foo.DoThis();
- EXPECT_THAT(GetCapturedStdout(),
- HasSubstr("Uninteresting mock function call"));
-
- GMOCK_FLAG(verbose) = saved_flag;
-}
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that a nice mock allows expected calls.
-TEST(NiceMockTest, AllowsExpectedCall) {
- NiceMock<MockFoo> nice_foo;
-
- EXPECT_CALL(nice_foo, DoThis());
- nice_foo.DoThis();
-}
-
-// Tests that an unexpected call on a nice mock fails.
-TEST(NiceMockTest, UnexpectedCallFails) {
- NiceMock<MockFoo> nice_foo;
-
- EXPECT_CALL(nice_foo, DoThis()).Times(0);
- EXPECT_NONFATAL_FAILURE(nice_foo.DoThis(), "called more times than expected");
-}
-
-// Tests that NiceMock works with a mock class that has a non-default
-// constructor.
-TEST(NiceMockTest, NonDefaultConstructor) {
- NiceMock<MockBar> nice_bar("hi");
- EXPECT_EQ("hi", nice_bar.str());
-
- nice_bar.This();
- nice_bar.That(5, true);
-}
-
-// Tests that NiceMock works with a mock class that has a 10-ary
-// non-default constructor.
-TEST(NiceMockTest, NonDefaultConstructor10) {
- NiceMock<MockBar> nice_bar('a', 'b', "c", "d", 'e', 'f',
- "g", "h", true, false);
- EXPECT_EQ("abcdefghTF", nice_bar.str());
-
- nice_bar.This();
- nice_bar.That(5, true);
-}
-
-#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-// Tests that NiceMock<Mock> compiles where Mock is a user-defined
-// class (as opposed to ::testing::Mock). We had to work around an
-// MSVC 8.0 bug that caused the symbol Mock used in the definition of
-// NiceMock to be looked up in the wrong context, and this test
-// ensures that our fix works.
-//
-// We have to skip this test on Symbian and Windows Mobile, as it
-// causes the program to crash there, for reasons unclear to us yet.
-TEST(NiceMockTest, AcceptsClassNamedMock) {
- NiceMock< ::Mock> nice;
- EXPECT_CALL(nice, DoThis());
- nice.DoThis();
-}
-#endif // !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-
-#if GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that a naggy mock generates warnings for uninteresting calls.
-TEST(NaggyMockTest, WarningForUninterestingCall) {
- const string saved_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = "warning";
-
- NaggyMock<MockFoo> naggy_foo;
-
- CaptureStdout();
- naggy_foo.DoThis();
- naggy_foo.DoThat(true);
- EXPECT_THAT(GetCapturedStdout(),
- HasSubstr("Uninteresting mock function call"));
-
- GMOCK_FLAG(verbose) = saved_flag;
-}
-
-// Tests that a naggy mock generates a warning for an uninteresting call
-// that deletes the mock object.
-TEST(NaggyMockTest, WarningForUninterestingCallAfterDeath) {
- const string saved_flag = GMOCK_FLAG(verbose);
- GMOCK_FLAG(verbose) = "warning";
-
- NaggyMock<MockFoo>* const naggy_foo = new NaggyMock<MockFoo>;
-
- ON_CALL(*naggy_foo, DoThis())
- .WillByDefault(Invoke(naggy_foo, &MockFoo::Delete));
-
- CaptureStdout();
- naggy_foo->DoThis();
- EXPECT_THAT(GetCapturedStdout(),
- HasSubstr("Uninteresting mock function call"));
-
- GMOCK_FLAG(verbose) = saved_flag;
-}
-
-#endif // GTEST_HAS_STREAM_REDIRECTION
-
-// Tests that a naggy mock allows expected calls.
-TEST(NaggyMockTest, AllowsExpectedCall) {
- NaggyMock<MockFoo> naggy_foo;
-
- EXPECT_CALL(naggy_foo, DoThis());
- naggy_foo.DoThis();
-}
-
-// Tests that an unexpected call on a naggy mock fails.
-TEST(NaggyMockTest, UnexpectedCallFails) {
- NaggyMock<MockFoo> naggy_foo;
-
- EXPECT_CALL(naggy_foo, DoThis()).Times(0);
- EXPECT_NONFATAL_FAILURE(naggy_foo.DoThis(),
- "called more times than expected");
-}
-
-// Tests that NaggyMock works with a mock class that has a non-default
-// constructor.
-TEST(NaggyMockTest, NonDefaultConstructor) {
- NaggyMock<MockBar> naggy_bar("hi");
- EXPECT_EQ("hi", naggy_bar.str());
-
- naggy_bar.This();
- naggy_bar.That(5, true);
-}
-
-// Tests that NaggyMock works with a mock class that has a 10-ary
-// non-default constructor.
-TEST(NaggyMockTest, NonDefaultConstructor10) {
- NaggyMock<MockBar> naggy_bar('0', '1', "2", "3", '4', '5',
- "6", "7", true, false);
- EXPECT_EQ("01234567TF", naggy_bar.str());
-
- naggy_bar.This();
- naggy_bar.That(5, true);
-}
-
-#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-// Tests that NaggyMock<Mock> compiles where Mock is a user-defined
-// class (as opposed to ::testing::Mock). We had to work around an
-// MSVC 8.0 bug that caused the symbol Mock used in the definition of
-// NaggyMock to be looked up in the wrong context, and this test
-// ensures that our fix works.
-//
-// We have to skip this test on Symbian and Windows Mobile, as it
-// causes the program to crash there, for reasons unclear to us yet.
-TEST(NaggyMockTest, AcceptsClassNamedMock) {
- NaggyMock< ::Mock> naggy;
- EXPECT_CALL(naggy, DoThis());
- naggy.DoThis();
-}
-#endif // !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-
-// Tests that a strict mock allows expected calls.
-TEST(StrictMockTest, AllowsExpectedCall) {
- StrictMock<MockFoo> strict_foo;
-
- EXPECT_CALL(strict_foo, DoThis());
- strict_foo.DoThis();
-}
-
-// Tests that an unexpected call on a strict mock fails.
-TEST(StrictMockTest, UnexpectedCallFails) {
- StrictMock<MockFoo> strict_foo;
-
- EXPECT_CALL(strict_foo, DoThis()).Times(0);
- EXPECT_NONFATAL_FAILURE(strict_foo.DoThis(),
- "called more times than expected");
-}
-
-// Tests that an uninteresting call on a strict mock fails.
-TEST(StrictMockTest, UninterestingCallFails) {
- StrictMock<MockFoo> strict_foo;
-
- EXPECT_NONFATAL_FAILURE(strict_foo.DoThis(),
- "Uninteresting mock function call");
-}
-
-// Tests that an uninteresting call on a strict mock fails, even if
-// the call deletes the mock object.
-TEST(StrictMockTest, UninterestingCallFailsAfterDeath) {
- StrictMock<MockFoo>* const strict_foo = new StrictMock<MockFoo>;
-
- ON_CALL(*strict_foo, DoThis())
- .WillByDefault(Invoke(strict_foo, &MockFoo::Delete));
-
- EXPECT_NONFATAL_FAILURE(strict_foo->DoThis(),
- "Uninteresting mock function call");
-}
-
-// Tests that StrictMock works with a mock class that has a
-// non-default constructor.
-TEST(StrictMockTest, NonDefaultConstructor) {
- StrictMock<MockBar> strict_bar("hi");
- EXPECT_EQ("hi", strict_bar.str());
-
- EXPECT_NONFATAL_FAILURE(strict_bar.That(5, true),
- "Uninteresting mock function call");
-}
-
-// Tests that StrictMock works with a mock class that has a 10-ary
-// non-default constructor.
-TEST(StrictMockTest, NonDefaultConstructor10) {
- StrictMock<MockBar> strict_bar('a', 'b', "c", "d", 'e', 'f',
- "g", "h", true, false);
- EXPECT_EQ("abcdefghTF", strict_bar.str());
-
- EXPECT_NONFATAL_FAILURE(strict_bar.That(5, true),
- "Uninteresting mock function call");
-}
-
-#if !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-// Tests that StrictMock<Mock> compiles where Mock is a user-defined
-// class (as opposed to ::testing::Mock). We had to work around an
-// MSVC 8.0 bug that caused the symbol Mock used in the definition of
-// StrictMock to be looked up in the wrong context, and this test
-// ensures that our fix works.
-//
-// We have to skip this test on Symbian and Windows Mobile, as it
-// causes the program to crash there, for reasons unclear to us yet.
-TEST(StrictMockTest, AcceptsClassNamedMock) {
- StrictMock< ::Mock> strict;
- EXPECT_CALL(strict, DoThis());
- strict.DoThis();
-}
-#endif // !GTEST_OS_SYMBIAN && !GTEST_OS_WINDOWS_MOBILE
-
-} // namespace gmock_nice_strict_test
-} // namespace testing
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a5b68bab/depends/googletest/googlemock/test/gmock-port_test.cc
----------------------------------------------------------------------
diff --git a/depends/googletest/googlemock/test/gmock-port_test.cc b/depends/googletest/googlemock/test/gmock-port_test.cc
deleted file mode 100644
index d6a8d44..0000000
--- a/depends/googletest/googlemock/test/gmock-port_test.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: vladl@google.com (Vlad Losev)
-
-// Google Mock - a framework for writing C++ mock classes.
-//
-// This file tests the internal cross-platform support utilities.
-
-#include "gmock/internal/gmock-port.h"
-#include "gtest/gtest.h"
-
-// NOTE: if this file is left without tests for some reason, put a dummy
-// test here to make references to symbols in the gtest library and avoid
-// 'undefined symbol' linker errors in gmock_main:
-
-TEST(DummyTest, Dummy) {}