Skip to content

Commit 579e734

Browse files
committed
Add regression test
1 parent 4bf89b1 commit 579e734

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "llvm_profparser"
3-
version = "0.9.1"
3+
version = "0.9.2"
44
authors = ["xd009642 <danielmckenna93@gmail.com>"]
55
description = "Parsing and interpretation of llvm coverage profiles and generated data"
66
repository = "https://github.com/xd009642/llvm-profparser"

src/instrumentation_profile/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn parse_bytes(data: &[u8]) -> io::Result<InstrumentationProfile> {
4444
));
4545
};
4646
nom_res.map(|(_bytes, res)| res).map_err(|e| {
47-
// trace!("{}", e);
47+
trace!("{}", e);
4848
let verbose_error_message = |err: VerboseError<&[u8]>| {
4949
err.errors
5050
.iter()
Binary file not shown.

tests/profdata.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,3 +491,16 @@ fn check_raw_data_consistency() {
491491
std::assert_eq!(data_record, raw_record);
492492
}
493493
}
494+
495+
// https://github.com/xd009642/llvm-profparser/issues/65 prevent regression on hash table parsing
496+
// changing
497+
#[test]
498+
fn hash_table_regression_check() {
499+
let ferrocene = data_root_dir()
500+
.join("misc")
501+
.join("ferrocene-library-aarch64-apple-darwin.profdata");
502+
503+
// We've not locked this to version, but it's enough to parse it and making sure it parses
504+
// correctly to prevent a regression.
505+
parse(&ferrocene).unwrap();
506+
}

0 commit comments

Comments
 (0)