Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Feb 2, 2024
1 parent 8c1f108 commit e9e5c6e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/swc_ecma_transforms_testing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,19 +478,25 @@ test_inline!(
ignore,
Syntax::default(),
|_| noop(),
noop_ignored,
test_inline_ignored,
"class Foo {}",
"class Foo {}"
);

test_inline!(
Syntax::default(),
|_| noop(),
noop_test,
test_inline_pass,
"class Foo {}",
"class Foo {}"
);

#[test]
#[should_panic]
fn test_inline_should_fail() {
test_inline_input_output(Default::default(), |_| noop(), "class Foo {}", "");
}

#[macro_export]
macro_rules! test {
(ignore, $syntax:expr, $tr:expr, $test_name:ident, $input:expr) => {
Expand Down

0 comments on commit e9e5c6e

Please sign in to comment.