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

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

Issue 2470143004: [test] Speed up some slow tests. (Closed)
Patch Set: address comment Created 4 years, 1 month 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/test-api.cc ('k') | test/mjsunit/math-floor-part2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index dd0a101bbc044e947ba1de78c82ae64fae5ffdf7..5983bfcc14fb080ae26ceec64b2ccd9c58f91287 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -609,16 +609,11 @@ UNINITIALIZED_TEST(PartialSerializerCustomContext) {
v8_isolate->Dispose();
}
-TEST(CustomSnapshotDataBlob) {
+TEST(CustomSnapshotDataBlob1) {
DisableTurbofan();
const char* source1 = "function f() { return 42; }";
- const char* source2 =
- "function f() { return g() * 2; }"
- "function g() { return 43; }"
- "/./.test('a')";
v8::StartupData data1 = v8::V8::CreateSnapshotDataBlob(source1);
- v8::StartupData data2 = v8::V8::CreateSnapshotDataBlob(source2);
v8::Isolate::CreateParams params1;
params1.snapshot_blob = &data1;
@@ -637,6 +632,16 @@ TEST(CustomSnapshotDataBlob) {
CHECK(CompileRun("this.g")->IsUndefined());
}
isolate1->Dispose();
+}
+
+TEST(CustomSnapshotDataBlob2) {
+ DisableTurbofan();
+ const char* source2 =
+ "function f() { return g() * 2; }"
+ "function g() { return 43; }"
+ "/./.test('a')";
+
+ v8::StartupData data2 = v8::V8::CreateSnapshotDataBlob(source2);
v8::Isolate::CreateParams params2;
params2.snapshot_blob = &data2;
@@ -657,7 +662,6 @@ TEST(CustomSnapshotDataBlob) {
isolate2->Dispose();
}
-
static void SerializationFunctionTemplate(
const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(args[0]);
@@ -1070,9 +1074,9 @@ TEST(CodeSerializerLargeCodeObject) {
FLAG_always_opt = false;
Vector<const uint8_t> source =
- ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (!j) {"),
+ ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (j == 0) {"),
STATIC_CHAR_VECTOR("for (let i of Object.prototype);"),
- STATIC_CHAR_VECTOR("} j=7; j"), 2000);
+ STATIC_CHAR_VECTOR("} j=7; j"), 1000);
Handle<String> source_str =
isolate->factory()->NewStringFromOneByte(source).ToHandleChecked();
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/mjsunit/math-floor-part2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698