From b448f187e116e2d17b70ce9864414445427cfcb0 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 10 May 2024 11:31:31 -0400 Subject: [PATCH] docs: document `TestScope` APIs --- moz-webgpu-cts/src/shared.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/moz-webgpu-cts/src/shared.rs b/moz-webgpu-cts/src/shared.rs index da1bca2..3569ca1 100644 --- a/moz-webgpu-cts/src/shared.rs +++ b/moz-webgpu-cts/src/shared.rs @@ -661,18 +661,22 @@ impl Display for MetadataTestPathError<'_> { } } +/// A browser supported by [super::main], used for [`TestPath`]s. #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, ValueEnum)] pub(crate) enum Browser { Firefox, Servo, } +/// Symbolically represents a file root from which tests and metadata are based. Scopes are based +/// on a specific [`Browser`]. #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] pub(crate) enum TestScope { Firefox(FirefoxTestScope), Servo(ServoTestScope), } +/// Subset of [`TestScope`] for [`Browser::Firefox`]. #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] pub(crate) enum FirefoxTestScope { /// A public test available at some point in the history of [WPT upstream]. Note that while @@ -690,6 +694,7 @@ impl From for TestScope { } } +/// Subset of [`TestScope`] for [`Browser::Servo`]. #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] pub(crate) enum ServoTestScope { WebGpu,