diff options
Diffstat (limited to 'ops/tests')
-rw-r--r-- | ops/tests/01_fast_callback_options.rs | 11 | ||||
-rw-r--r-- | ops/tests/compile_fail/unsupported.rs | 29 | ||||
-rw-r--r-- | ops/tests/compile_fail/unsupported.stderr | 22 | ||||
-rw-r--r-- | ops/tests/mod.rs | 6 |
4 files changed, 0 insertions, 68 deletions
diff --git a/ops/tests/01_fast_callback_options.rs b/ops/tests/01_fast_callback_options.rs deleted file mode 100644 index 815d9262c..000000000 --- a/ops/tests/01_fast_callback_options.rs +++ /dev/null @@ -1,11 +0,0 @@ -use deno_core::v8::fast_api::FastApiCallbackOptions; -use deno_ops::op; - -#[op(fast)] -fn op_fallback(options: Option<&mut FastApiCallbackOptions>) { - if let Some(options) = options { - options.fallback = true; - } -} - -fn main() {} diff --git a/ops/tests/compile_fail/unsupported.rs b/ops/tests/compile_fail/unsupported.rs deleted file mode 100644 index 5856d72ef..000000000 --- a/ops/tests/compile_fail/unsupported.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2019-2020 the Deno authors. All rights reserved. MIT license. - -use deno_ops::op; - -#[op(fast)] -fn op_u8_arg(a: u8, b: u8) { - // -} - -#[op(fast)] -fn op_u16_arg(a: u16, b: u16) { - // -} - -use deno_core::v8::fast_api::FastApiCallbackOptions; - -#[op(fast)] -fn op_callback_options(options: &mut FastApiCallbackOptions) { - // fast callback options must be an Option. -} - -#[op(fast)] -async fn op_async_fn(a: i32, b: i32) -> i32 { - a + b -} - -fn main() { - // pass -} diff --git a/ops/tests/compile_fail/unsupported.stderr b/ops/tests/compile_fail/unsupported.stderr deleted file mode 100644 index 85f745963..000000000 --- a/ops/tests/compile_fail/unsupported.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error[E0277]: the trait bound `&mut FastApiCallbackOptions<'_>: Deserialize<'_>` is not satisfied - --> tests/compile_fail/unsupported.rs:17:1 - | -17 | #[op(fast)] - | ^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `&mut FastApiCallbackOptions<'_>` - | - = help: the following other types implement trait `Deserialize<'de>`: - &'a Path - &'a [u8] - &'a str - () - (T0, T1) - (T0, T1, T2) - (T0, T1, T2, T3) - (T0, T1, T2, T3, T4) - and 143 others -note: required by a bound in `from_v8` - --> $WORKSPACE/serde_v8/de.rs - | - | T: Deserialize<'de>, - | ^^^^^^^^^^^^^^^^ required by this bound in `from_v8` - = note: this error originates in the attribute macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/ops/tests/mod.rs b/ops/tests/mod.rs deleted file mode 100644 index 699bcf9f4..000000000 --- a/ops/tests/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -#[test] -fn op_macro() { - let t = trybuild::TestCases::new(); - t.compile_fail("tests/compile_fail/*.rs"); - t.pass("tests/01_fast_callback_options.rs"); -} |