Skip to content

Commit 64a4a75

Browse files
committed
remove file_section test in favor of integrating reasonsable tests with file.
That way there will be actual values to validate.
1 parent 1446002 commit 64a4a75

File tree

4 files changed

+10
-67
lines changed

4 files changed

+10
-67
lines changed

Cargo.lock

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

gix-config/fuzz/Cargo.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ path = "fuzz_targets/parse.rs"
2727
test = false
2828
doc = false
2929

30-
[[bin]]
31-
name = "fuzz_file_section"
32-
path = "fuzz_targets/fuzz_file_section.rs"
33-
test = false
34-
doc = false
35-
3630
[[bin]]
3731
name = "fuzz_file"
3832
path = "fuzz_targets/fuzz_file.rs"

gix-config/fuzz/fuzz_targets/fuzz_file.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ fuzz_target!(|ctx: Ctx| {
3333
_ = black_box(file.sections_by_name(ctx.sections_by_name).map(|x| x.count()));
3434
_ = black_box(file.frontmatter());
3535

36+
for section in file.sections() {
37+
for key in section.keys() {
38+
_ = black_box(
39+
section
40+
.value_implicit(key.as_ref())
41+
.expect("The key exists, so should the value."),
42+
);
43+
}
44+
}
45+
3646
let roundtrip_as_string: Vec<u8> = file.to_bstring().into();
3747
_ = unwrap_or_return!(black_box(File::from_bytes_no_includes(
3848
&roundtrip_as_string,

gix-config/fuzz/fuzz_targets/fuzz_file_section.rs

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)