From 8af12ebb9d9a00877f1cf618014aa4d6ae088d67 Mon Sep 17 00:00:00 2001 From: Florian Bartels Date: Mon, 7 Nov 2022 09:55:19 +0100 Subject: [PATCH] Add test for impl of `available_parallelism()` --- src/test/ui/thread-available_parallelism.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/ui/thread-available_parallelism.rs diff --git a/src/test/ui/thread-available_parallelism.rs b/src/test/ui/thread-available_parallelism.rs new file mode 100644 index 0000000000000..0633bb4afe18c --- /dev/null +++ b/src/test/ui/thread-available_parallelism.rs @@ -0,0 +1,12 @@ +// run-pass +// this is an ignore list on purpose so that new platforms don't miss it: +//ignore-vxworks +//ignore-redox +//ignore-l4re + +// check that std::thread::available_parallelism returns a valid value + +fn main() { + std::thread::available_parallelism().expect( + "should return a value on all platforms that are not ignored"); +}