summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/tools
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2021-02-24 14:47:06 +0100
committerMichaël Zasso <targos@protonmail.com>2021-02-25 00:14:47 +0100
commitc5ff019a4e93891106859cb272ded1197a92c7e5 (patch)
treecaf6b7e50b0ceac09878ac4402d9f725b8685dd7 /deps/v8/test/mjsunit/tools
parent67dc2bf2084b125dec43689874d237d125562cdf (diff)
downloadnode-new-c5ff019a4e93891106859cb272ded1197a92c7e5.tar.gz
deps: update V8 to 8.9.255.19
PR-URL: https://github.com/nodejs/node/pull/37330 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'deps/v8/test/mjsunit/tools')
-rw-r--r--deps/v8/test/mjsunit/tools/dumpcpp.mjs12
-rw-r--r--deps/v8/test/mjsunit/tools/foozzie.js9
-rw-r--r--deps/v8/test/mjsunit/tools/timeline.mjs28
3 files changed, 42 insertions, 7 deletions
diff --git a/deps/v8/test/mjsunit/tools/dumpcpp.mjs b/deps/v8/test/mjsunit/tools/dumpcpp.mjs
index 596049c9ce..0ade52da24 100644
--- a/deps/v8/test/mjsunit/tools/dumpcpp.mjs
+++ b/deps/v8/test/mjsunit/tools/dumpcpp.mjs
@@ -31,19 +31,25 @@ import {
[288,{size:1,
name:'v8::internal::Runtime_DebugGetPropertyDetails(v8::internal::Arguments)',
type:'CPP',
- nameUpdated_:false}
+ nameUpdated_:false,
+ source: undefined,
+ }
]);
assertEquals(staticEntries[1],
[272,{size:1,
name:'v8::internal::Runtime::GetElementOrCharAt(v8::internal::Handle<v8::internal::Object>, unsigned int)',
type:'CPP',
- nameUpdated_:false}
+ nameUpdated_:false,
+ source: undefined,
+ }
]);
assertEquals(staticEntries[2],
[256,{size:1,
name:'v8::internal::Runtime_StringReplaceRegExpWithString(v8::internal::Arguments)',
type:'CPP',
- nameUpdated_:false}
+ nameUpdated_:false,
+ source: undefined,
+ }
]);
UnixCppEntriesProvider.prototype.loadSymbols = oldLoadSymbols;
diff --git a/deps/v8/test/mjsunit/tools/foozzie.js b/deps/v8/test/mjsunit/tools/foozzie.js
index d5298593f5..147f637060 100644
--- a/deps/v8/test/mjsunit/tools/foozzie.js
+++ b/deps/v8/test/mjsunit/tools/foozzie.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax
+// Flags: --allow-natives-syntax --correctness-fuzzer-suppressions
// Files: tools/clusterfuzz/v8_mock.js
// Test foozzie mocks for differential fuzzing.
@@ -22,6 +22,13 @@ assertEquals(710, new Date.prototype.constructor().getUTCMilliseconds());
assertEquals(819134640000,
new Date('December 17, 1995 03:24:00 GMT+1000').getTime());
+// Deterministic DateTimeFormat.
+if (this.Intl) {
+ const df = new Intl.DateTimeFormat(undefined, {fractionalSecondDigits: 3});
+ assertEquals('004', df.format());
+ assertEquals('004', df.formatToParts()[0].value);
+}
+
// Dummy performance methods.
assertEquals(1.2, performance.now());
assertEquals([], performance.measureMemory());
diff --git a/deps/v8/test/mjsunit/tools/timeline.mjs b/deps/v8/test/mjsunit/tools/timeline.mjs
index 5d3eca92d6..87313b87a7 100644
--- a/deps/v8/test/mjsunit/tools/timeline.mjs
+++ b/deps/v8/test/mjsunit/tools/timeline.mjs
@@ -8,23 +8,45 @@ import { LogEntry} from "../../../tools/system-analyzer/log/log.mjs";
(function testTimeline() {
let timeline = new Timeline();
+
let id1 = "0x3e7e082470cd";
let id2 = "0x3e7e082470ad";
- let time = 12;
- let entry1 = new LogEntry(id1, time);
+ let time = 10;
+
+ let entry1 = new LogEntry(id1, time + 0);
let entry2 = new LogEntry(id1, time + 1);
let entry3 = new LogEntry(id1, time + 2);
let entry4 = new LogEntry(id1, time + 3);
let entry5 = new LogEntry(id2, time + 3);
+ let entry6 = new LogEntry(id1, time + 4);
+
timeline.push(entry1);
timeline.push(entry2);
timeline.push(entry3);
timeline.push(entry4);
timeline.push(entry5);
+ timeline.push(entry6);
+
+ assertEquals(timeline.find(time + 0), 0);
+ assertEquals(timeline.find(time + 1), 1);
+ assertEquals(timeline.find(time + 2), 2);
+ assertEquals(timeline.find(time + 3), 3);
+ assertEquals(timeline.find(time + 4), 5);
+ assertEquals(timeline.find(time + 5), 5);
+
+ assertEquals(timeline.find(time + 2.00), 2);
+ assertEquals(timeline.find(time + 2.01), 3);
+ assertEquals(timeline.find(time + 2.90), 3);
+ assertEquals(timeline.find(time + 3.01), 5);
+ assertEquals(timeline.find(time + 3.90), 5);
+ assertEquals(timeline.find(time + 4.00), 5);
+
let startTime = time;
let endTime = time + 2;
timeline.selectTimeRange(startTime, endTime);
- assertArrayEquals(timeline.selection, [entry1, entry2, entry3]);
+ assertArrayEquals(timeline.selection.startTime, startTime);
+ assertArrayEquals(timeline.selection.endTime, endTime);
+ assertArrayEquals(timeline.selection.values, [entry1, entry2]);
let entryIdx = timeline.find(time + 1);
let entry = timeline.at(entryIdx);
assertEquals(entry.time, time + 1);