-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dynamic polymorphism Add Parameter tests
- Loading branch information
1 parent
0770422
commit 35046a6
Showing
26 changed files
with
1,719 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
diff --git a/RefactorTest/AddParameter.cpp b/RefactorTest/AddParameter.cpp | ||
index 2214789..a1f94f6 100644 | ||
--- a/RefactorTest/AddParameter.cpp | ||
+++ b/RefactorTest/AddParameter.cpp | ||
@@ -261,7 +261,7 @@ public: | ||
} | ||
|
||
// #TEST#: AP150 Add parameter, int goink | ||
- virtual int fn() = 0; | ||
+ virtual int fn(int goink) = 0; | ||
|
||
// #TEST#: AP151 Add parameter, int goink | ||
virtual int fn2(int x) = 0; | ||
@@ -273,7 +273,7 @@ public: | ||
~Derived() override = default; | ||
|
||
// #TEST#: AP152 Add parameter, int goink | ||
- int fn() override; | ||
+ int fn(int goink) override; | ||
|
||
// #TEST#: AP153 Add parameter, int goink | ||
int fn2(int x) override; | ||
@@ -285,7 +285,7 @@ public: | ||
~OtherDerived() override = default; | ||
|
||
// #TEST#: AP154 Add parameter, int goink | ||
- int fn() override | ||
+ int fn(int goink) override | ||
{ | ||
return 3; | ||
} | ||
@@ -303,14 +303,14 @@ public: | ||
~MoreDerived() override = default; | ||
|
||
// #TEST#: AP156 Add parameter, int goink | ||
- int fn() override; | ||
+ int fn(int goink) override; | ||
|
||
// #TEST#: AP157 Add parameter, int goink | ||
int fn2(int x) override; | ||
}; | ||
|
||
// #TEST#: AP158 Add parameter, int goink | ||
-int Derived::fn() | ||
+int Derived::fn(int goink) | ||
{ | ||
return 1; | ||
} | ||
@@ -322,7 +322,7 @@ int Derived::fn2(int x) | ||
} | ||
|
||
// #TEST#: AP160 Add parameter, int goink | ||
-int MoreDerived::fn() | ||
+int MoreDerived::fn(int goink) | ||
{ | ||
return 2; | ||
} | ||
@@ -338,19 +338,19 @@ void f1() | ||
{ | ||
Derived d; | ||
// #TEST#: AP163 Add parameter, int goink | ||
- REQUIRE_EQUAL(1, d.fn()); | ||
+ REQUIRE_EQUAL(1, d.fn(0)); | ||
// #TEST#: AP164 Add parameter, int goink | ||
REQUIRE_EQUAL(2, d.fn2(2)); | ||
|
||
MoreDerived md; | ||
// #TEST#: AP165 Add parameter, int goink | ||
- REQUIRE_EQUAL(2, md.fn()); | ||
+ REQUIRE_EQUAL(2, md.fn(0)); | ||
// #TEST#: AP166 Add parameter, int goink | ||
REQUIRE_EQUAL(3, md.fn2(2)); | ||
|
||
OtherDerived od; | ||
// #TEST#: AP167 Add parameter, int goink | ||
- REQUIRE_EQUAL(3, od.fn()); | ||
+ REQUIRE_EQUAL(3, od.fn(0)); | ||
// #TEST#: AP168 Add parameter, int goink | ||
REQUIRE_EQUAL(4, od.fn2(2)); | ||
} |
Oops, something went wrong.