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

Unified Diff: test/cctest/test-strings.cc

Issue 2758563002: [gn] Enable stricter build flags (Closed)
Patch Set: Address comment Created 3 years, 9 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 | « test/cctest/interpreter/test-interpreter.cc ('k') | test/inspector/inspector-test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-strings.cc
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc
index e4df339d8b62e92852c4d80ddbce530dd62cf656..2494df3c52136ca1b0dbc48c5fc1c4f649fa36f4 100644
--- a/test/cctest/test-strings.cc
+++ b/test/cctest/test-strings.cc
@@ -1114,16 +1114,9 @@ TEST(CachedHashOverflow) {
v8::HandleScope handle_scope(CcTest::isolate());
// Lines must be executed sequentially. Combining them into one script
// makes the bug go away.
- const char* lines[] = {
- "var x = [];",
- "x[4] = 42;",
- "var s = \"1073741828\";",
- "x[s];",
- "x[s] = 37;",
- "x[4];",
- "x[s];",
- NULL
- };
+ const char* lines[] = {"var x = [];", "x[4] = 42;", "var s = \"1073741828\";",
+ "x[s];", "x[s] = 37;", "x[4];",
+ "x[s];"};
Handle<Smi> fortytwo(Smi::FromInt(42), isolate);
Handle<Smi> thirtyseven(Smi::FromInt(37), isolate);
@@ -1136,9 +1129,9 @@ TEST(CachedHashOverflow) {
thirtyseven // Bug yielded 42 here.
};
- const char* line;
v8::Local<v8::Context> context = CcTest::isolate()->GetCurrentContext();
- for (int i = 0; (line = lines[i]); i++) {
+ for (size_t i = 0; i < arraysize(lines); i++) {
+ const char* line = lines[i];
printf("%s\n", line);
v8::Local<v8::Value> result =
v8::Script::Compile(context,
« no previous file with comments | « test/cctest/interpreter/test-interpreter.cc ('k') | test/inspector/inspector-test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698