Skip to content

Commit

Permalink
docs: document TestScope APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed May 10, 2024
1 parent d5092da commit b448f18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions moz-webgpu-cts/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -690,6 +694,7 @@ impl From<FirefoxTestScope> for TestScope {
}
}

/// Subset of [`TestScope`] for [`Browser::Servo`].
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub(crate) enum ServoTestScope {
WebGpu,
Expand Down

0 comments on commit b448f18

Please sign in to comment.