-
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 integration test for add-test-alias
- Loading branch information
1 parent
85b03b6
commit a2da4fa
Showing
19 changed files
with
417 additions
and
0 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
22 changes: 22 additions & 0 deletions
22
Tools/Tests/add-test-alias/Expected/Results/CLionResults.md
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,22 @@ | ||
# CLion | ||
|
||
## Add Block Delimiter | ||
Case | Result | ||
---- | ------ | ||
ABD1 | Pass | ||
ABD2 | Pass | ||
ABD3 | Pass | ||
ABD4 | Pass | ||
ABD5 | Pass | ||
ABD6 | Pass | ||
ABD7 | Pass | ||
|
||
## Rename | ||
Case | Result | ||
---- | ------ | ||
R1 | Pass | ||
R2 | Pass | ||
R3 | Pass | ||
R4 | Pass | ||
R5 | Failure (selects unrelated names) [1938](https://youtrack.jetbrains.com/issue/CPP-1938) | ||
R6 | Failure (selects unrelated names) [1938](https://youtrack.jetbrains.com/issue/CPP-1938) |
22 changes: 22 additions & 0 deletions
22
Tools/Tests/add-test-alias/Expected/Results/ReSharperCppResults.md
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,22 @@ | ||
# ReSharper for C++ | ||
|
||
## Add Block Delimiter | ||
Case | Result | ||
---- | ------ | ||
ABD1 | Pass | ||
ABD2 | Pass | ||
ABD3 | Pass | ||
ABD4 | Pass | ||
ABD5 | Pass | ||
ABD6 | Pass | ||
ABD7 | Pass | ||
|
||
## Rename | ||
Case | Result | ||
---- | ------ | ||
R1 | Pass | ||
R2 | Failure (unavailable) [RSCPP-15796](https://youtrack.jetbrains.com/issue/RSCPP-15796) | ||
R3 | Failure (unavailable) [RSCPP-15796](https://youtrack.jetbrains.com/issue/RSCPP-15796) | ||
R4 | Pass | ||
R5 | Pass | ||
R6 | Pass |
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,13 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..dd356e8 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -10,7 +10,7 @@ | ||
// updates all references to the modified element. | ||
|
||
// #TEST#: R1 Rename this macro | ||
-#define MACRO_NO_ARGS 3.14159f | ||
+#define GOINK 3.14159f | ||
|
||
// #TEST#: R2 Rename the macro argument x_ from declaration | ||
// #TEST#: R3 =R2 Rename the macro argument x_ from usage |
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,13 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..3e43246 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -15,7 +15,7 @@ | ||
// #TEST#: R2 Rename the macro argument x_ from declaration | ||
// #TEST#: R3 =R2 Rename the macro argument x_ from usage | ||
// #TEST#: R4 Rename this macro | ||
-#define MACRO_ONE_ARG(x_) (2.0f * x_) | ||
+#define MACRO_ONE_ARG(goink_) (2.0f * goink_) | ||
|
||
class Operations | ||
{ |
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,13 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..3e43246 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -15,7 +15,7 @@ | ||
// #TEST#: R2 Rename the macro argument x_ from declaration | ||
// #TEST#: R3 =R2 Rename the macro argument x_ from usage | ||
// #TEST#: R4 Rename this macro | ||
-#define MACRO_ONE_ARG(x_) (2.0f * x_) | ||
+#define MACRO_ONE_ARG(goink_) (2.0f * goink_) | ||
|
||
class Operations | ||
{ |
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,13 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..8628cb4 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -15,7 +15,7 @@ | ||
// #TEST#: R2 Rename the macro argument x_ from declaration | ||
// #TEST#: R3 =R2 Rename the macro argument x_ from usage | ||
// #TEST#: R4 Rename this macro | ||
-#define MACRO_ONE_ARG(x_) (2.0f * x_) | ||
+#define GOINK(x_) (2.0f * x_) | ||
|
||
class Operations | ||
{ |
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,27 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..a756ebe 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -31,22 +31,22 @@ public: | ||
}; | ||
|
||
// #TEST#: R5 Rename this class, but class in Rename2.cpp shouldn't be renamed | ||
-class Rename1 | ||
+class Goink | ||
{ | ||
public: | ||
// #TEST#: R6 Rename this class via its c'tor | ||
- Rename1() : x() | ||
+ Goink() : x() | ||
{ | ||
} | ||
|
||
- ~Rename1() | ||
+ ~Goink() | ||
{ | ||
} | ||
|
||
- typedef Rename1 MyClass; | ||
+ typedef Goink MyClass; | ||
|
||
void Operation() |
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,27 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..a756ebe 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -31,22 +31,22 @@ public: | ||
}; | ||
|
||
// #TEST#: R5 Rename this class, but class in Rename2.cpp shouldn't be renamed | ||
-class Rename1 | ||
+class Goink | ||
{ | ||
public: | ||
// #TEST#: R6 Rename this class via its c'tor | ||
- Rename1() : x() | ||
+ Goink() : x() | ||
{ | ||
} | ||
|
||
- ~Rename1() | ||
+ ~Goink() | ||
{ | ||
} | ||
|
||
- typedef Rename1 MyClass; | ||
+ typedef Goink MyClass; | ||
|
||
void Operation() |
53 changes: 53 additions & 0 deletions
53
Tools/Tests/add-test-alias/Expected/Sources/TestRename.cpp
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,53 @@ | ||
#include "Rename.h" | ||
|
||
#include "Require.h" | ||
|
||
#include <stdexcept> | ||
#include <string> | ||
|
||
// Renames a local variable, function, method, field, property, parameter, | ||
// type, namespace, active CSS style, C++ global variable or C++ macro and | ||
// updates all references to the modified element. | ||
|
||
// #TEST#: R1 Rename this macro | ||
#define MACRO_NO_ARGS 3.14159f | ||
|
||
// #TEST#: R2 Rename the macro argument x_ from declaration | ||
// #TEST#: R3 =R2 Rename the macro argument x_ from usage | ||
// #TEST#: R4 Rename this macro | ||
#define MACRO_ONE_ARG(x_) (2.0f * x_) | ||
|
||
class Operations | ||
{ | ||
public: | ||
int Operation1() | ||
{ | ||
return 1; | ||
} | ||
int Operation2() | ||
{ | ||
return 2; | ||
} | ||
}; | ||
|
||
// #TEST#: R5 Rename this class, but class in Rename2.cpp shouldn't be renamed | ||
class Rename1 | ||
{ | ||
public: | ||
// #TEST#: R6 Rename this class via its c'tor | ||
Rename1() : x() | ||
{ | ||
} | ||
|
||
~Rename1() | ||
{ | ||
} | ||
|
||
typedef Rename1 MyClass; | ||
|
||
void Operation() | ||
{ | ||
} | ||
|
||
int x; | ||
}; |
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,22 @@ | ||
# CLion | ||
|
||
## Add Block Delimiter | ||
Case | Result | ||
---- | ------ | ||
ABD1 | Pass | ||
ABD2 | Pass | ||
ABD3 | Pass | ||
ABD4 | Pass | ||
ABD5 | Pass | ||
ABD6 | Pass | ||
ABD7 | Pass | ||
|
||
## Rename | ||
Case | Result | ||
---- | ------ | ||
R1 | Pass | ||
R2 | Pass | ||
R3 | Pass | ||
R4 | Pass | ||
R5 | Failure (selects unrelated names) [1938](https://youtrack.jetbrains.com/issue/CPP-1938) | ||
R6 | Failure (selects unrelated names) [1938](https://youtrack.jetbrains.com/issue/CPP-1938) |
22 changes: 22 additions & 0 deletions
22
Tools/Tests/add-test-alias/Inputs/Results/ReSharperCppResults.md
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,22 @@ | ||
# ReSharper for C++ | ||
|
||
## Add Block Delimiter | ||
Case | Result | ||
---- | ------ | ||
ABD1 | Pass | ||
ABD2 | Pass | ||
ABD3 | Pass | ||
ABD4 | Pass | ||
ABD5 | Pass | ||
ABD6 | Pass | ||
ABD7 | Pass | ||
|
||
## Rename | ||
Case | Result | ||
---- | ------ | ||
R1 | Pass | ||
R2 | Failure (unavailable) [RSCPP-15796](https://youtrack.jetbrains.com/issue/RSCPP-15796) | ||
R3 | Failure (unavailable) [RSCPP-15796](https://youtrack.jetbrains.com/issue/RSCPP-15796) | ||
R4 | Pass | ||
R5 | Pass | ||
R6 | Pass |
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,13 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..dd356e8 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -10,7 +10,7 @@ | ||
// updates all references to the modified element. | ||
|
||
// #TEST#: R1 Rename this macro | ||
-#define MACRO_NO_ARGS 3.14159f | ||
+#define GOINK 3.14159f | ||
|
||
// #TEST#: R2 Rename the macro argument x_ from declaration | ||
// #TEST#: R3 Rename the macro argument x_ from usage |
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,13 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..3e43246 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -15,7 +15,7 @@ | ||
// #TEST#: R2 Rename the macro argument x_ from declaration | ||
// #TEST#: R3 Rename the macro argument x_ from usage | ||
// #TEST#: R4 Rename this macro | ||
-#define MACRO_ONE_ARG(x_) (2.0f * x_) | ||
+#define MACRO_ONE_ARG(goink_) (2.0f * goink_) | ||
|
||
class Operations | ||
{ |
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,13 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..3e43246 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -15,7 +15,7 @@ | ||
// #TEST#: R2 Rename the macro argument x_ from declaration | ||
// #TEST#: R3 Rename the macro argument x_ from usage | ||
// #TEST#: R4 Rename this macro | ||
-#define MACRO_ONE_ARG(x_) (2.0f * x_) | ||
+#define MACRO_ONE_ARG(goink_) (2.0f * goink_) | ||
|
||
class Operations | ||
{ |
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,13 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..8628cb4 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -15,7 +15,7 @@ | ||
// #TEST#: R2 Rename the macro argument x_ from declaration | ||
// #TEST#: R3 Rename the macro argument x_ from usage | ||
// #TEST#: R4 Rename this macro | ||
-#define MACRO_ONE_ARG(x_) (2.0f * x_) | ||
+#define GOINK(x_) (2.0f * x_) | ||
|
||
class Operations | ||
{ |
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,27 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..a756ebe 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -31,22 +31,22 @@ public: | ||
}; | ||
|
||
// #TEST#: R5 Rename this class, but class in Rename2.cpp shouldn't be renamed | ||
-class Rename1 | ||
+class Goink | ||
{ | ||
public: | ||
// #TEST#: R6 Rename this class via its c'tor | ||
- Rename1() : x() | ||
+ Goink() : x() | ||
{ | ||
} | ||
|
||
- ~Rename1() | ||
+ ~Goink() | ||
{ | ||
} | ||
|
||
- typedef Rename1 MyClass; | ||
+ typedef Goink MyClass; | ||
|
||
void Operation() |
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,27 @@ | ||
diff --git a/Sources/TestRename.cpp b/Sources/TestRename.cpp | ||
index d1c1283..a756ebe 100644 | ||
--- a/Sources/TestRename.cpp | ||
+++ b/Sources/TestRename.cpp | ||
@@ -31,22 +31,22 @@ public: | ||
}; | ||
|
||
// #TEST#: R5 Rename this class, but class in Rename2.cpp shouldn't be renamed | ||
-class Rename1 | ||
+class Goink | ||
{ | ||
public: | ||
// #TEST#: R6 Rename this class via its c'tor | ||
- Rename1() : x() | ||
+ Goink() : x() | ||
{ | ||
} | ||
|
||
- ~Rename1() | ||
+ ~Goink() | ||
{ | ||
} | ||
|
||
- typedef Rename1 MyClass; | ||
+ typedef Goink MyClass; | ||
|
||
void Operation() |
Oops, something went wrong.