Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: tools/clang/rewrite_to_chrome_style/tests/methods-original.cc

Issue 2627003003: Add --idl-methods <filepath> parameter for skipping renaming of IDL methods. (Closed)
Patch Set: Addressed remaining CR feedback from dcheng@. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
index 2c9e4ceed5b03055933f5cafbbb34346d47218fc..b340f409191218006f35f80e9e83082cc8172671 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/methods-original.cc
@@ -306,6 +306,42 @@ class InternalClass {
} // namespace internal
+// Tests for --idl-methods. See also
+// MethodsNamedAfterIdlMatcherState::SetupBlacklistForTesting method.
+class IdlTestClass {
+ public:
+ static int idlTestMethodNoParams(char x) { return 123; }
+ static int idlTestMethodOneParam(char x) { return 123; }
+
+ int idlTestMethodNoParams() { return 123; }
+ int idlTestMethodNoParams(int x) { return 123; }
+
+ int idlTestMethodOneParam() { return 123; }
+ int idlTestMethodOneParam(int x) { return 123; }
+
+ int idlTestMethodTwoOrThreeParams() { return 123; }
+ int idlTestMethodTwoOrThreeParams(int x, int y) { return 123; }
+ int idlTestMethodTwoOrThreeParams(int x, int y, int z) { return 123; }
+
+ int idlOptionalArgsPass(int x = 0) { return x; }
+ int idlOptionalArgsStillTooMany(int x, int y = 0) { return x + y; }
+ int idlOptionalArgsTooLittle(int x = 0) { return x; }
+
+ template <typename T>
+ int idlTemplateMethod(T x) {
+ return 123;
+ }
+
+ int path() { return 123; }
+ int path(int x) { return 123; }
+};
+
+template <typename T>
+class IdlTemplateClass {
+ public:
+ int idlTestMethod(T x) { return 123; }
+};
+
} // namespace blink
// https://crbug.com/640688 - need to rewrite method name below.
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/methods-expected.cc ('k') | tools/clang/rewrite_to_chrome_style/tests/run_tool.args » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698