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

Side by Side Diff: test/cctest/test-strings.cc

Issue 2059173002: Reland of place all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 for (int i = 0; (line = lines[i]); i++) { 1103 for (int i = 0; (line = lines[i]); i++) {
1104 printf("%s\n", line); 1104 printf("%s\n", line);
1105 v8::Local<v8::Value> result = 1105 v8::Local<v8::Value> result =
1106 v8::Script::Compile(context, 1106 v8::Script::Compile(context,
1107 v8::String::NewFromUtf8(CcTest::isolate(), line, 1107 v8::String::NewFromUtf8(CcTest::isolate(), line,
1108 v8::NewStringType::kNormal) 1108 v8::NewStringType::kNormal)
1109 .ToLocalChecked()) 1109 .ToLocalChecked())
1110 .ToLocalChecked() 1110 .ToLocalChecked()
1111 ->Run(context) 1111 ->Run(context)
1112 .ToLocalChecked(); 1112 .ToLocalChecked();
1113 CHECK_EQ(results[i]->IsUndefined(), result->IsUndefined()); 1113 CHECK_EQ(results[i]->IsUndefined(CcTest::i_isolate()),
1114 result->IsUndefined());
1114 CHECK_EQ(results[i]->IsNumber(), result->IsNumber()); 1115 CHECK_EQ(results[i]->IsNumber(), result->IsNumber());
1115 if (result->IsNumber()) { 1116 if (result->IsNumber()) {
1116 int32_t value = 0; 1117 int32_t value = 0;
1117 CHECK(results[i]->ToInt32(&value)); 1118 CHECK(results[i]->ToInt32(&value));
1118 CHECK_EQ(value, result->ToInt32(context).ToLocalChecked()->Value()); 1119 CHECK_EQ(value, result->ToInt32(context).ToLocalChecked()->Value());
1119 } 1120 }
1120 } 1121 }
1121 } 1122 }
1122 1123
1123 1124
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 } 1524 }
1524 { 1525 {
1525 HandleScope scope(isolate); 1526 HandleScope scope(isolate);
1526 v8::Local<v8::Value> result = CompileRun( 1527 v8::Local<v8::Value> result = CompileRun(
1527 "String.fromCharCode(432, 432, 432, 432, 432, " 1528 "String.fromCharCode(432, 432, 432, 432, 432, "
1528 "432, 432, 432, 432, 432, 432, 432, 432, 432, " 1529 "432, 432, 432, 432, 432, 432, 432, 432, 432, "
1529 "432, 432, 432, 432, 432, 432, 432, 432, 432)"); 1530 "432, 432, 432, 432, 432, 432, 432, 432, 432)");
1530 CHECK(v8::Utils::OpenHandle(*result)->IsSeqTwoByteString()); 1531 CHECK(v8::Utils::OpenHandle(*result)->IsSeqTwoByteString());
1531 } 1532 }
1532 } 1533 }
OLDNEW
« no previous file with comments | « test/cctest/test-field-type-tracking.cc ('k') | test/unittests/compiler/instruction-selector-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698