summaryrefslogtreecommitdiffstats
path: root/googletest/src
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/src')
-rw-r--r--googletest/src/gtest-filepath.cc13
-rw-r--r--googletest/src/gtest.cc6
2 files changed, 8 insertions, 11 deletions
diff --git a/googletest/src/gtest-filepath.cc b/googletest/src/gtest-filepath.cc
index 9d79ea4..940585d 100644
--- a/googletest/src/gtest-filepath.cc
+++ b/googletest/src/gtest-filepath.cc
@@ -148,20 +148,19 @@ const char* FilePath::FindLastPathSeparator() const {
}
size_t FilePath::CalculateRootLength() const {
- const auto &path = pathname_;
+ const auto& path = pathname_;
auto s = path.begin();
auto end = path.end();
#if GTEST_OS_WINDOWS
- if (end - s >= 2 && s[1] == ':' &&
- (end - s == 2 || IsPathSeparator(s[2])) &&
+ if (end - s >= 2 && s[1] == ':' && (end - s == 2 || IsPathSeparator(s[2])) &&
(('A' <= s[0] && s[0] <= 'Z') || ('a' <= s[0] && s[0] <= 'z'))) {
// A typical absolute path like "C:\Windows" or "D:"
s += 2;
if (s != end) {
++s;
}
- } else if (end - s >= 3 && IsPathSeparator(*s) && IsPathSeparator(*(s + 1))
- && !IsPathSeparator(*(s + 2))) {
+ } else if (end - s >= 3 && IsPathSeparator(*s) && IsPathSeparator(*(s + 1)) &&
+ !IsPathSeparator(*(s + 2))) {
// Move past the "\\" prefix in a UNC path like "\\Server\Share\Folder"
s += 2;
// Skip 2 components and their following separators ("Server\" and "Share\")
@@ -295,9 +294,7 @@ bool FilePath::IsRootDirectory() const {
}
// Returns true if pathname describes an absolute path.
-bool FilePath::IsAbsolutePath() const {
- return CalculateRootLength() > 0;
-}
+bool FilePath::IsAbsolutePath() const { return CalculateRootLength() > 0; }
// Returns a pathname for a file that does not currently exist. The pathname
// will be directory/base_name.extension or
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index a64e887..19acb1c 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -1134,8 +1134,8 @@ class Timer {
// Return time elapsed in milliseconds since the timer was created.
TimeInMillis Elapsed() {
- return std::chrono::duration_cast<std::chrono::milliseconds>(
- clock::now() - start_)
+ return std::chrono::duration_cast<std::chrono::milliseconds>(clock::now() -
+ start_)
.count();
}
@@ -6172,7 +6172,7 @@ void UnitTestImpl::ListTestsMatchingFilter() {
}
}
fflush(stdout);
- #if GTEST_HAS_FILE_SYSTEM
+#if GTEST_HAS_FILE_SYSTEM
const std::string& output_format = UnitTestOptions::GetOutputFormat();
if (output_format == "xml" || output_format == "json") {
FILE* fileout = OpenFileForWriting(