Skip to content

Commit

Permalink
Add missing tests for readme code snippets (#2963)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Apr 2, 2024
1 parent 158a528 commit 5a92928
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/libs/result/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ fn main() -> Result<()> {
let e = Error::new(E_CANCELLED, "test message");
assert_eq!(e.code(), E_CANCELLED);
assert_eq!(e.message(), "test message");
Err(e)
Ok(())
}
```
9 changes: 9 additions & 0 deletions crates/tests/readme/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,12 @@ path = "../../libs/targets"

[dependencies.windows-metadata]
path = "../../libs/metadata"

[dev-dependencies.windows-result]
path = "../../libs/result"

[dev-dependencies.windows-registry]
path = "../../libs/registry"

[dev-dependencies.windows-version]
path = "../../libs/version"
3 changes: 3 additions & 0 deletions crates/tests/readme/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#![doc = include_str!("../../../../crates/libs/core/readme.md")]
#![doc = include_str!("../../../../crates/libs/metadata/readme.md")]
#![doc = include_str!("../../../../crates/libs/registry/readme.md")]
#![doc = include_str!("../../../../crates/libs/result/readme.md")]
#![doc = include_str!("../../../../crates/libs/sys/readme.md")]
#![doc = include_str!("../../../../crates/libs/targets/readme.md")]
#![doc = include_str!("../../../../crates/libs/version/readme.md")]
#![doc = include_str!("../../../../crates/libs/windows/readme.md")]

0 comments on commit 5a92928

Please sign in to comment.