aboutsummaryrefslogtreecommitdiffstats
path: root/src/gmock-internal-utils.cc
diff options
context:
space:
mode:
authorvladlosev <vladlosev@8415998a-534a-0410-bf83-d39667b30386>2011-05-20 00:42:22 +0000
committervladlosev <vladlosev@8415998a-534a-0410-bf83-d39667b30386>2011-05-20 00:42:22 +0000
commit587c1b37c2f0b6d430fb13ce09326db0135b557c (patch)
tree9396b2a9b8eb5d3c30beb9001e983bba37bc7774 /src/gmock-internal-utils.cc
parent47be72a952e672e2635c62353d25e611e9a70dac (diff)
downloadgoogletest-587c1b37c2f0b6d430fb13ce09326db0135b557c.tar.gz
googletest-587c1b37c2f0b6d430fb13ce09326db0135b557c.tar.bz2
googletest-587c1b37c2f0b6d430fb13ce09326db0135b557c.zip
Adds support for building Google Mock as a shared library (DLL).
Diffstat (limited to 'src/gmock-internal-utils.cc')
-rw-r--r--src/gmock-internal-utils.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gmock-internal-utils.cc b/src/gmock-internal-utils.cc
index dd38132a..470fc447 100644
--- a/src/gmock-internal-utils.cc
+++ b/src/gmock-internal-utils.cc
@@ -51,7 +51,7 @@ namespace internal {
// words. Each maximum substring of the form [A-Za-z][a-z]*|\d+ is
// treated as one word. For example, both "FooBar123" and
// "foo_bar_123" are converted to "foo bar 123".
-string ConvertIdentifierNameToWords(const char* id_name) {
+GTEST_API_ string ConvertIdentifierNameToWords(const char* id_name) {
string result;
char prev_char = '\0';
for (const char* p = id_name; *p != '\0'; prev_char = *(p++)) {
@@ -91,7 +91,7 @@ class GoogleTestFailureReporter : public FailureReporterInterface {
// Returns the global failure reporter. Will create a
// GoogleTestFailureReporter and return it the first time called.
-FailureReporterInterface* GetFailureReporter() {
+GTEST_API_ FailureReporterInterface* GetFailureReporter() {
// Points to the global failure reporter used by Google Mock. gcc
// guarantees that the following use of failure_reporter is
// thread-safe. We may need to add additional synchronization to
@@ -107,7 +107,7 @@ static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex);
// Returns true iff a log with the given severity is visible according
// to the --gmock_verbose flag.
-bool LogIsVisible(LogSeverity severity) {
+GTEST_API_ bool LogIsVisible(LogSeverity severity) {
if (GMOCK_FLAG(verbose) == kInfoVerbosity) {
// Always show the log if --gmock_verbose=info.
return true;
@@ -128,8 +128,9 @@ bool LogIsVisible(LogSeverity severity) {
// stack_frames_to_skip is treated as 0, since we don't know which
// function calls will be inlined by the compiler and need to be
// conservative.
-void Log(LogSeverity severity, const string& message,
- int stack_frames_to_skip) {
+GTEST_API_ void Log(LogSeverity severity,
+ const string& message,
+ int stack_frames_to_skip) {
if (!LogIsVisible(severity))
return;