Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Aug 1, 2024
1 parent 8dcde14 commit b5b511c
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions moz-webgpu-cts/src/wpt/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ pub(crate) struct TestEntryPath<'a> {
}

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

Check failure on line 234 in moz-webgpu-cts/src/wpt/path.rs

View workflow job for this annotation

GitHub Actions / Documentation (stable)

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

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

Check failure on line 288 in moz-webgpu-cts/src/wpt/path.rs

View workflow job for this annotation

GitHub Actions / Documentation (stable)

Rust code block is empty
///
/// ```
pub fn from_metadata_test(
browser: Browser,
rel_meta_file_path: &'a Path,
Expand Down Expand Up @@ -368,6 +383,15 @@ impl<'a> TestEntryPath<'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 392 in moz-webgpu-cts/src/wpt/path.rs

View workflow job for this annotation

GitHub Actions / Documentation (stable)

Rust code block is empty
///
/// ```
pub(crate) fn test_name(&self) -> impl Display + '_ {
let Self {
spec_path:
Expand All @@ -394,6 +418,14 @@ impl<'a> TestEntryPath<'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 426 in moz-webgpu-cts/src/wpt/path.rs

View workflow job for this annotation

GitHub Actions / Documentation (stable)

Rust code block is empty
///
/// ```
pub(crate) fn runner_url_path(&self) -> impl Display + '_ {
let Self {
spec_path:
Expand All @@ -413,6 +445,13 @@ impl<'a> TestEntryPath<'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 453 in moz-webgpu-cts/src/wpt/path.rs

View workflow job for this annotation

GitHub Actions / Documentation (stable)

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

0 comments on commit b5b511c

Please sign in to comment.