summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/js/40_test.js4
-rw-r--r--cli/tests/unit/ops_test.ts2
-rw-r--r--cli/tests/unit/text_encoding_test.ts28
-rw-r--r--cli/tools/test/mod.rs2
4 files changed, 6 insertions, 30 deletions
diff --git a/cli/js/40_test.js b/cli/js/40_test.js
index f18cccd98..b9735fc01 100644
--- a/cli/js/40_test.js
+++ b/cli/js/40_test.js
@@ -172,7 +172,7 @@ function assertOps(fn) {
opIdHostRecvCtrl,
);
}
- const preTraces = new Map(core.opCallTraces);
+ const preTraces = core.getAllOpCallTraces();
let postTraces;
let report = null;
@@ -195,7 +195,7 @@ function assertOps(fn) {
opIdHostRecvCtrl,
);
}
- postTraces = new Map(core.opCallTraces);
+ postTraces = core.getAllOpCallTraces();
if (res === 3) {
report = op_test_op_sanitizer_report(desc.id);
}
diff --git a/cli/tests/unit/ops_test.ts b/cli/tests/unit/ops_test.ts
index 1b7377dc5..ae225c78d 100644
--- a/cli/tests/unit/ops_test.ts
+++ b/cli/tests/unit/ops_test.ts
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-const EXPECTED_OP_COUNT = 49;
+const EXPECTED_OP_COUNT = 45;
Deno.test(function checkExposedOps() {
// @ts-ignore TS doesn't allow to index with symbol
diff --git a/cli/tests/unit/text_encoding_test.ts b/cli/tests/unit/text_encoding_test.ts
index 24dd35aa3..719e5907e 100644
--- a/cli/tests/unit/text_encoding_test.ts
+++ b/cli/tests/unit/text_encoding_test.ts
@@ -270,7 +270,7 @@ Deno.test(function textEncoderShouldCoerceToString() {
Deno.test(function binaryEncode() {
// @ts-ignore: Deno[Deno.internal].core allowed
- const ops = Deno[Deno.internal].core.ops;
+ const core = Deno[Deno.internal].core;
function asBinaryString(bytes: Uint8Array): string {
return Array.from(bytes).map(
(v: number) => String.fromCodePoint(v),
@@ -281,30 +281,6 @@ Deno.test(function binaryEncode() {
const chars: string[] = Array.from(binaryString);
return chars.map((v: string): number | undefined => v.codePointAt(0));
}
-
- // invalid utf-8 code points
- const invalid = new Uint8Array([0xC0]);
- assertEquals(
- ops.op_encode_binary_string(invalid),
- asBinaryString(invalid),
- );
-
- const invalid2 = new Uint8Array([0xC1]);
- assertEquals(
- ops.op_encode_binary_string(invalid2),
- asBinaryString(invalid2),
- );
-
- for (let i = 0, j = 255; i <= 255; i++, j--) {
- const bytes = new Uint8Array([i, j]);
- const binaryString = ops.op_encode_binary_string(bytes);
- assertEquals(
- binaryString,
- asBinaryString(bytes),
- );
- assertEquals(Array.from(bytes), decodeBinary(binaryString));
- }
-
const inputs = [
"σ😀",
"Кириллица is Cyrillic",
@@ -315,7 +291,7 @@ Deno.test(function binaryEncode() {
];
for (const input of inputs) {
const bytes = new TextEncoder().encode(input);
- const binaryString = ops.op_encode_binary_string(bytes);
+ const binaryString = core.encodeBinaryString(bytes);
assertEquals(
binaryString,
asBinaryString(bytes),
diff --git a/cli/tools/test/mod.rs b/cli/tools/test/mod.rs
index 3095e727d..332bfa8c8 100644
--- a/cli/tools/test/mod.rs
+++ b/cli/tools/test/mod.rs
@@ -496,7 +496,7 @@ async fn test_specifier_inner(
if options.trace_ops {
worker.execute_script_static(
located_script_name!(),
- "Deno[Deno.internal].core.enableOpCallTracing();",
+ "Deno[Deno.internal].core.setOpCallTracingEnabled(true);",
)?;
}