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

Unified Diff: test/cctest/compiler/function-tester.h

Issue 1711513003: Fix FunctionTester constructor from given parameter count. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/function-tester.h
diff --git a/test/cctest/compiler/function-tester.h b/test/cctest/compiler/function-tester.h
index b48b4d298adce13fbac90732374b13dd19ed8c57..c6093ce6e4976c73e7cf8774441a133d2f588d62 100644
--- a/test/cctest/compiler/function-tester.h
+++ b/test/cctest/compiler/function-tester.h
@@ -206,11 +206,10 @@ class FunctionTester : public InitializedHandleScope {
std::string BuildFunction(int param_count) {
std::string function_string = "(function(";
if (param_count > 0) {
- char next = 'a';
- function_string += next;
- while (param_count-- > 0) {
+ function_string += 'a';
+ for (int i = 1; i < param_count; i++) {
function_string += ',';
- function_string += ++next;
+ function_string += static_cast<char>('a' + i);
}
}
function_string += "){})";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698