Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed May 10, 2024
1 parent dd48a19 commit f8549f4
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions moz-webgpu-cts/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,13 @@ const SCOPE_DIR_SERVO_WEBGPU_STR: &str = "tests/wpt/webgpu";
const SCOPE_DIR_SERVO_WEBGPU_COMPONENTS: &[&str] = &["tests", "wpt", "webgpu"];

impl<'a> TestPath<'a> {
/// Constructs [`Self`] from the URL path of a test entry in a WPT execution report.
///
/// # Examples
///
/// ```

Check failure on line 449 in moz-webgpu-cts/src/shared.rs

View workflow job for this annotation

GitHub Actions / Documentation (beta)

Rust code block is empty
///
/// ```
pub fn from_execution_report(
browser: Browser,
test_url_path: &'a str,
Expand Down Expand Up @@ -474,6 +481,14 @@ impl<'a> TestPath<'a> {
})
}

/// Constructs [`Self`] by parsing the path of a WPT test metadata file (file extension:
/// `*.ini`).
///
/// # Examples
///
/// ```

Check failure on line 489 in moz-webgpu-cts/src/shared.rs

View workflow job for this annotation

GitHub Actions / Documentation (beta)

Rust code block is empty
///
/// ```
pub fn from_metadata_test(
browser: Browser,
rel_meta_file_path: &'a Path,
Expand Down Expand Up @@ -540,6 +555,15 @@ impl<'a> TestPath<'a> {
}
}

/// Provides a [`Display`]-implementing value that prints the name of this test. This is
/// typically observed as the top-level section key in WPT metadata, i.e., the
/// `test.https.html` in `[test.https.html]` in the `test.https.html.ini` metadata file.
///
/// # Examples
///
/// ```

Check failure on line 564 in moz-webgpu-cts/src/shared.rs

View workflow job for this annotation

GitHub Actions / Documentation (beta)

Rust code block is empty
///
/// ```
pub(crate) fn test_name(&self) -> impl Display + '_ {
let Self {
path,
Expand All @@ -557,6 +581,14 @@ impl<'a> TestPath<'a> {
})
}

/// Provides a [`Display`]-implementing value that prints the URL path after the manifest root of
/// this test, not including the leading `'/'`.
///
/// # Examples
///
/// ```

Check failure on line 589 in moz-webgpu-cts/src/shared.rs

View workflow job for this annotation

GitHub Actions / Documentation (beta)

Rust code block is empty
///
/// ```
pub(crate) fn runner_url_path(&self) -> impl Display + '_ {
let Self {
path,
Expand All @@ -577,6 +609,13 @@ impl<'a> TestPath<'a> {
})
}

/// Provides a [`Display`]-implementing value that prints the path of this test, relative to
/// root of the source code repository it's found in.
///
/// # Examples
///
/// ```

Check failure on line 617 in moz-webgpu-cts/src/shared.rs

View workflow job for this annotation

GitHub Actions / Documentation (beta)

Rust code block is empty
/// ```
pub(crate) fn rel_metadata_path(&self) -> impl Display + '_ {
let Self {
path,
Expand Down

0 comments on commit f8549f4

Please sign in to comment.