Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eb5e858

Browse files
committed
refactor: Migrate from snapbox::harness to tryfn
1 parent 123a222 commit eb5e858

File tree

3 files changed

+32
-8
lines changed

3 files changed

+32
-8
lines changed

‎Cargo.lock‎

Lines changed: 26 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ criterion = "0.5.1"
3333
difference = "2.0.0"
3434
glob = "0.3.1"
3535
serde = { version = "1.0.199", features = ["derive"] }
36-
snapbox = { version = "0.5.14", features = ["diff", "harness", "term-svg", "cmd", "examples"] }
36+
snapbox = { version = "0.5.14", features = ["diff", "term-svg", "cmd", "examples"] }
3737
toml = "0.5.11"
38+
tryfn = "0.2.1"
3839

3940
[[bench]]
4041
name = "simple"

‎tests/fixtures/main.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ use std::error::Error;
88

99
fn main() {
1010
#[cfg(not(windows))]
11-
snapbox::harness::Harness::new("tests/fixtures/", setup, test)
11+
tryfn::Harness::new("tests/fixtures/", setup, test)
1212
.select(["*/*.toml"])
1313
.test();
1414
}
1515

16-
fn setup(input_path: std::path::PathBuf) -> snapbox::harness::Case {
16+
fn setup(input_path: std::path::PathBuf) -> tryfn::Case {
1717
let name = input_path.file_name().unwrap().to_str().unwrap().to_owned();
18-
let expected = input_path.with_extension("svg");
19-
snapbox::harness::Case {
18+
let expected = tryfn::Data::read_from(&input_path.with_extension("svg"),None);
19+
tryfn::Case {
2020
name,
2121
fixture: input_path,
2222
expected,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /