diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/test/ui/custom_test_frameworks/dynamic.rs | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/custom_test_frameworks/dynamic.rs')
-rw-r--r-- | src/test/ui/custom_test_frameworks/dynamic.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/test/ui/custom_test_frameworks/dynamic.rs b/src/test/ui/custom_test_frameworks/dynamic.rs deleted file mode 100644 index 6766ec542..000000000 --- a/src/test/ui/custom_test_frameworks/dynamic.rs +++ /dev/null @@ -1,35 +0,0 @@ -// run-pass -// aux-build:dynamic_runner.rs -// compile-flags:--test -#![feature(custom_test_frameworks)] -#![test_runner(dynamic_runner::runner)] - -extern crate dynamic_runner; - -pub struct AllFoo(&'static str); -struct IsFoo(String); - -impl dynamic_runner::Testable for AllFoo { - fn name(&self) -> String { - String::from(self.0) - } - - fn subtests(&self) -> Vec<Box<dyn dynamic_runner::Testable>> { - self.0.split(" ").map(|word| - Box::new(IsFoo(word.into())) as Box<dyn dynamic_runner::Testable> - ).collect() - } -} - -impl dynamic_runner::Testable for IsFoo { - fn name(&self) -> String { - self.0.clone() - } - - fn run(&self) -> bool { - self.0 == "foo" - } -} - -#[test_case] -const TEST_2: AllFoo = AllFoo("foo foo"); |