Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LegalizeAdulthood/refactor-test-s…
Browse files Browse the repository at this point in the history
…uite
  • Loading branch information
LegalizeAdulthood committed Jan 30, 2024
2 parents 8fef6a6 + a0e85c1 commit 45b0f50
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 4 deletions.
66 changes: 65 additions & 1 deletion results/diffs/R984.txt
Original file line number Diff line number Diff line change
@@ -1 +1,65 @@
AWAITING TEST RESULTS
diff --git a/RefactorTest/RenameCpp20.cpp b/RefactorTest/RenameCpp20.cpp
index 17be92f..41229ec 100644
--- a/RefactorTest/RenameCpp20.cpp
+++ b/RefactorTest/RenameCpp20.cpp
@@ -457,7 +457,7 @@ void f10()
}

// #TEST#: R984 Rename E
-enum class E
+enum class Goink
{
// #TEST#: R985 Rename One
One,
@@ -466,15 +466,15 @@ enum class E
Three
};

-std::ostream &operator<<(std::ostream &str, E value)
+std::ostream &operator<<(std::ostream &str, Goink value)
{
switch (value)
{
- case E::One:
+ case Goink::One:
return str << "One";
- case E::Two:
+ case Goink::Two:
return str << "Two";
- case E::Three:
+ case Goink::Three:
return str << "Three";
}
return str << "? (" << static_cast<int>(value) << ')';
@@ -485,25 +485,25 @@ void f11()
{
struct F11
{
- using enum E;
+ using enum Goink;
};

const auto &get_enumerator = [&]() -> auto
{
- using enum E;
+ using enum Goink;
// #TEST#: R987 Rename Three
return Three;
};

const auto &assert_enumerator = [&](const auto &enumerator) -> void
{
- using enum E;
+ using enum Goink;
REQUIRE_EQUAL(Three, enumerator);
};

F11 f11Ins{};
- REQUIRE_EQUAL(E::One, F11::One);
- REQUIRE_EQUAL(f11Ins.Two, E::Two);
+ REQUIRE_EQUAL(Goink::One, F11::One);
+ REQUIRE_EQUAL(f11Ins.Two, Goink::Two);
REQUIRE_EQUAL(F11::Three, get_enumerator());
assert_enumerator(get_enumerator());
}

33 changes: 32 additions & 1 deletion results/diffs/R985.txt
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
AWAITING TEST RESULTS
diff --git a/RefactorTest/RenameCpp20.cpp b/RefactorTest/RenameCpp20.cpp
index 17be92f..0b486b8 100644
--- a/RefactorTest/RenameCpp20.cpp
+++ b/RefactorTest/RenameCpp20.cpp
@@ -460,7 +460,7 @@ void f10()
enum class E
{
// #TEST#: R985 Rename One
- One,
+ Goink,
// #TEST#: R986 Rename Two
Two,
Three
@@ -470,7 +470,7 @@ std::ostream &operator<<(std::ostream &str, E value)
{
switch (value)
{
- case E::One:
+ case E::Goink:
return str << "One";
case E::Two:
return str << "Two";
@@ -502,7 +502,7 @@ void f11()
};

F11 f11Ins{};
- REQUIRE_EQUAL(E::One, F11::One);
+ REQUIRE_EQUAL(E::Goink, F11::Goink);
REQUIRE_EQUAL(f11Ins.Two, E::Two);
REQUIRE_EQUAL(F11::Three, get_enumerator());
assert_enumerator(get_enumerator());

33 changes: 32 additions & 1 deletion results/diffs/R986.txt
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
AWAITING TEST RESULTS
diff --git a/RefactorTest/RenameCpp20.cpp b/RefactorTest/RenameCpp20.cpp
index 17be92f..9ed350c 100644
--- a/RefactorTest/RenameCpp20.cpp
+++ b/RefactorTest/RenameCpp20.cpp
@@ -462,7 +462,7 @@ enum class E
// #TEST#: R985 Rename One
One,
// #TEST#: R986 Rename Two
- Two,
+ Goink,
Three
};

@@ -472,7 +472,7 @@ std::ostream &operator<<(std::ostream &str, E value)
{
case E::One:
return str << "One";
- case E::Two:
+ case E::Goink:
return str << "Two";
case E::Three:
return str << "Three";
@@ -503,7 +503,7 @@ void f11()

F11 f11Ins{};
REQUIRE_EQUAL(E::One, F11::One);
- REQUIRE_EQUAL(f11Ins.Two, E::Two);
+ REQUIRE_EQUAL(f11Ins.Goink, E::Goink);
REQUIRE_EQUAL(F11::Three, get_enumerator());
assert_enumerator(get_enumerator());
}

47 changes: 46 additions & 1 deletion results/diffs/R987.txt
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
AWAITING TEST RESULTS
diff --git a/RefactorTest/RenameCpp20.cpp b/RefactorTest/RenameCpp20.cpp
index 17be92f..d0a7f0c 100644
--- a/RefactorTest/RenameCpp20.cpp
+++ b/RefactorTest/RenameCpp20.cpp
@@ -463,7 +463,7 @@ enum class E
One,
// #TEST#: R986 Rename Two
Two,
- Three
+ Goink
};

std::ostream &operator<<(std::ostream &str, E value)
@@ -474,7 +474,7 @@ std::ostream &operator<<(std::ostream &str, E value)
return str << "One";
case E::Two:
return str << "Two";
- case E::Three:
+ case E::Goink:
return str << "Three";
}
return str << "? (" << static_cast<int>(value) << ')';
@@ -492,19 +492,19 @@ void f11()
{
using enum E;
// #TEST#: R987 Rename Three
- return Three;
+ return Goink;
};

const auto &assert_enumerator = [&](const auto &enumerator) -> void
{
using enum E;
- REQUIRE_EQUAL(Three, enumerator);
+ REQUIRE_EQUAL(Goink, enumerator);
};

F11 f11Ins{};
REQUIRE_EQUAL(E::One, F11::One);
REQUIRE_EQUAL(f11Ins.Two, E::Two);
- REQUIRE_EQUAL(F11::Three, get_enumerator());
+ REQUIRE_EQUAL(F11::Goink, get_enumerator());
assert_enumerator(get_enumerator());
}


0 comments on commit 45b0f50

Please sign in to comment.