aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest/internal/gtest-port.h
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2011-02-02 10:07:04 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2011-02-02 10:07:04 +0000
commit9d7455f9844e293dff8b7902f0c2553094f2f976 (patch)
treedfb2f65d0932332b217c19dd22ed62d18e70e2c9 /include/gtest/internal/gtest-port.h
parent40d0ba7a62a8bc749fbaf0747621b0aa10ddf1b9 (diff)
downloadgoogletest-9d7455f9844e293dff8b7902f0c2553094f2f976.tar.gz
googletest-9d7455f9844e293dff8b7902f0c2553094f2f976.tar.bz2
googletest-9d7455f9844e293dff8b7902f0c2553094f2f976.zip
Adds null check for file locations in XML output printer.
Diffstat (limited to 'include/gtest/internal/gtest-port.h')
-rw-r--r--include/gtest/internal/gtest-port.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h
index be2297ed..228c468c 100644
--- a/include/gtest/internal/gtest-port.h
+++ b/include/gtest/internal/gtest-port.h
@@ -848,6 +848,16 @@ class GTEST_API_ RE {
GTEST_DISALLOW_ASSIGN_(RE);
};
+// Formats a source file path and a line number as they would appear
+// in an error message from the compiler used to compile this code.
+GTEST_API_ ::std::string FormatFileLocation(const char* file, int line);
+
+// Formats a file location for compiler-independent XML output.
+// Although this function is not platform dependent, we put it next to
+// FormatFileLocation in order to contrast the two functions.
+GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(const char* file,
+ int line);
+
// Defines logging utilities:
// GTEST_LOG_(severity) - logs messages at the specified severity level. The
// message itself is streamed into the macro.