// 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++)) {
public:
virtual void ReportFailure(FailureType type, const char* file, int line,
const string& message) {
- AssertHelper(type == FATAL ?
+ AssertHelper(type == kFatal ?
TestPartResult::kFatalFailure :
TestPartResult::kNonFatalFailure,
file,
line,
message.c_str()) = Message();
- if (type == FATAL) {
+ if (type == kFatal) {
posix::Abort();
}
}
// 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
// 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;
} else {
// If --gmock_verbose is neither "info" nor "error", we treat it
// as "warning" (its default value).
- return severity == WARNING;
+ return severity == kWarning;
}
}
// 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;
// "using ::std::cout;" doesn't work with Symbian's STLport, where cout is a
// macro.
- if (severity == WARNING) {
+ if (severity == kWarning) {
// Prints a GMOCK WARNING marker to make the warnings easily searchable.
std::cout << "\nGMOCK WARNING:";
}