summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@google.com>2023-04-20 14:28:27 -0700
committerCopybara-Service <copybara-worker@google.com>2023-04-20 14:29:09 -0700
commita5308bb992c049b16b763f8910da70c208c5cede (patch)
tree788dd92b47d57d18fd0f0a445917e4448eff38a3
parent9c1efac2a1b6d836ef35e1dfb87b7addca361afe (diff)
downloadgoogletest-git-a5308bb992c049b16b763f8910da70c208c5cede.tar.gz
Add missing std includes
PiperOrigin-RevId: 525850646 Change-Id: I64387f5b933beb79cd05636dca81b7a75213383e
-rw-r--r--googlemock/include/gmock/gmock-matchers.h1
-rw-r--r--googlemock/src/gmock-internal-utils.cc1
-rw-r--r--googlemock/src/gmock-spec-builders.cc1
-rw-r--r--googlemock/src/gmock.cc2
-rw-r--r--googlemock/test/gmock-actions_test.cc3
-rw-r--r--googlemock/test/gmock-cardinalities_test.cc2
-rw-r--r--googlemock/test/gmock-internal-utils_test.cc1
-rw-r--r--googlemock/test/gmock-matchers-arithmetic_test.cc3
-rw-r--r--googlemock/test/gmock-matchers-comparisons_test.cc3
-rw-r--r--googlemock/test/gmock-matchers-containers_test.cc12
-rw-r--r--googlemock/test/gmock-matchers-misc_test.cc8
-rw-r--r--googlemock/test/gmock-more-actions_test.cc4
-rw-r--r--googlemock/test/gmock_ex_test.cc2
-rw-r--r--googletest/samples/sample8_unittest.cc2
-rw-r--r--googletest/src/gtest-death-test.cc2
-rw-r--r--googletest/src/gtest-filepath.cc3
-rw-r--r--googletest/src/gtest-port.cc4
-rw-r--r--googletest/src/gtest-printers.cc2
-rw-r--r--googletest/src/gtest-test-part.cc3
-rw-r--r--googletest/src/gtest-typed-test.cc4
-rw-r--r--googletest/src/gtest.cc3
-rw-r--r--googletest/test/googletest-death-test-test.cc3
-rw-r--r--googletest/test/googletest-list-tests-unittest_.cc3
-rw-r--r--googletest/test/googletest-listener-test.cc1
-rw-r--r--googletest/test/googletest-param-test-invalid-name2-test_.cc2
-rw-r--r--googletest/test/googletest-printers-test.cc2
-rw-r--r--googletest/test/gtest_stress_test.cc2
-rw-r--r--googletest/test/gtest_unittest.cc1
28 files changed, 80 insertions, 0 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h
index fb9f15e8..0f677137 100644
--- a/googlemock/include/gmock/gmock-matchers.h
+++ b/googlemock/include/gmock/gmock-matchers.h
@@ -257,6 +257,7 @@
#include <algorithm>
#include <cmath>
+#include <exception>
#include <functional>
#include <initializer_list>
#include <ios>
diff --git a/googlemock/src/gmock-internal-utils.cc b/googlemock/src/gmock-internal-utils.cc
index 774cce33..5c2ce0d5 100644
--- a/googlemock/src/gmock-internal-utils.cc
+++ b/googlemock/src/gmock-internal-utils.cc
@@ -41,6 +41,7 @@
#include <cctype>
#include <cstdint>
#include <cstring>
+#include <iostream>
#include <ostream> // NOLINT
#include <string>
#include <vector>
diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc
index 5a98fafd..df0660b1 100644
--- a/googlemock/src/gmock-spec-builders.cc
+++ b/googlemock/src/gmock-spec-builders.cc
@@ -40,6 +40,7 @@
#include <map>
#include <memory>
#include <set>
+#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>
diff --git a/googlemock/src/gmock.cc b/googlemock/src/gmock.cc
index 5025656a..b5e714da 100644
--- a/googlemock/src/gmock.cc
+++ b/googlemock/src/gmock.cc
@@ -29,6 +29,8 @@
#include "gmock/gmock.h"
+#include <string>
+
#include "gmock/internal/gmock-port.h"
GMOCK_DEFINE_bool_(catch_leaked_mocks, true,
diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc
index ee9b889b..f2305e52 100644
--- a/googlemock/test/gmock-actions_test.cc
+++ b/googlemock/test/gmock-actions_test.cc
@@ -37,8 +37,11 @@
#include <functional>
#include <iterator>
#include <memory>
+#include <sstream>
#include <string>
+#include <tuple>
#include <type_traits>
+#include <utility>
#include <vector>
#include "gmock/gmock.h"
diff --git a/googlemock/test/gmock-cardinalities_test.cc b/googlemock/test/gmock-cardinalities_test.cc
index cdd99563..77196d7a 100644
--- a/googlemock/test/gmock-cardinalities_test.cc
+++ b/googlemock/test/gmock-cardinalities_test.cc
@@ -31,6 +31,8 @@
//
// This file tests the built-in cardinalities.
+#include <ostream>
+
#include "gmock/gmock.h"
#include "gtest/gtest-spi.h"
#include "gtest/gtest.h"
diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc
index 360d02ae..6c769a88 100644
--- a/googlemock/test/gmock-internal-utils_test.cc
+++ b/googlemock/test/gmock-internal-utils_test.cc
@@ -40,6 +40,7 @@
#include <memory>
#include <sstream>
#include <string>
+#include <tuple>
#include <vector>
#include "gmock/gmock.h"
diff --git a/googlemock/test/gmock-matchers-arithmetic_test.cc b/googlemock/test/gmock-matchers-arithmetic_test.cc
index 2c5f4d0b..062e2ab3 100644
--- a/googlemock/test/gmock-matchers-arithmetic_test.cc
+++ b/googlemock/test/gmock-matchers-arithmetic_test.cc
@@ -31,7 +31,10 @@
//
// This file tests some commonly used argument matchers.
+#include <cmath>
#include <limits>
+#include <memory>
+#include <string>
#include "test/gmock-matchers_test.h"
diff --git a/googlemock/test/gmock-matchers-comparisons_test.cc b/googlemock/test/gmock-matchers-comparisons_test.cc
index b849990d..cf85eb56 100644
--- a/googlemock/test/gmock-matchers-comparisons_test.cc
+++ b/googlemock/test/gmock-matchers-comparisons_test.cc
@@ -31,7 +31,10 @@
//
// This file tests some commonly used argument matchers.
+#include <functional>
#include <memory>
+#include <string>
+#include <tuple>
#include <vector>
#include "test/gmock-matchers_test.h"
diff --git a/googlemock/test/gmock-matchers-containers_test.cc b/googlemock/test/gmock-matchers-containers_test.cc
index c8d8ea37..654a011a 100644
--- a/googlemock/test/gmock-matchers-containers_test.cc
+++ b/googlemock/test/gmock-matchers-containers_test.cc
@@ -31,6 +31,18 @@
//
// This file tests some commonly used argument matchers.
+#include <algorithm>
+#include <array>
+#include <deque>
+#include <forward_list>
+#include <iterator>
+#include <list>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <tuple>
+#include <vector>
+
#include "gtest/gtest.h"
// Silence warning C4244: 'initializing': conversion from 'int' to 'short',
diff --git a/googlemock/test/gmock-matchers-misc_test.cc b/googlemock/test/gmock-matchers-misc_test.cc
index 0c7aa499..b8f64587 100644
--- a/googlemock/test/gmock-matchers-misc_test.cc
+++ b/googlemock/test/gmock-matchers-misc_test.cc
@@ -31,6 +31,14 @@
//
// This file tests some commonly used argument matchers.
+#include <array>
+#include <memory>
+#include <ostream>
+#include <string>
+#include <tuple>
+#include <utility>
+#include <vector>
+
#include "gtest/gtest.h"
// Silence warning C4244: 'initializing': conversion from 'int' to 'short',
diff --git a/googlemock/test/gmock-more-actions_test.cc b/googlemock/test/gmock-more-actions_test.cc
index 866e1aba..ec7aea61 100644
--- a/googlemock/test/gmock-more-actions_test.cc
+++ b/googlemock/test/gmock-more-actions_test.cc
@@ -33,10 +33,14 @@
#include "gmock/gmock-more-actions.h"
+#include <algorithm>
#include <functional>
+#include <iterator>
#include <memory>
#include <sstream>
#include <string>
+#include <tuple>
+#include <vector>
#include "gmock/gmock.h"
#include "gtest/gtest-spi.h"
diff --git a/googlemock/test/gmock_ex_test.cc b/googlemock/test/gmock_ex_test.cc
index 44e5e35f..e174122d 100644
--- a/googlemock/test/gmock_ex_test.cc
+++ b/googlemock/test/gmock_ex_test.cc
@@ -29,6 +29,8 @@
// Tests Google Mock's functionality that depends on exceptions.
+#include <exception>
+
#include "gmock/gmock.h"
#include "gtest/gtest.h"
diff --git a/googletest/samples/sample8_unittest.cc b/googletest/samples/sample8_unittest.cc
index 9717e286..4df81df0 100644
--- a/googletest/samples/sample8_unittest.cc
+++ b/googletest/samples/sample8_unittest.cc
@@ -32,6 +32,8 @@
// and each test is given one combination as a parameter.
// Use class definitions to test from this header.
+#include <tuple>
+
#include "prime_tables.h"
#include "gtest/gtest.h"
namespace {
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc
index 0b87ba5b..55b95782 100644
--- a/googletest/src/gtest-death-test.cc
+++ b/googletest/src/gtest-death-test.cc
@@ -34,6 +34,8 @@
#include <functional>
#include <memory>
+#include <sstream>
+#include <string>
#include <utility>
#include <vector>
diff --git a/googletest/src/gtest-filepath.cc b/googletest/src/gtest-filepath.cc
index 48dee13e..75f52bcf 100644
--- a/googletest/src/gtest-filepath.cc
+++ b/googletest/src/gtest-filepath.cc
@@ -31,6 +31,9 @@
#include <stdlib.h>
+#include <iterator>
+#include <string>
+
#include "gtest/gtest-message.h"
#include "gtest/internal/gtest-port.h"
diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc
index 994fabd4..77b618c4 100644
--- a/googletest/src/gtest-port.cc
+++ b/googletest/src/gtest-port.cc
@@ -37,6 +37,10 @@
#include <cstdint>
#include <fstream>
#include <memory>
+#include <ostream>
+#include <string>
+#include <utility>
+#include <vector>
#ifdef GTEST_OS_WINDOWS
#include <io.h>
diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc
index de740e7d..2b470678 100644
--- a/googletest/src/gtest-printers.cc
+++ b/googletest/src/gtest-printers.cc
@@ -47,6 +47,8 @@
#include <cctype>
#include <cstdint>
#include <cwchar>
+#include <iomanip>
+#include <ios>
#include <ostream> // NOLINT
#include <string>
#include <type_traits>
diff --git a/googletest/src/gtest-test-part.cc b/googletest/src/gtest-test-part.cc
index df677e6f..6f8ddd7c 100644
--- a/googletest/src/gtest-test-part.cc
+++ b/googletest/src/gtest-test-part.cc
@@ -32,6 +32,9 @@
#include "gtest/gtest-test-part.h"
+#include <ostream>
+#include <string>
+
#include "gtest/internal/gtest-port.h"
#include "src/gtest-internal-inl.h"
diff --git a/googletest/src/gtest-typed-test.cc b/googletest/src/gtest-typed-test.cc
index 9941306f..b251c09d 100644
--- a/googletest/src/gtest-typed-test.cc
+++ b/googletest/src/gtest-typed-test.cc
@@ -29,6 +29,10 @@
#include "gtest/gtest-typed-test.h"
+#include <set>
+#include <string>
+#include <vector>
+
#include "gtest/gtest.h"
namespace testing {
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index da52b1d1..01c0220b 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -48,13 +48,16 @@
#include <initializer_list>
#include <iomanip>
#include <ios>
+#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <ostream> // NOLINT
+#include <set>
#include <sstream>
#include <unordered_set>
+#include <utility>
#include <vector>
#include "gtest/gtest-assertion-result.h"
diff --git a/googletest/test/googletest-death-test-test.cc b/googletest/test/googletest-death-test-test.cc
index 3579ce88..4cc81b72 100644
--- a/googletest/test/googletest-death-test-test.cc
+++ b/googletest/test/googletest-death-test-test.cc
@@ -52,6 +52,9 @@ using testing::internal::AlwaysTrue;
#include <signal.h>
#include <stdio.h>
+#include <string>
+#include <vector>
+
#ifdef GTEST_OS_LINUX
#include <sys/time.h>
#endif // GTEST_OS_LINUX
diff --git a/googletest/test/googletest-list-tests-unittest_.cc b/googletest/test/googletest-list-tests-unittest_.cc
index 5577e896..a1ea6cf4 100644
--- a/googletest/test/googletest-list-tests-unittest_.cc
+++ b/googletest/test/googletest-list-tests-unittest_.cc
@@ -36,6 +36,9 @@
// This program will be invoked from a Python unit test.
// Don't run it directly.
+#include <ostream>
+#include <string>
+
#include "gtest/gtest.h"
// Several different test cases and tests that will be listed.
diff --git a/googletest/test/googletest-listener-test.cc b/googletest/test/googletest-listener-test.cc
index 654486d7..d7c47c21 100644
--- a/googletest/test/googletest-listener-test.cc
+++ b/googletest/test/googletest-listener-test.cc
@@ -32,6 +32,7 @@
// This file verifies Google Test event listeners receive events at the
// right times.
+#include <string>
#include <vector>
#include "gtest/gtest.h"
diff --git a/googletest/test/googletest-param-test-invalid-name2-test_.cc b/googletest/test/googletest-param-test-invalid-name2-test_.cc
index d0c44da5..6d88a9ce 100644
--- a/googletest/test/googletest-param-test-invalid-name2-test_.cc
+++ b/googletest/test/googletest-param-test-invalid-name2-test_.cc
@@ -27,6 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include <string>
+
#include "gtest/gtest.h"
namespace {
diff --git a/googletest/test/googletest-printers-test.cc b/googletest/test/googletest-printers-test.cc
index 7fa82d08..e667e8f0 100644
--- a/googletest/test/googletest-printers-test.cc
+++ b/googletest/test/googletest-printers-test.cc
@@ -42,9 +42,11 @@
#include <list>
#include <map>
#include <memory>
+#include <ostream>
#include <set>
#include <sstream>
#include <string>
+#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
diff --git a/googletest/test/gtest_stress_test.cc b/googletest/test/gtest_stress_test.cc
index 0cf21852..af8e757d 100644
--- a/googletest/test/gtest_stress_test.cc
+++ b/googletest/test/gtest_stress_test.cc
@@ -30,7 +30,9 @@
// Tests that SCOPED_TRACE() and various Google Test assertions can be
// used in a large number of threads concurrently.
+#include <algorithm>
#include <memory>
+#include <string>
#include <vector>
#include "gtest/gtest.h"
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index bd4fc60a..57041f05 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -63,6 +63,7 @@ TEST(CommandLineFlagsTest, CanBeAccessedInCodeOnceGTestHIsIncluded) {
#include <memory>
#include <ostream>
#include <set>
+#include <stdexcept>
#include <string>
#include <type_traits>
#include <unordered_set>