Skip to content

Commit 7ee260c

Browse files
Abseil Teamcopybara-github
authored andcommitted
Rolled back due to breaking existing tests.
PiperOrigin-RevId: 521555658 Change-Id: I09742faceb82b2b7ceb423e850a8b50d532ad6ff
1 parent b5fd99b commit 7ee260c

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

googletest/src/gtest.cc

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
#include <chrono> // NOLINT
4545
#include <cmath>
4646
#include <cstdint>
47-
#include <cstring>
4847
#include <initializer_list>
4948
#include <iomanip>
5049
#include <ios>
@@ -2982,25 +2981,6 @@ void TestSuite::Run() {
29822981

29832982
TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater();
29842983

2985-
// Ensure our tests are in a deterministic order.
2986-
//
2987-
// We do this by sorting lexicographically on (file, line number), providing
2988-
// an order matching what the user can see in the source code.
2989-
//
2990-
// In the common case the line number comparison shouldn't be necessary,
2991-
// because the registrations made by the TEST macro are executed in order
2992-
// within a translation unit. But this is not true of the manual registration
2993-
// API, and in more exotic scenarios a single file may be part of multiple
2994-
// translation units.
2995-
std::stable_sort(test_info_list_.begin(), test_info_list_.end(),
2996-
[](const TestInfo* const a, const TestInfo* const b) {
2997-
if (const int result = std::strcmp(a->file(), a->file())) {
2998-
return result < 0;
2999-
}
3000-
3001-
return a->line() < b->line();
3002-
});
3003-
30042984
// Call both legacy and the new API
30052985
repeater->OnTestSuiteStart(*this);
30062986
// Legacy API is deprecated but still available

0 commit comments

Comments
 (0)