From 9f0824b0a61b50fd40e47da2387cd9b3f872ce47 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Mon, 22 Mar 2010 21:23:51 +0000 Subject: Adds missing gtest DLL exports. --- include/gtest/gtest.h | 38 ++++++++++++++++----------------- include/gtest/internal/gtest-filepath.h | 2 +- include/gtest/internal/gtest-internal.h | 11 +++++----- include/gtest/internal/gtest-port.h | 12 +++++------ 4 files changed, 32 insertions(+), 31 deletions(-) (limited to 'include/gtest') diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h index 446f0281..ee7a8d56 100644 --- a/include/gtest/gtest.h +++ b/include/gtest/gtest.h @@ -1278,10 +1278,10 @@ AssertionResult CmpHelperEQ(const char* expected_expression, // With this overloaded version, we allow anonymous enums to be used // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums // can be implicitly cast to BiggestInt. -AssertionResult CmpHelperEQ(const char* expected_expression, - const char* actual_expression, - BiggestInt expected, - BiggestInt actual); +GTEST_API_ AssertionResult CmpHelperEQ(const char* expected_expression, + const char* actual_expression, + BiggestInt expected, + BiggestInt actual); // The helper class for {ASSERT|EXPECT}_EQ. The template argument // lhs_is_null_literal is true iff the first argument to ASSERT_EQ() @@ -1370,21 +1370,21 @@ AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ return AssertionFailure(msg);\ }\ }\ -AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \ - BiggestInt val1, BiggestInt val2); +GTEST_API_ AssertionResult CmpHelper##op_name(\ + const char* expr1, const char* expr2, BiggestInt val1, BiggestInt val2) // INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM. // Implements the helper function for {ASSERT|EXPECT}_NE -GTEST_IMPL_CMP_HELPER_(NE, !=) +GTEST_IMPL_CMP_HELPER_(NE, !=); // Implements the helper function for {ASSERT|EXPECT}_LE -GTEST_IMPL_CMP_HELPER_(LE, <=) +GTEST_IMPL_CMP_HELPER_(LE, <=); // Implements the helper function for {ASSERT|EXPECT}_LT -GTEST_IMPL_CMP_HELPER_(LT, < ) +GTEST_IMPL_CMP_HELPER_(LT, < ); // Implements the helper function for {ASSERT|EXPECT}_GE -GTEST_IMPL_CMP_HELPER_(GE, >=) +GTEST_IMPL_CMP_HELPER_(GE, >=); // Implements the helper function for {ASSERT|EXPECT}_GT -GTEST_IMPL_CMP_HELPER_(GT, > ) +GTEST_IMPL_CMP_HELPER_(GT, > ); #undef GTEST_IMPL_CMP_HELPER_ @@ -1447,30 +1447,30 @@ GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression, // // The {needle,haystack}_expr arguments are the stringified // expressions that generated the two real arguments. -AssertionResult IsSubstring( +GTEST_API_ AssertionResult IsSubstring( const char* needle_expr, const char* haystack_expr, const char* needle, const char* haystack); -AssertionResult IsSubstring( +GTEST_API_ AssertionResult IsSubstring( const char* needle_expr, const char* haystack_expr, const wchar_t* needle, const wchar_t* haystack); -AssertionResult IsNotSubstring( +GTEST_API_ AssertionResult IsNotSubstring( const char* needle_expr, const char* haystack_expr, const char* needle, const char* haystack); -AssertionResult IsNotSubstring( +GTEST_API_ AssertionResult IsNotSubstring( const char* needle_expr, const char* haystack_expr, const wchar_t* needle, const wchar_t* haystack); -AssertionResult IsSubstring( +GTEST_API_ AssertionResult IsSubstring( const char* needle_expr, const char* haystack_expr, const ::std::string& needle, const ::std::string& haystack); -AssertionResult IsNotSubstring( +GTEST_API_ AssertionResult IsNotSubstring( const char* needle_expr, const char* haystack_expr, const ::std::string& needle, const ::std::string& haystack); #if GTEST_HAS_STD_WSTRING -AssertionResult IsSubstring( +GTEST_API_ AssertionResult IsSubstring( const char* needle_expr, const char* haystack_expr, const ::std::wstring& needle, const ::std::wstring& haystack); -AssertionResult IsNotSubstring( +GTEST_API_ AssertionResult IsNotSubstring( const char* needle_expr, const char* haystack_expr, const ::std::wstring& needle, const ::std::wstring& haystack); #endif // GTEST_HAS_STD_WSTRING diff --git a/include/gtest/internal/gtest-filepath.h b/include/gtest/internal/gtest-filepath.h index 394f26ae..4b76d795 100644 --- a/include/gtest/internal/gtest-filepath.h +++ b/include/gtest/internal/gtest-filepath.h @@ -56,7 +56,7 @@ namespace internal { // Names are NOT checked for syntax correctness -- no checking for illegal // characters, malformed paths, etc. -class FilePath { +class GTEST_API_ FilePath { public: FilePath() : pathname_("") { } FilePath(const FilePath& rhs) : pathname_(rhs.pathname_) { } diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h index 7bc35e20..31a66e99 100644 --- a/include/gtest/internal/gtest-internal.h +++ b/include/gtest/internal/gtest-internal.h @@ -120,7 +120,7 @@ extern int g_init_gtest_count; // The text used in failure messages to indicate the start of the // stack trace. -extern const char kStackTraceMarker[]; +GTEST_API_ extern const char kStackTraceMarker[]; // A secret type that Google Test users don't know about. It has no // definition on purpose. Therefore it's impossible to create a @@ -157,8 +157,8 @@ char (&IsNullLiteralHelper(...))[2]; // NOLINT #endif // GTEST_ELLIPSIS_NEEDS_POD_ // Appends the user-supplied message to the Google-Test-generated message. -String AppendUserMessage(const String& gtest_msg, - const Message& user_msg); +GTEST_API_ String AppendUserMessage(const String& gtest_msg, + const Message& user_msg); // A helper class for creating scoped traces in user programs. class GTEST_API_ ScopedTrace { @@ -750,7 +750,8 @@ class TypeParameterizedTestCase { // For example, if Foo() calls Bar(), which in turn calls // GetCurrentOsStackTraceExceptTop(..., 1), Foo() will be included in // the trace but Bar() and GetCurrentOsStackTraceExceptTop() won't. -String GetCurrentOsStackTraceExceptTop(UnitTest* unit_test, int skip_count); +GTEST_API_ String GetCurrentOsStackTraceExceptTop(UnitTest* unit_test, + int skip_count); // Helpers for suppressing warnings on unreachable code or constant // condition. @@ -766,7 +767,7 @@ inline bool AlwaysFalse() { return !AlwaysTrue(); } // doesn't use global state (and therefore can't interfere with user // code). Unlike rand_r(), it's portable. An LCG isn't very random, // but it's good enough for our purposes. -class Random { +class GTEST_API_ Random { public: static const UInt32 kMaxRange = 1u << 31; diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 0b00c99d..23c2ff6e 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -782,10 +782,10 @@ inline void FlushInfoLog() { fflush(NULL); } // CaptureStderr - starts capturing stderr. // GetCapturedStderr - stops capturing stderr and returns the captured string. // -void CaptureStdout(); -String GetCapturedStdout(); -void CaptureStderr(); -String GetCapturedStderr(); +GTEST_API_ void CaptureStdout(); +GTEST_API_ String GetCapturedStdout(); +GTEST_API_ void CaptureStderr(); +GTEST_API_ String GetCapturedStderr(); #endif // GTEST_HAS_STREAM_REDIRECTION_ @@ -1135,7 +1135,7 @@ class ThreadLocal { // Returns the number of threads running in the process, or 0 to indicate that // we cannot detect it. -size_t GetThreadCount(); +GTEST_API_ size_t GetThreadCount(); // Passing non-POD classes through ellipsis (...) crashes the ARM // compiler and generates a warning in Sun Studio. The Nokia Symbian @@ -1414,7 +1414,7 @@ bool ParseInt32(const Message& src_text, const char* str, Int32* value); // Parses a bool/Int32/string from the environment variable // corresponding to the given Google Test flag. bool BoolFromGTestEnv(const char* flag, bool default_val); -Int32 Int32FromGTestEnv(const char* flag, Int32 default_val); +GTEST_API_ Int32 Int32FromGTestEnv(const char* flag, Int32 default_val); const char* StringFromGTestEnv(const char* flag, const char* default_val); } // namespace internal -- cgit v1.2.3