lcov-parser

LCOV report parser for Rust.

Build Status

Basic usage

If you simply want to parse, use the eachrecords.
You can run the parsing process on a record-by-record basis in each
records.

```rust extern crate lcov_parser;

use lcovparser:: { eachrecords, LCOVRecord };

fn main() { let content = concat!( "TN:testname\n", "SF:/path/to/source.rs\n", "DA:1,2\n", "DA:2,1\n", "DA:3,5\n", "endof_record\n" );

each_records(content.as_bytes(), | record | {
    match record {
        LCOVRecord::TestName { name } => println!("Test: {}", name),
        LCOVRecord::SourceFile { file_name } => println!("File: {}", file_name),
        LCOVRecord::Data { line_number, executed_count } => println!("Line: {}, Executed: {}", line_number, executed_count),
        LCOVRecord::EndOfRecord => println!("Finish")
    }
});

} ```