From b0aabe4aa4f8e7d5608475bba93afb6db769e1d1 Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 9 Jan 2024 20:50:34 -0700 Subject: [PATCH] Add Replace Type With Auto test file diff --- results/file-diffs/RTWA.txt | 256 ++++++++++++++++++++++++++++++++++++ 1 file changed, 256 insertions(+) create mode 100644 results/file-diffs/RTWA.txt diff --git a/results/file-diffs/RTWA.txt b/results/file-diffs/RTWA.txt new file mode 100644 index 0000000..1a978b5 --- /dev/null +++ b/results/file-diffs/RTWA.txt @@ -0,0 +1,256 @@ +diff --git a/RefactorTest/ReplaceTypeWithAuto.cpp b/RefactorTest/ReplaceTypeWithAuto.cpp +index e4cb8d2..579a7a3 100644 +--- a/RefactorTest/ReplaceTypeWithAuto.cpp ++++ b/RefactorTest/ReplaceTypeWithAuto.cpp +@@ -15,7 +15,7 @@ static void TestReplaceTypeWithAutoDeque() + c.push_back(2); + int sum = 0; + // #TEST#: RTWA1 Replace type with auto +- for (std::deque::const_iterator it = c.cbegin(), end = c.cend(); it != end; ++it) ++ for (auto it = c.cbegin(), end = c.cend(); it != end; ++it) + { + sum += *it; + } +@@ -23,7 +23,7 @@ static void TestReplaceTypeWithAutoDeque() + + sum = 0; + // #TEST#: RTWA2 Replace type with auto +- for (std::deque::const_reverse_iterator it = c.crbegin(), end = c.crend(); it != end; ++it) ++ for (auto it = c.crbegin(), end = c.crend(); it != end; ++it) + { + sum += *it; + } +@@ -31,7 +31,7 @@ static void TestReplaceTypeWithAutoDeque() + + sum = 0; + // #TEST#: RTWA3 Replace type with auto +- for (std::deque::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + ++*it; + sum += *it; +@@ -40,7 +40,7 @@ static void TestReplaceTypeWithAutoDeque() + + sum = 0; + // #TEST#: RTWA4 Replace type with auto +- for (std::deque::reverse_iterator it = c.rbegin(), end = c.rend(); it != end; ++it) ++ for (auto it = c.rbegin(), end = c.rend(); it != end; ++it) + { + --*it; + sum += *it; +@@ -55,7 +55,7 @@ static void TestReplaceTypeWithAutoList() + c.push_back(2); + int sum = 0; + // #TEST#: RTWA5 Replace type with auto +- for (std::list::const_iterator it = c.cbegin(), end = c.cend(); it != end; ++it) ++ for (auto it = c.cbegin(), end = c.cend(); it != end; ++it) + { + sum += *it; + } +@@ -63,7 +63,7 @@ static void TestReplaceTypeWithAutoList() + + sum = 0; + // #TEST#: RTWA6 Replace type with auto +- for (std::list::const_reverse_iterator it = c.crbegin(), end = c.crend(); it != end; ++it) ++ for (auto it = c.crbegin(), end = c.crend(); it != end; ++it) + { + sum += *it; + } +@@ -71,7 +71,7 @@ static void TestReplaceTypeWithAutoList() + + sum = 0; + // #TEST#: RTWA7 Replace type with auto +- for (std::list::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + ++*it; + sum += *it; +@@ -80,7 +80,7 @@ static void TestReplaceTypeWithAutoList() + + sum = 0; + // #TEST#: RTWA8 Replace type with auto +- for (std::list::reverse_iterator it = c.rbegin(), end = c.rend(); it != end; ++it) ++ for (auto it = c.rbegin(), end = c.rend(); it != end; ++it) + { + --*it; + sum += *it; +@@ -95,7 +95,7 @@ static void TestReplaceTypeWithAutoMap() + c[2] = 2; + int sum = 0; + // #TEST#: RTWA9 Replace type with auto +- for (std::map::const_iterator it = c.cbegin(), end = c.cend(); it != end; ++it) ++ for (auto it = c.cbegin(), end = c.cend(); it != end; ++it) + { + sum += it->second; + } +@@ -103,7 +103,7 @@ static void TestReplaceTypeWithAutoMap() + + sum = 0; + // #TEST#: RTWA10 Replace type with auto +- for (std::map::const_reverse_iterator it = c.crbegin(), end = c.crend(); it != end; ++it) ++ for (auto it = c.crbegin(), end = c.crend(); it != end; ++it) + { + sum += it->second; + } +@@ -111,7 +111,7 @@ static void TestReplaceTypeWithAutoMap() + + sum = 0; + // #TEST#: RTWA11 Replace type with auto +- for (std::map::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + ++it->second; + sum += it->second; +@@ -120,7 +120,7 @@ static void TestReplaceTypeWithAutoMap() + + sum = 0; + // #TEST#: RTWA12 Replace type with auto +- for (std::map::reverse_iterator it = c.rbegin(), end = c.rend(); it != end; ++it) ++ for (auto it = c.rbegin(), end = c.rend(); it != end; ++it) + { + --it->second; + sum += it->second; +@@ -135,7 +135,7 @@ static void TestReplaceTypeWithAutoMultimap() + c.insert(std::make_pair(2, 2)); + int sum = 0; + // #TEST#: RTWA13 Replace type with auto +- for (std::multimap::const_iterator it = c.cbegin(), end = c.cend(); it != end; ++it) ++ for (auto it = c.cbegin(), end = c.cend(); it != end; ++it) + { + sum += it->second; + } +@@ -143,7 +143,7 @@ static void TestReplaceTypeWithAutoMultimap() + + sum = 0; + // #TEST#: RTWA14 Replace type with auto +- for (std::multimap::const_reverse_iterator it = c.crbegin(), end = c.crend(); it != end; ++it) ++ for (auto it = c.crbegin(), end = c.crend(); it != end; ++it) + { + sum += it->second; + } +@@ -151,7 +151,7 @@ static void TestReplaceTypeWithAutoMultimap() + + sum = 0; + // #TEST#: RTWA15 Replace type with auto +- for (std::multimap::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + ++it->second; + sum += it->second; +@@ -160,7 +160,7 @@ static void TestReplaceTypeWithAutoMultimap() + + sum = 0; + // #TEST#: RTWA16 Replace type with auto +- for (std::multimap::reverse_iterator it = c.rbegin(), end = c.rend(); it != end; ++it) ++ for (auto it = c.rbegin(), end = c.rend(); it != end; ++it) + { + --it->second; + sum += it->second; +@@ -175,7 +175,7 @@ static void TestReplaceTypeWithAutoSet() + c.insert(2); + int sum = 0; + // #TEST#: RTWA17 Replace type with auto +- for (std::set::const_iterator it = c.cbegin(), end = c.cend(); it != end; ++it) ++ for (auto it = c.cbegin(), end = c.cend(); it != end; ++it) + { + sum += *it; + } +@@ -183,7 +183,7 @@ static void TestReplaceTypeWithAutoSet() + + sum = 0; + // #TEST#: RTWA18 Replace type with auto +- for (std::set::const_reverse_iterator it = c.crbegin(), end = c.crend(); it != end; ++it) ++ for (auto it = c.crbegin(), end = c.crend(); it != end; ++it) + { + sum += *it; + } +@@ -191,7 +191,7 @@ static void TestReplaceTypeWithAutoSet() + + sum = 0; + // #TEST#: RTWA19 Replace type with auto +- for (std::set::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + sum += *it; + } +@@ -199,7 +199,7 @@ static void TestReplaceTypeWithAutoSet() + + sum = 0; + // #TEST#: RTWA20 Replace type with auto +- for (std::set::reverse_iterator it = c.rbegin(), end = c.rend(); it != end; ++it) ++ for (auto it = c.rbegin(), end = c.rend(); it != end; ++it) + { + sum += *it; + } +@@ -213,7 +213,7 @@ static void TestReplaceTypeWithAutoUnorderedMap() + c[2] = 2; + int sum = 0; + // #TEST#: RTWA21 Replace type with auto +- for (std::unordered_map::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + sum += it->second; + } +@@ -223,7 +223,7 @@ static void TestReplaceTypeWithAutoUnorderedMap() + + sum = 0; + // #TEST#: RTWA23 Replace type with auto +- for (std::unordered_map::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + ++it->second; + sum += it->second; +@@ -240,7 +240,7 @@ static void TestReplaceTypeWithAutoUnorderedSet() + c.insert(2); + int sum = 0; + // #TEST#: RTWA25 Replace type with auto +- for (std::unordered_set::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + sum += *it; + } +@@ -250,7 +250,7 @@ static void TestReplaceTypeWithAutoUnorderedSet() + + sum = 0; + // #TEST#: RTWA27 Replace type with auto +- for (std::unordered_set::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + sum += *it; + } +@@ -266,7 +266,7 @@ static void TestReplaceTypeWithAutoVector() + c.push_back(2); + int sum = 0; + // #TEST#: RTWA29 Replace type with auto +- for (std::vector::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + sum += *it; + } +@@ -274,7 +274,7 @@ static void TestReplaceTypeWithAutoVector() + + sum = 0; + // #TEST#: RTWA30 Replace type with auto +- for (std::vector::const_reverse_iterator it = c.crbegin(), end = c.crend(); it != end; ++it) ++ for (auto it = c.crbegin(), end = c.crend(); it != end; ++it) + { + sum += *it; + } +@@ -282,7 +282,7 @@ static void TestReplaceTypeWithAutoVector() + + sum = 0; + // #TEST#: RTWA31 Replace type with auto +- for (std::vector::iterator it = c.begin(), end = c.end(); it != end; ++it) ++ for (auto it = c.begin(), end = c.end(); it != end; ++it) + { + ++*it; + sum += *it; +@@ -291,7 +291,7 @@ static void TestReplaceTypeWithAutoVector() + + sum = 0; + // #TEST#: RTWA32 Replace type with auto +- for (std::vector::reverse_iterator it = c.rbegin(), end = c.rend(); it != end; ++it) ++ for (auto it = c.rbegin(), end = c.rend(); it != end; ++it) + { + --*it; + sum += *it;