Skip to content

Commit

Permalink
Add Replace Type With Auto test file diff
Browse files Browse the repository at this point in the history
  • Loading branch information
LegalizeAdulthood committed Jan 10, 2024
1 parent f78dc14 commit b0aabe4
Showing 1 changed file with 256 additions and 0 deletions.
256 changes: 256 additions & 0 deletions results/file-diffs/RTWA.txt
Original file line number Diff line number Diff line change
@@ -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<int>::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<int>::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<int>::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<int>::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<int>::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<int>::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<int>::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<int>::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<int, int>::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<int, int>::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<int, int>::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<int, int>::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<int, int>::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<int, int>::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<int, int>::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<int, int>::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<int>::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<int>::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<int>::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<int>::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<int, int>::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<int, int>::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<int>::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<int>::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<int>::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<int>::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<int>::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<int>::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;

0 comments on commit b0aabe4

Please sign in to comment.