diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-02-20 00:34:24 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-19 06:34:24 -0700 |
commit | 2b279ad630651e973d5a31586f58809f005bc925 (patch) | |
tree | 3e3cbeb4126643c75381dd5422e8603a7488bb8a /test_util/src/macros.rs | |
parent | eb542bc185c6c4ce1847417a2dfdf04862cd86db (diff) |
chore: move `test_util` to `tests/util/server` (#22444)
As discussed with @mmastrac.
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'test_util/src/macros.rs')
-rw-r--r-- | test_util/src/macros.rs | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/test_util/src/macros.rs b/test_util/src/macros.rs deleted file mode 100644 index 7cfedcc7e..000000000 --- a/test_util/src/macros.rs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. - -#[macro_export] -macro_rules! itest( -($name:ident {$( $key:ident: $value:expr,)*}) => { - #[test] - fn $name() { - let test = $crate::CheckOutputIntegrationTest { - $( - $key: $value, - )* - .. Default::default() - }; - let output = test.output(); - output.assert_exit_code(test.exit_code); - if !test.output.is_empty() { - assert!(test.output_str.is_none()); - output.assert_matches_file(test.output); - } else { - output.assert_matches_text(test.output_str.unwrap_or("")); - } - } -} -); - -#[macro_export] -macro_rules! itest_flaky( -($name:ident {$( $key:ident: $value:expr,)*}) => { - #[flaky_test::flaky_test] - fn $name() { - let test = $crate::CheckOutputIntegrationTest { - $( - $key: $value, - )* - .. Default::default() - }; - let output = test.output(); - output.assert_exit_code(test.exit_code); - if !test.output.is_empty() { - assert!(test.output_str.is_none()); - output.assert_matches_file(test.output); - } else { - output.assert_matches_text(test.output_str.unwrap_or("")); - } - } -} -); - -#[macro_export] -macro_rules! context( -({$( $key:ident: $value:expr,)*}) => { - $crate::TestContext::create($crate::TestContextOptions { - $( - $key: $value, - )* - .. Default::default() - }) -} -); - -#[macro_export] -macro_rules! itest_steps( -($name:ident {$( $key:ident: $value:expr,)*}) => { - #[test] - fn $name() { - ($crate::CheckOutputIntegrationTestSteps { - $( - $key: $value, - )* - .. Default::default() - }).run() - } -} -); - -#[macro_export] -macro_rules! command_step( -({$( $key:ident: $value:expr,)*}) => { - $crate::CheckOutputIntegrationTestCommandStep { - $( - $key: $value, - )* - .. Default::default() - } -} -); |