├── .cargo └── config.toml ├── .dockerignore ├── .github ├── dependabot.yml └── workflows │ ├── CICD.yml │ └── release.yml ├── .gitignore ├── .markdownlint.yaml ├── .pre-commit-config.yaml ├── CODE_OF_CONDUCT.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE-MPL-2.0 ├── README.md ├── benches ├── filter.rs ├── lib.rs ├── llvm_tools.rs ├── output.rs ├── parser.rs └── reader.rs ├── src ├── bulma │ ├── LICENSE │ └── bulma-0.9.1.min.css ├── cobertura.rs ├── covdir.rs ├── defs.rs ├── file_filter.rs ├── filter.rs ├── gcov.rs ├── html.rs ├── lib.rs ├── llvm_tools.rs ├── main.rs ├── output.rs ├── parser.rs ├── path_rewriting.rs ├── producer.rs ├── reader.rs ├── symlink.rs └── templates │ ├── badges │ ├── flat.svg │ ├── flat_square.svg │ ├── for_the_badge.svg │ ├── plastic.svg │ └── social.svg │ ├── base.html │ ├── file.html │ ├── index.html │ └── macros.html ├── test ├── .gitattributes ├── 1494603973-2977-7.info ├── 64bit_count.gcda ├── 64bit_count.gcno ├── 64bit_count.gcov ├── Platform.gcda ├── Platform.gcno ├── Unified_cpp_netwerk_base0.gcda ├── Unified_cpp_netwerk_base0.gcno ├── default.profraw ├── empty_line.info ├── gcda1.zip ├── gcda2.zip ├── gcno.zip ├── gcno_no_path_mapping.zip ├── gcno_symlink │ ├── gcda │ │ ├── main.gcda │ │ └── main.gcno │ └── gcno │ │ └── main.gcno ├── go │ └── go.out ├── info1.zip ├── info2.zip ├── intermediate_with_branches.gcov ├── invalid_DA_record.info ├── jacoco │ ├── basic-report.xml │ ├── full-junit4-report-multiple-top-level-classes.xml │ ├── inner-classes.xml │ ├── kotlin-jacoco-report.xml │ ├── multiple-top-level-classes.xml │ └── not_jacoco_file.xml ├── jacoco1.zip ├── jacoco2.zip ├── java │ ├── main.java │ └── skip.java ├── kotlin │ └── main.kt ├── linked-files-map.json ├── llvm │ ├── file.gcda │ ├── file.gcno │ ├── file_branch.c │ ├── file_branch.gcda │ ├── file_branch.gcno │ ├── gcda1.zip │ ├── gcda2.zip │ ├── gcno.zip │ ├── reader.c │ ├── reader.c.0.gcov │ ├── reader.c.1.gcov │ ├── reader.c.2.gcov │ ├── reader.gcda │ ├── reader.gcno │ ├── reader.gcno.0.dump │ ├── reader.gcno.1.dump │ └── reader.gcno.2.dump ├── mozillavpn_serverconnection.gcda ├── mozillavpn_serverconnection.gcno ├── mozillavpn_serverconnection.gcno.gcov.json.gz ├── negative_counts.gcda ├── negative_counts.gcno ├── negative_counts.gcov ├── no_gcda │ ├── empty.gcda.zip │ ├── main.gcda.zip │ ├── main.gcno │ └── main.gcno.zip ├── non-utf-8.gcov ├── not_info_file.info ├── nsGnomeModule.gcda ├── nsGnomeModule.gcno ├── nsMaiInterfaceDocument.gcda ├── nsMaiInterfaceDocument.gcno ├── nsMaiInterfaceValue.gcda ├── nsMaiInterfaceValue.gcno ├── old_branches.gcov ├── only_one_gcda │ ├── main.gcda │ ├── main.gcno │ └── orphan.gcno ├── profraw1.zip ├── profraw2.zip ├── prova.gcda ├── prova.gcno ├── prova.gcov ├── prova.info ├── prova_fn_with_commas.info ├── reader_gcc-10.gcda ├── reader_gcc-10.gcno ├── reader_gcc-10.gcno.1.dump ├── reader_gcc-6.gcda ├── reader_gcc-6.gcno ├── reader_gcc-6.gcno.1.dump ├── reader_gcc-7.gcda ├── reader_gcc-7.gcno ├── reader_gcc-7.gcno.1.dump ├── reader_gcc-8.gcda ├── reader_gcc-8.gcno ├── reader_gcc-8.gcno.1.dump ├── reader_gcc-9.gcda ├── reader_gcc-9.gcno ├── reader_gcc-9.gcno.1.dump ├── relative_path │ ├── foo │ │ └── bar │ │ │ └── oof.cpp │ └── relative_path.info ├── rust │ ├── generics_with_two_parameters.gcda │ ├── generics_with_two_parameters.gcno │ ├── generics_with_two_parameters_intermediate.gcov │ ├── generics_with_two_parameters_old.gcov │ ├── main.rs │ └── src │ │ └── main.rs ├── sub │ ├── prova2.gcda │ ├── prova2.gcno │ └── prova2.gcov ├── sub2 │ ├── RootAccessibleWrap.gcda │ └── RootAccessibleWrap.gcno ├── test │ └── main.rs ├── test_covdir.json └── zip_dir │ ├── Platform.gcda │ ├── gcno.zip │ ├── nsGnomeModule.gcda │ ├── nsMaiInterfaceDocument.gcda │ ├── nsMaiInterfaceValue.gcda │ ├── sub │ └── prova2.gcda │ └── sub2 │ └── RootAccessibleWrap.gcda └── tests ├── .gitignore ├── Dockerfile ├── basic ├── expected_gcc.ade ├── expected_gcc.covdir ├── expected_gcc.coveralls ├── expected_llvm.ade ├── expected_llvm.covdir ├── expected_llvm.coveralls ├── expected_llvm_7.ade ├── expected_llvm_7.covdir ├── expected_llvm_7.coveralls ├── expected_llvm_mac.ade ├── expected_llvm_mac.covdir ├── expected_llvm_mac.coveralls └── main.c ├── basic_zip_dir ├── expected_gcc.ade ├── expected_gcc.covdir ├── expected_gcc.coveralls ├── expected_llvm.ade ├── expected_llvm.covdir ├── expected_llvm.coveralls ├── expected_llvm_7.ade ├── expected_llvm_7.covdir ├── expected_llvm_7.coveralls ├── expected_llvm_mac.ade ├── expected_llvm_mac.covdir ├── expected_llvm_mac.coveralls └── foo_dir │ └── bar_dir │ └── main.c ├── basic_zip_zip ├── expected_gcc.ade ├── expected_gcc.covdir ├── expected_gcc.coveralls ├── expected_llvm.ade ├── expected_llvm.covdir ├── expected_llvm.coveralls ├── expected_llvm_7.ade ├── expected_llvm_7.covdir ├── expected_llvm_7.coveralls ├── expected_llvm_mac.ade ├── expected_llvm_mac.covdir ├── expected_llvm_mac.coveralls ├── expected_no_gcda_gcc.covdir ├── expected_no_gcda_gcc.coveralls ├── expected_no_gcda_llvm.covdir ├── expected_no_gcda_llvm.coveralls ├── expected_no_gcda_llvm_7.covdir ├── expected_no_gcda_llvm_7.coveralls ├── expected_no_gcda_llvm_mac.covdir ├── expected_no_gcda_llvm_mac.coveralls ├── expected_two_gcda_gcc.covdir ├── expected_two_gcda_gcc.coveralls ├── expected_two_gcda_llvm.covdir ├── expected_two_gcda_llvm.coveralls ├── expected_two_gcda_llvm_7.covdir ├── expected_two_gcda_llvm_7.coveralls ├── expected_two_gcda_llvm_mac.covdir ├── expected_two_gcda_llvm_mac.coveralls └── main.c ├── class ├── expected_gcc.ade ├── expected_gcc.covdir ├── expected_gcc.coveralls ├── expected_gcc_10.ade ├── expected_gcc_10.covdir ├── expected_gcc_10.coveralls ├── expected_gcc_11.ade ├── expected_gcc_11.covdir ├── expected_gcc_11.coveralls ├── expected_gcc_7.covdir ├── expected_gcc_7.coveralls ├── expected_llvm.ade ├── expected_llvm.covdir ├── expected_llvm.coveralls ├── expected_llvm_12.ade ├── expected_llvm_12.coveralls ├── expected_llvm_13.ade ├── expected_llvm_13.coveralls ├── expected_llvm_7_linux.ade ├── expected_llvm_7_linux.covdir ├── expected_llvm_7_linux.coveralls ├── expected_llvm_mac.ade ├── expected_llvm_mac.covdir ├── expected_llvm_mac.coveralls └── main.cpp ├── guess_single_file.json ├── guess_single_file.zip ├── include ├── expected_gcc.ade ├── expected_gcc.covdir ├── expected_gcc.coveralls ├── expected_gcc_10.ade ├── expected_gcc_10.covdir ├── expected_gcc_10.coveralls ├── expected_gcc_11.ade ├── expected_gcc_11.covdir ├── expected_gcc_11.coveralls ├── expected_llvm.ade ├── expected_llvm.covdir ├── expected_llvm.coveralls ├── expected_llvm_12.ade ├── expected_llvm_12.covdir ├── expected_llvm_12.coveralls ├── expected_llvm_13.ade ├── expected_llvm_13.covdir ├── expected_llvm_13.coveralls ├── expected_llvm_7_linux.ade ├── expected_llvm_7_linux.covdir ├── expected_llvm_7_linux.coveralls ├── expected_llvm_mac.ade ├── expected_llvm_mac.covdir ├── expected_llvm_mac.coveralls ├── file.cpp ├── include.h └── main.cpp ├── include2 ├── expected_gcc.ade ├── expected_gcc.covdir ├── expected_gcc.coveralls ├── expected_gcc_10.ade ├── expected_gcc_10.covdir ├── expected_gcc_10.coveralls ├── expected_gcc_11.ade ├── expected_gcc_11.covdir ├── expected_gcc_11.coveralls ├── expected_gcc_7.covdir ├── expected_gcc_7.coveralls ├── expected_llvm.ade ├── expected_llvm.covdir ├── expected_llvm.coveralls ├── expected_llvm_12.ade ├── expected_llvm_12.covdir ├── expected_llvm_12.coveralls ├── expected_llvm_13.ade ├── expected_llvm_13.covdir ├── expected_llvm_13.coveralls ├── expected_llvm_7_linux.ade ├── expected_llvm_7_linux.covdir ├── expected_llvm_7_linux.coveralls ├── expected_llvm_mac.ade ├── expected_llvm_mac.covdir ├── expected_llvm_mac.coveralls ├── file.cpp ├── include.h └── main.cpp ├── rust ├── basic │ ├── Cargo.toml │ └── src │ │ └── main.rs └── hello_name │ ├── Cargo.toml │ └── src │ └── main.rs ├── switch ├── expected_gcc.ade ├── expected_gcc.covdir ├── expected_gcc.coveralls ├── expected_gcc_10.ade ├── expected_gcc_10.covdir ├── expected_gcc_10.coveralls ├── expected_gcc_11.ade ├── expected_gcc_11.covdir ├── expected_gcc_11.coveralls ├── expected_gcc_7.ade ├── expected_gcc_7.covdir ├── expected_gcc_7.coveralls ├── expected_llvm.ade ├── expected_llvm.covdir ├── expected_llvm.coveralls ├── expected_llvm_7.ade ├── expected_llvm_7.covdir ├── expected_llvm_7.coveralls ├── expected_llvm_mac.ade ├── expected_llvm_mac.covdir ├── expected_llvm_mac.coveralls └── main.c ├── template ├── expected_gcc.ade ├── expected_gcc.covdir ├── expected_gcc.coveralls ├── expected_gcc_10.ade ├── expected_gcc_10.covdir ├── expected_gcc_10.coveralls ├── expected_gcc_11.ade ├── expected_gcc_11.covdir ├── expected_gcc_11.coveralls ├── expected_llvm.ade ├── expected_llvm.covdir ├── expected_llvm.coveralls ├── expected_llvm_12.ade ├── expected_llvm_12.covdir ├── expected_llvm_12.coveralls ├── expected_llvm_13.ade ├── expected_llvm_13.covdir ├── expected_llvm_13.coveralls ├── expected_llvm_7_linux.ade ├── expected_llvm_7_linux.covdir ├── expected_llvm_7_linux.coveralls ├── expected_llvm_mac.ade ├── expected_llvm_mac.covdir ├── expected_llvm_mac.coveralls └── main.cpp └── test.rs /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.x86_64-pc-windows-msvc] 2 | rustflags = ["-Ctarget-feature=+crt-static"] 3 | 4 | [target.i686-pc-windows-msvc] 5 | rustflags = ["-Ctarget-feature=+crt-static"] 6 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | # Git 2 | .git 3 | .gitignore 4 | 5 | # CI 6 | appveyor.yml 7 | .travis.yml 8 | 9 | # Docker 10 | docker-compose.yml 11 | .docker 12 | 13 | # Vim swap files 14 | *.swp 15 | */*.swp 16 | */*/*.swp 17 | */*/*/*.swp 18 | 19 | # Obj files 20 | target/ 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: docker 4 | directory: "/tests" 5 | schedule: 6 | interval: weekly 7 | open-pull-requests-limit: 99 8 | - package-ecosystem: cargo 9 | directory: "/" 10 | schedule: 11 | interval: weekly 12 | open-pull-requests-limit: 99 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | MD013: false 2 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: v4.1.0 4 | hooks: 5 | - id: check-executables-have-shebangs 6 | - id: check-merge-conflict 7 | - id: check-symlinks 8 | - id: check-yaml 9 | - id: check-json 10 | - id: check-vcs-permalinks 11 | - id: trailing-whitespace 12 | exclude: ^test/ 13 | - id: mixed-line-ending 14 | exclude: ^test/ 15 | - repo: https://github.com/igorshubovych/markdownlint-cli 16 | rev: v0.31.1 17 | hooks: 18 | - id: markdownlint 19 | - repo: https://github.com/DevinR528/cargo-sort 20 | rev: v1.0.7 21 | hooks: 22 | - id: cargo-sort 23 | - repo: meta 24 | hooks: 25 | - id: check-useless-excludes 26 | - repo: local 27 | hooks: 28 | - id: fmt 29 | name: fmt 30 | language: system 31 | types: [file, rust] 32 | entry: cargo fmt -- --check 33 | pass_filenames: false 34 | 35 | - id: clippy 36 | name: clippy 37 | language: system 38 | types: [file, rust] 39 | entry: cargo clippy --bins --tests --examples --all -- -D rust_2018_idioms -D warnings # Use -D warnings option to ensure the job fails when encountering warnings 40 | pass_filenames: false 41 | 42 | - id: test 43 | name: test 44 | language: system 45 | types: [file, rust] 46 | entry: cargo test --lib 47 | pass_filenames: false 48 | 49 | default_language_version: 50 | python: python3 51 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Community Participation Guidelines 2 | 3 | This repository is governed by Mozilla's code of conduct and etiquette guidelines. 4 | For more details, please read the 5 | [Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/). 6 | 7 | ## How to Report 8 | 9 | For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page. 10 | 11 | 17 | -------------------------------------------------------------------------------- /benches/llvm_tools.rs: -------------------------------------------------------------------------------- 1 | #![feature(test)] 2 | #![allow(clippy::unit_arg)] 3 | extern crate test; 4 | 5 | use std::fs::File; 6 | use std::io::BufReader; 7 | use std::path::{Path, PathBuf}; 8 | use test::{black_box, Bencher}; 9 | 10 | #[bench] 11 | fn bench_find_binaries(b: &mut Bencher) { 12 | b.iter(|| { 13 | black_box(grcov::find_binaries(Path::new("target"))); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /benches/parser.rs: -------------------------------------------------------------------------------- 1 | #![feature(test)] 2 | #![allow(clippy::unit_arg)] 3 | extern crate test; 4 | 5 | use std::fs::File; 6 | use std::io::BufReader; 7 | use std::path::Path; 8 | use test::{black_box, Bencher}; 9 | 10 | #[bench] 11 | fn bench_parser_lcov(b: &mut Bencher) { 12 | b.iter(|| { 13 | let file = std::fs::read("./test/prova.info").expect("Failed to open lcov file"); 14 | black_box(grcov::parse_lcov(file, true).unwrap()); 15 | }); 16 | } 17 | 18 | #[bench] 19 | fn bench_parser_gcov(b: &mut Bencher) { 20 | let path = Path::new("./test/negative_counts.gcov"); 21 | b.iter(|| black_box(grcov::parse_gcov(path))); 22 | } 23 | 24 | #[bench] 25 | fn bench_parser_jacoco(b: &mut Bencher) { 26 | let path = Path::new("./test/jacoco/full-junit4-report-multiple-top-level-classes.xml"); 27 | b.iter(|| { 28 | let file = BufReader::new(File::open(path).unwrap()); 29 | black_box(grcov::parse_jacoco_xml_report(file)) 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /src/bulma/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2020 Jeremy Thomas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/symlink.rs: -------------------------------------------------------------------------------- 1 | #[cfg(windows)] 2 | use std::path::Path; 3 | 4 | #[cfg(unix)] 5 | pub(crate) use std::os::unix::fs::symlink as symlink_file; 6 | 7 | /// Creates a symbolic link to a file. 8 | /// 9 | /// On Windows, creating a symbolic link to a file requires Administrator 10 | /// rights. Fall back to copying if creating the symbolic link fails. 11 | #[cfg(windows)] 12 | pub(crate) fn symlink_file, Q: AsRef>( 13 | original: P, 14 | link: Q, 15 | ) -> std::io::Result<()> { 16 | use std::sync::atomic::{AtomicBool, Ordering::SeqCst}; 17 | 18 | static HAVE_PRINTED_WARNING: AtomicBool = AtomicBool::new(false); 19 | 20 | std::os::windows::fs::symlink_file(&original, &link) 21 | .or_else(|_| { 22 | let _len: u64 = std::fs::copy(&original, &link)?; 23 | 24 | // Print a warning about symbolic links, but only once per grcov run. 25 | if HAVE_PRINTED_WARNING.compare_exchange(false, true, SeqCst, SeqCst).is_ok() { 26 | eprintln!( 27 | "Failed to create a symlink, but successfully copied file (as fallback).\n\ 28 | This is less efficient. You can enable symlinks without elevating to Administrator.\n\ 29 | See instructions at https://github.com/mozilla/grcov/blob/master/README.md#enabling-symlinks-on-windows"); 30 | } 31 | 32 | Ok(()) 33 | } 34 | ) 35 | } 36 | -------------------------------------------------------------------------------- /src/templates/badges/flat.svg: -------------------------------------------------------------------------------- 1 | {# Original badge design by https://github.com/badges/shields under the CC0-1.0 license. #} 2 | {%- if current >= 100 -%} 3 | {%- set width = 104 -%} 4 | {%- set position = 815 -%} 5 | {%- set text_length = 330 -%} 6 | {%- elif current >= 10 -%} 7 | {%- set width = 96 -%} 8 | {%- set position = 775 -%} 9 | {%- set text_length = 250 -%} 10 | {%- else -%} 11 | {%- set width = 90 -%} 12 | {%- set position = 745 -%} 13 | {%- set text_length = 190 -%} 14 | {%- endif -%} 15 | {%- if current >= hi_limit -%} 16 | {%- set color = "#97ca00" -%} 17 | {%- elif current >= med_limit -%} 18 | {%- set color = "#dfb317" -%} 19 | {%- else -%} 20 | {%- set color = "#e05d44" -%} 21 | {%- endif -%} 22 | 24 | coverage: {{current}}% 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | coverage 40 | 41 | {{current}}% 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/templates/badges/flat_square.svg: -------------------------------------------------------------------------------- 1 | {# Original badge design by https://github.com/badges/shields under the CC0-1.0 license. #} 2 | {%- if current >= 100 -%} 3 | {%- set width = 104 -%} 4 | {%- set position = 815 -%} 5 | {%- set text_length = 330 -%} 6 | {%- elif current >= 10 -%} 7 | {%- set width = 96 -%} 8 | {%- set position = 775 -%} 9 | {%- set text_length = 250 -%} 10 | {%- else -%} 11 | {%- set width = 90 -%} 12 | {%- set position = 745 -%} 13 | {%- set text_length = 190 -%} 14 | {%- endif -%} 15 | {%- if current >= hi_limit -%} 16 | {%- set color = "#97ca00" -%} 17 | {%- elif current >= med_limit -%} 18 | {%- set color = "#dfb317" -%} 19 | {%- else -%} 20 | {%- set color = "#e05d44" -%} 21 | {%- endif -%} 22 | 24 | coverage: {{current}}% 25 | 26 | 27 | 28 | 29 | 30 | coverage 31 | {{current}}% 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/templates/badges/for_the_badge.svg: -------------------------------------------------------------------------------- 1 | {# Original badge design by https://github.com/badges/shields under the CC0-1.0 license. #} 2 | {%- if current >= 100 -%} 3 | {%- set width = 152 -%} 4 | {%- set position = 1215 -%} 5 | {%- set text_length = 370 -%} 6 | {%- elif current >= 10 -%} 7 | {%- set width = 142.5 -%} 8 | {%- set position = 1167.5 -%} 9 | {%- set text_length = 275 -%} 10 | {%- else -%} 11 | {%- set width = 133 -%} 12 | {%- set position = 1120 -%} 13 | {%- set text_length = 180 -%} 14 | {%- endif -%} 15 | {%- if current >= hi_limit -%} 16 | {%- set color = "#97ca00" -%} 17 | {%- elif current >= med_limit -%} 18 | {%- set color = "#dfb317" -%} 19 | {%- else -%} 20 | {%- set color = "#e05d44" -%} 21 | {%- endif -%} 22 | 24 | COVERAGE: {{current}}% 25 | 26 | 27 | 28 | 29 | 30 | COVERAGE 31 | {{current}}% 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {%- block head -%} 5 | 6 | 7 | {% block title %}{% endblock title %} 8 | 9 | {%- endblock head -%} 10 | 11 | 12 |
13 | {%- block content -%}{%- endblock content -%} 14 |
15 |
16 | {% if date %} 17 |
18 |

Date: {{ date | date(format="%Y-%m-%d %H:%M") }}

19 |
20 | {% endif %} 21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /src/templates/file.html: -------------------------------------------------------------------------------- 1 | {% import "macros.html" as macros %} 2 | {% extends "base.html" %} 3 | 4 | {% block title %}Grcov report - {{ current }} {% endblock title %} 5 | 6 | {% block content -%} 7 | {{ macros::summary(parents=parents, stats=stats, precision=precision) }} 8 |
9 | {%- for item in items -%} 10 | {%- if item.1 > 0 -%} 11 | {%- set highlight = "success" -%} 12 | {%- set highlight_light = "success-light" -%} 13 | {%- set count = item.1 -%} 14 | {%- set aria_label = count -%} 15 | {%- elif item.1 < 0 -%} 16 | {% set highlight = "white" -%} 17 | {% set highlight_light = "white" -%} 18 | {% set count = "" -%} 19 | {%- set aria_label = "no coverage" -%} 20 | {%- else -%} 21 | {%- set highlight = "danger" -%} 22 | {%- set highlight_light = "danger-light" -%} 23 | {%- set count = "" -%} 24 | {%- set aria_label = "0" -%} 25 | {%- endif -%} 26 |
27 |
31 | {{ item.0 }} 32 |
33 |
36 | {{ count }} 37 |
38 |
40 |
{{ item.2 }}
41 |
42 |
43 | {%- endfor -%} 44 |
45 | {% endblock content -%} 46 | 47 | -------------------------------------------------------------------------------- /src/templates/index.html: -------------------------------------------------------------------------------- 1 | {% import "macros.html" as macros %} 2 | {% extends "base.html" %} 3 | 4 | {% block title %}Grcov report - {{ current }} {% endblock title %} 5 | 6 | {%- block content -%} 7 | {{ macros::summary(parents=parents, stats=stats, precision=precision) }} 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% if branch_enabled %} 15 | 16 | {% endif %} 17 | 18 | 19 | 20 | {%- if kind == "Directory" -%} 21 | {%- for item, info in items -%} 22 | {% if info.abs_prefix and info.abs_prefix != "" %} 23 | {{ macros::stats_line(name=item, url=info.abs_prefix~item~"/index.html", stats=info.stats, precision=precision) }} 24 | {% else %} 25 | {{ macros::stats_line(name=item, url=item~"/index.html", stats=info.stats, precision=precision) }} 26 | {% endif %} 27 | {%- endfor -%} 28 | {%- else -%} 29 | {%- for item, info in items -%} 30 | {% if info.abs_prefix and info.abs_prefix != "" %} 31 | {{ macros::stats_line(name=item, url=info.abs_prefix~"/"~item~".html", stats=info.stats, precision=precision) }} 32 | {% else %} 33 | {{ macros::stats_line(name=item, url=item~".html", stats=info.stats, precision=precision) }} 34 | {% endif %} 35 | {%- endfor -%} 36 | {%- endif -%} 37 | 38 |
{{ kind }}Line CoverageFunctionsBranches
39 | {%- endblock content -%} 40 | 41 | -------------------------------------------------------------------------------- /test/.gitattributes: -------------------------------------------------------------------------------- 1 | * -crlf -text binary 2 | -------------------------------------------------------------------------------- /test/64bit_count.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/64bit_count.gcda -------------------------------------------------------------------------------- /test/64bit_count.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/64bit_count.gcno -------------------------------------------------------------------------------- /test/Platform.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/Platform.gcda -------------------------------------------------------------------------------- /test/Platform.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/Platform.gcno -------------------------------------------------------------------------------- /test/Unified_cpp_netwerk_base0.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/Unified_cpp_netwerk_base0.gcda -------------------------------------------------------------------------------- /test/Unified_cpp_netwerk_base0.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/Unified_cpp_netwerk_base0.gcno -------------------------------------------------------------------------------- /test/default.profraw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/default.profraw -------------------------------------------------------------------------------- /test/empty_line.info: -------------------------------------------------------------------------------- 1 | TN:aFile 2 | SF:aFile.js 3 | FN:1,top-level 4 | FN:15,MainProcessSingleton 5 | FN:21,logConsoleMessage 6 | FN:28,addSearchEngine 7 | FN:59,addSearchEngine/< 8 | FN:67,observe 9 | 10 | FN:95,cubic-bezier(0.0, 0.0, 1.0, 1.0) 11 | FNDA:1,top-level 12 | FNDA:1,MainProcessSingleton 13 | FNDA:2,observe 14 | FNDA:3,cubic-bezier(0.0, 0.0, 1.0, 1.0) 15 | FNF:6 16 | FNH:3 17 | BRDA:34,0,0,- 18 | BRDA:34,0,1,- 19 | BRDA:34,1,0,- 20 | BRDA:34,1,1,- 21 | BRDA:34,2,0,- 22 | BRDA:34,2,1,- 23 | BRDA:41,3,0,- 24 | BRDA:41,3,1,- 25 | BRDA:44,4,0,- 26 | BRDA:44,4,1,- 27 | BRDA:44,5,0,- 28 | BRDA:44,5,1,- 29 | BRDA:60,0,0,- 30 | BRDA:60,0,1,- 31 | BRDA:63,1,0,- 32 | BRDA:63,1,1,- 33 | BRDA:68,0,0,1 34 | BRDA:68,0,1,1 35 | BRDA:68,1,0,1 36 | BRDA:68,1,1,- 37 | BRF:20 38 | BRH:3 39 | DA:7,1 40 | DA:9,1 41 | DA:10,1 42 | DA:12,1 43 | DA:13,1 44 | DA:12,1 45 | DA:16,1 46 | DA:17,1 47 | DA:18,1 48 | DA:19,1 49 | DA:18,1 50 | DA:21,1 51 | DA:28,1 52 | DA:67,1 53 | DA:90,1 54 | DA:22,0 55 | DA:23,0 56 | DA:24,0 57 | DA:29,0 58 | DA:30,0 59 | DA:32,0 60 | DA:33,0 61 | DA:34,0 62 | DA:35,0 63 | DA:37,0 64 | DA:39,0 65 | DA:41,0 66 | DA:42,0 67 | DA:44,0 68 | DA:45,0 69 | DA:46,0 70 | DA:47,0 71 | DA:49,0 72 | DA:50,0 73 | DA:51,0 74 | DA:52,0 75 | DA:53,0 76 | DA:54,0 77 | DA:53,0 78 | DA:55,0 79 | DA:56,0 80 | DA:65,0 81 | DA:59,0 82 | DA:60,0 83 | DA:61,0 84 | DA:63,0 85 | DA:68,2 86 | DA:70,1 87 | DA:74,1 88 | DA:75,1 89 | DA:76,1 90 | DA:77,1 91 | DA:78,1 92 | DA:83,1 93 | DA:84,1 94 | DA:95,1 95 | DA:96,1 96 | DA:97,1 97 | DA:98,1 98 | DA:99,1 99 | LF:60 100 | LH:29 101 | end_of_record 102 | -------------------------------------------------------------------------------- /test/gcda1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/gcda1.zip -------------------------------------------------------------------------------- /test/gcda2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/gcda2.zip -------------------------------------------------------------------------------- /test/gcno.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/gcno.zip -------------------------------------------------------------------------------- /test/gcno_no_path_mapping.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/gcno_no_path_mapping.zip -------------------------------------------------------------------------------- /test/gcno_symlink/gcda/main.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/gcno_symlink/gcda/main.gcda -------------------------------------------------------------------------------- /test/gcno_symlink/gcda/main.gcno: -------------------------------------------------------------------------------- 1 | ../gcno/main.gcno -------------------------------------------------------------------------------- /test/gcno_symlink/gcno/main.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/gcno_symlink/gcno/main.gcno -------------------------------------------------------------------------------- /test/info1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/info1.zip -------------------------------------------------------------------------------- /test/info2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/info2.zip -------------------------------------------------------------------------------- /test/intermediate_with_branches.gcov: -------------------------------------------------------------------------------- 1 | file:/home/marco/Documenti/FD/mozilla-central/build-cov-gcc/dist/include/nsExpirationTracker.h 2 | function:393,0,_ZN19nsExpirationTrackerIN11nsIDocument16SelectorCacheKeyELj4EE25ExpirationTrackerObserver7ReleaseEv 3 | lcount:393,0 4 | lcount:397,0 5 | lcount:399,0 6 | branch:399,notexec 7 | branch:399,notexec 8 | lcount:401,1 9 | branch:401,taken 10 | branch:401,nottaken 11 | lcount:402,0 12 | lcount:403,0 13 | lcount:405,0 14 | -------------------------------------------------------------------------------- /test/jacoco/not_jacoco_file.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/jacoco1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/jacoco1.zip -------------------------------------------------------------------------------- /test/jacoco2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/jacoco2.zip -------------------------------------------------------------------------------- /test/java/main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/java/main.java -------------------------------------------------------------------------------- /test/java/skip.java: -------------------------------------------------------------------------------- 1 | class Test { 2 | void Foo() { 3 | // included line 4 | // excluded line 5 | 6 | // skip line start 7 | // skipped line 8 | // skip line end 9 | 10 | // included branch 11 | // excluded branch 12 | 13 | // skip branch start 14 | // skipped branch 15 | // skip branch end 16 | 17 | // skip line start 18 | // skip branch start 19 | } 20 | } -------------------------------------------------------------------------------- /test/kotlin/main.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/kotlin/main.kt -------------------------------------------------------------------------------- /test/llvm/file.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/llvm/file.gcda -------------------------------------------------------------------------------- /test/llvm/file.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/llvm/file.gcno -------------------------------------------------------------------------------- /test/llvm/file_branch.c: -------------------------------------------------------------------------------- 1 | int foo(int x) { 2 | if (x > 0 && 3 | x <= 3) { 4 | int y = x + 1; 5 | y += 1; 6 | return y; 7 | } else { 8 | return 1; 9 | } 10 | } 11 | 12 | int bar(int x) { 13 | if (x > 0) { 14 | return 0; 15 | } else { 16 | return 1; 17 | } 18 | } 19 | 20 | int oof(int x) { 21 | if (x > 0 && x <= 3) { 22 | return 0; 23 | } else { 24 | int y = x + 1; 25 | y += 1; 26 | return y; 27 | } 28 | } 29 | 30 | 31 | int main() { 32 | return foo(-1) + foo(2) + bar(-1); 33 | } 34 | -------------------------------------------------------------------------------- /test/llvm/file_branch.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/llvm/file_branch.gcda -------------------------------------------------------------------------------- /test/llvm/file_branch.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/llvm/file_branch.gcno -------------------------------------------------------------------------------- /test/llvm/gcda1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/llvm/gcda1.zip -------------------------------------------------------------------------------- /test/llvm/gcda2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/llvm/gcda2.zip -------------------------------------------------------------------------------- /test/llvm/gcno.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/llvm/gcno.zip -------------------------------------------------------------------------------- /test/llvm/reader.c: -------------------------------------------------------------------------------- 1 | int foo(int x, int n) 2 | { 3 | int i; 4 | for (i = 0; i < n; ++i) { 5 | if (x > n) 6 | { 7 | x += i; 8 | } 9 | else 10 | { 11 | int j; 12 | for (j = 0; j < i; ++j) { 13 | x += j; 14 | } 15 | } 16 | } 17 | return x; 18 | } 19 | 20 | int main() 21 | { 22 | int x = foo(10, 10); 23 | int y = 0; 24 | int i; 25 | for (i = 0; i < x; ++i) 26 | { 27 | y += foo(x, 10); 28 | } 29 | return y; 30 | } 31 | -------------------------------------------------------------------------------- /test/llvm/reader.c.0.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:reader.c 2 | -: 0:Graph:reader.gcno 3 | -: 0:Data:- 4 | -: 0:Runs:0 5 | -: 0:Programs:0 6 | -: 1:int foo(int x, int n) 7 | -: 2:{ 8 | -: 3: int i; 9 | #####: 4: for (i = 0; i < n; ++i) { 10 | #####: 5: if (x > n) 11 | -: 6: { 12 | #####: 7: x += i; 13 | #####: 8: } 14 | -: 9: else 15 | -: 10: { 16 | -: 11: int j; 17 | #####: 12: for (j = 0; j < i; ++j) { 18 | #####: 13: x += j; 19 | #####: 14: } 20 | -: 15: } 21 | #####: 16: } 22 | #####: 17: return x; 23 | -: 18:} 24 | -: 19: 25 | -: 20:int main() 26 | -: 21:{ 27 | #####: 22: int x = foo(10, 10); 28 | #####: 23: int y = 0; 29 | -: 24: int i; 30 | #####: 25: for (i = 0; i < x; ++i) 31 | -: 26: { 32 | #####: 27: y += foo(x, 10); 33 | #####: 28: } 34 | #####: 29: return y; 35 | -: 30:} 36 | -------------------------------------------------------------------------------- /test/llvm/reader.c.1.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:reader.c 2 | -: 0:Graph:reader.gcno 3 | -: 0:Data:reader.gcda 4 | -: 0:Runs:1 5 | -: 0:Programs:1 6 | -: 1:int foo(int x, int n) 7 | -: 2:{ 8 | -: 3: int i; 9 | 594: 4: for (i = 0; i < n; ++i) { 10 | 540: 5: if (x > n) 11 | -: 6: { 12 | 537: 7: x += i; 13 | 537: 8: } 14 | -: 9: else 15 | -: 10: { 16 | -: 11: int j; 17 | 6: 12: for (j = 0; j < i; ++j) { 18 | 3: 13: x += j; 19 | 3: 14: } 20 | -: 15: } 21 | 540: 16: } 22 | 54: 17: return x; 23 | -: 18:} 24 | -: 19: 25 | -: 20:int main() 26 | -: 21:{ 27 | 1: 22: int x = foo(10, 10); 28 | 1: 23: int y = 0; 29 | -: 24: int i; 30 | 54: 25: for (i = 0; i < x; ++i) 31 | -: 26: { 32 | 53: 27: y += foo(x, 10); 33 | 53: 28: } 34 | 1: 29: return y; 35 | -: 30:} 36 | -------------------------------------------------------------------------------- /test/llvm/reader.c.2.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:reader.c 2 | -: 0:Graph:reader.gcno 3 | -: 0:Data:reader.gcda 4 | -: 0:Runs:2 5 | -: 0:Programs:1 6 | -: 1:int foo(int x, int n) 7 | -: 2:{ 8 | -: 3: int i; 9 | 1188: 4: for (i = 0; i < n; ++i) { 10 | 1080: 5: if (x > n) 11 | -: 6: { 12 | 1074: 7: x += i; 13 | 1074: 8: } 14 | -: 9: else 15 | -: 10: { 16 | -: 11: int j; 17 | 12: 12: for (j = 0; j < i; ++j) { 18 | 6: 13: x += j; 19 | 6: 14: } 20 | -: 15: } 21 | 1080: 16: } 22 | 108: 17: return x; 23 | -: 18:} 24 | -: 19: 25 | -: 20:int main() 26 | -: 21:{ 27 | 2: 22: int x = foo(10, 10); 28 | 2: 23: int y = 0; 29 | -: 24: int i; 30 | 108: 25: for (i = 0; i < x; ++i) 31 | -: 26: { 32 | 106: 27: y += foo(x, 10); 33 | 106: 28: } 34 | 2: 29: return y; 35 | -: 30:} 36 | -------------------------------------------------------------------------------- /test/llvm/reader.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/llvm/reader.gcda -------------------------------------------------------------------------------- /test/llvm/reader.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/llvm/reader.gcno -------------------------------------------------------------------------------- /test/llvm/reader.gcno.0.dump: -------------------------------------------------------------------------------- 1 | ===== foo (0) @ reader.c:1 2 | Block : 0 Counter : 0 3 | Destination Edges : 1 (0), 4 | Block : 1 Counter : 0 5 | Source Edges : 0 (0), 6 | Destination Edges : 2 (0), 7 | Lines : 4, 8 | Block : 2 Counter : 0 9 | Source Edges : 1 (0), 11 (0), 10 | Destination Edges : 3 (0), 12 (0), 11 | Lines : 4, 12 | Block : 3 Counter : 0 13 | Source Edges : 2 (0), 14 | Destination Edges : 4 (0), 5 (0), 15 | Lines : 5, 16 | Block : 4 Counter : 0 17 | Source Edges : 3 (0), 18 | Destination Edges : 10 (0), 19 | Lines : 7,8, 20 | Block : 5 Counter : 0 21 | Source Edges : 3 (0), 22 | Destination Edges : 6 (0), 23 | Lines : 12, 24 | Block : 6 Counter : 0 25 | Source Edges : 5 (0), 8 (0), 26 | Destination Edges : 7 (0), 9 (0), 27 | Lines : 12, 28 | Block : 7 Counter : 0 29 | Source Edges : 6 (0), 30 | Destination Edges : 8 (0), 31 | Lines : 13,14, 32 | Block : 8 Counter : 0 33 | Source Edges : 7 (0), 34 | Destination Edges : 6 (0), 35 | Lines : 12, 36 | Block : 9 Counter : 0 37 | Source Edges : 6 (0), 38 | Destination Edges : 10 (0), 39 | Block : 10 Counter : 0 40 | Source Edges : 4 (0), 9 (0), 41 | Destination Edges : 11 (0), 42 | Lines : 16, 43 | Block : 11 Counter : 0 44 | Source Edges : 10 (0), 45 | Destination Edges : 2 (0), 46 | Lines : 4, 47 | Block : 12 Counter : 0 48 | Source Edges : 2 (0), 49 | Destination Edges : 13 (0), 50 | Lines : 17, 51 | Block : 13 Counter : 0 52 | Source Edges : 12 (0), 53 | ===== main (1) @ reader.c:20 54 | Block : 0 Counter : 0 55 | Destination Edges : 1 (0), 56 | Block : 1 Counter : 0 57 | Source Edges : 0 (0), 58 | Destination Edges : 2 (0), 59 | Lines : 22,23,25, 60 | Block : 2 Counter : 0 61 | Source Edges : 1 (0), 4 (0), 62 | Destination Edges : 3 (0), 5 (0), 63 | Lines : 25, 64 | Block : 3 Counter : 0 65 | Source Edges : 2 (0), 66 | Destination Edges : 4 (0), 67 | Lines : 27,28, 68 | Block : 4 Counter : 0 69 | Source Edges : 3 (0), 70 | Destination Edges : 2 (0), 71 | Lines : 25, 72 | Block : 5 Counter : 0 73 | Source Edges : 2 (0), 74 | Destination Edges : 6 (0), 75 | Lines : 29, 76 | Block : 6 Counter : 0 77 | Source Edges : 5 (0), 78 | -------------------------------------------------------------------------------- /test/mozillavpn_serverconnection.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/mozillavpn_serverconnection.gcda -------------------------------------------------------------------------------- /test/mozillavpn_serverconnection.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/mozillavpn_serverconnection.gcno -------------------------------------------------------------------------------- /test/mozillavpn_serverconnection.gcno.gcov.json.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/mozillavpn_serverconnection.gcno.gcov.json.gz -------------------------------------------------------------------------------- /test/negative_counts.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/negative_counts.gcda -------------------------------------------------------------------------------- /test/negative_counts.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/negative_counts.gcno -------------------------------------------------------------------------------- /test/no_gcda/empty.gcda.zip: -------------------------------------------------------------------------------- 1 | PK -------------------------------------------------------------------------------- /test/no_gcda/main.gcda.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/no_gcda/main.gcda.zip -------------------------------------------------------------------------------- /test/no_gcda/main.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/no_gcda/main.gcno -------------------------------------------------------------------------------- /test/no_gcda/main.gcno.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/no_gcda/main.gcno.zip -------------------------------------------------------------------------------- /test/non-utf-8.gcov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/non-utf-8.gcov -------------------------------------------------------------------------------- /test/not_info_file.info: -------------------------------------------------------------------------------- 1 | I'm not an info file 2 | -------------------------------------------------------------------------------- /test/nsGnomeModule.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/nsGnomeModule.gcda -------------------------------------------------------------------------------- /test/nsGnomeModule.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/nsGnomeModule.gcno -------------------------------------------------------------------------------- /test/nsMaiInterfaceDocument.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/nsMaiInterfaceDocument.gcda -------------------------------------------------------------------------------- /test/nsMaiInterfaceDocument.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/nsMaiInterfaceDocument.gcno -------------------------------------------------------------------------------- /test/nsMaiInterfaceValue.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/nsMaiInterfaceValue.gcda -------------------------------------------------------------------------------- /test/nsMaiInterfaceValue.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/nsMaiInterfaceValue.gcno -------------------------------------------------------------------------------- /test/old_branches.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:main.c 2 | -: 0:Graph:main.gcno 3 | -: 0:Data:main.gcda 4 | -: 0:Runs:1 5 | -: 0:Programs:1 6 | -: 1:#include 7 | -: 2: 8 | function main called 1 returned 100% blocks executed 90% 9 | -: 3:int main(void) 10 | -: 4:{ 11 | 20: 5: for (int i = 1; i < 10; i++) { 12 | branch 0 taken 9 13 | branch 1 taken 1 14 | 9: 6: if (i % 3 == 0) { 15 | branch 0 taken 3 16 | branch 1 taken 6 17 | 3: 7: printf ("%d is divisible by 3\n", i); 18 | 3: 8: } 19 | -: 9: 20 | 9: 10: if (i % 11 == 0) { 21 | branch 0 taken 0 22 | branch 1 taken 9 23 | #####: 11: printf ("%d is divisible by 11\n", i); 24 | #####: 12: } 25 | 9: 13: } 26 | -: 14: 27 | 1: 15: return 0; 28 | -: 16:} 29 | -------------------------------------------------------------------------------- /test/only_one_gcda/main.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/only_one_gcda/main.gcda -------------------------------------------------------------------------------- /test/only_one_gcda/main.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/only_one_gcda/main.gcno -------------------------------------------------------------------------------- /test/only_one_gcda/orphan.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/only_one_gcda/orphan.gcno -------------------------------------------------------------------------------- /test/profraw1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/profraw1.zip -------------------------------------------------------------------------------- /test/profraw2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/profraw2.zip -------------------------------------------------------------------------------- /test/prova.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/prova.gcda -------------------------------------------------------------------------------- /test/prova.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/prova.gcno -------------------------------------------------------------------------------- /test/prova_fn_with_commas.info: -------------------------------------------------------------------------------- 1 | TN:aFile 2 | SF:aFile.js 3 | FN:1,top-level 4 | FN:15,MainProcessSingleton 5 | FN:21,logConsoleMessage 6 | FN:28,addSearchEngine 7 | FN:59,addSearchEngine/< 8 | FN:67,observe 9 | FN:95,cubic-bezier(0.0, 0.0, 1.0, 1.0) 10 | FNDA:1,top-level 11 | FNDA:1,MainProcessSingleton 12 | FNDA:2,observe 13 | FNDA:3,cubic-bezier(0.0, 0.0, 1.0, 1.0) 14 | FNF:6 15 | FNH:3 16 | BRDA:34,0,0,- 17 | BRDA:34,0,1,- 18 | BRDA:34,1,0,- 19 | BRDA:34,1,1,- 20 | BRDA:34,2,0,- 21 | BRDA:34,2,1,- 22 | BRDA:41,3,0,- 23 | BRDA:41,3,1,- 24 | BRDA:44,4,0,- 25 | BRDA:44,4,1,- 26 | BRDA:44,5,0,- 27 | BRDA:44,5,1,- 28 | BRDA:60,0,0,- 29 | BRDA:60,0,1,- 30 | BRDA:63,1,0,- 31 | BRDA:63,1,1,- 32 | BRDA:68,0,0,1 33 | BRDA:68,0,1,1 34 | BRDA:68,1,0,1 35 | BRDA:68,1,1,- 36 | BRF:20 37 | BRH:3 38 | DA:7,1 39 | DA:9,1 40 | DA:10,1 41 | DA:12,1 42 | DA:13,1 43 | DA:12,1 44 | DA:16,1 45 | DA:17,1 46 | DA:18,1 47 | DA:19,1 48 | DA:18,1 49 | DA:21,1 50 | DA:28,1 51 | DA:67,1 52 | DA:90,1 53 | DA:22,0 54 | DA:23,0 55 | DA:24,0 56 | DA:29,0 57 | DA:30,0 58 | DA:32,0 59 | DA:33,0 60 | DA:34,0 61 | DA:35,0 62 | DA:37,0 63 | DA:39,0 64 | DA:41,0 65 | DA:42,0 66 | DA:44,0 67 | DA:45,0 68 | DA:46,0 69 | DA:47,0 70 | DA:49,0 71 | DA:50,0 72 | DA:51,0 73 | DA:52,0 74 | DA:53,0 75 | DA:54,0 76 | DA:53,0 77 | DA:55,0 78 | DA:56,0 79 | DA:65,0 80 | DA:59,0 81 | DA:60,0 82 | DA:61,0 83 | DA:63,0 84 | DA:68,2 85 | DA:70,1 86 | DA:74,1 87 | DA:75,1 88 | DA:76,1 89 | DA:77,1 90 | DA:78,1 91 | DA:83,1 92 | DA:84,1 93 | DA:95,1 94 | DA:96,1 95 | DA:97,1 96 | DA:98,1 97 | DA:99,1 98 | LF:60 99 | LH:29 100 | end_of_record 101 | -------------------------------------------------------------------------------- /test/reader_gcc-10.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-10.gcda -------------------------------------------------------------------------------- /test/reader_gcc-10.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-10.gcno -------------------------------------------------------------------------------- /test/reader_gcc-6.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-6.gcda -------------------------------------------------------------------------------- /test/reader_gcc-6.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-6.gcno -------------------------------------------------------------------------------- /test/reader_gcc-7.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-7.gcda -------------------------------------------------------------------------------- /test/reader_gcc-7.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-7.gcno -------------------------------------------------------------------------------- /test/reader_gcc-8.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-8.gcda -------------------------------------------------------------------------------- /test/reader_gcc-8.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-8.gcno -------------------------------------------------------------------------------- /test/reader_gcc-9.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-9.gcda -------------------------------------------------------------------------------- /test/reader_gcc-9.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/reader_gcc-9.gcno -------------------------------------------------------------------------------- /test/relative_path/foo/bar/oof.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/relative_path/foo/bar/oof.cpp -------------------------------------------------------------------------------- /test/relative_path/relative_path.info: -------------------------------------------------------------------------------- 1 | SF:foo/bar/oof.cpp 2 | FN:1,myfun 3 | FNDA:1,myfun 4 | FNF:1 5 | FNH:1 6 | DA:1,21 7 | DA:2,21 8 | DA:4,42 9 | LF:2 10 | LH:2 11 | end_of_record 12 | SF:foo/./bar/./oof.cpp 13 | FN:1,myfun 14 | FNDA:1,myfun 15 | FNF:1 16 | FNH:1 17 | DA:1,21 18 | DA:2,21 19 | DA:3,42 20 | LF:2 21 | LH:2 22 | end_of_record 23 | SF:foo/bar/../bar/oof.cpp 24 | FN:1,myfun 25 | FNDA:1,myfun 26 | FNF:1 27 | FNH:1 28 | DA:1,21 29 | DA:2,21 30 | DA:3,42 31 | LF:2 32 | LH:2 33 | end_of_record 34 | -------------------------------------------------------------------------------- /test/rust/generics_with_two_parameters.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/rust/generics_with_two_parameters.gcda -------------------------------------------------------------------------------- /test/rust/generics_with_two_parameters.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/rust/generics_with_two_parameters.gcno -------------------------------------------------------------------------------- /test/rust/generics_with_two_parameters_intermediate.gcov: -------------------------------------------------------------------------------- 1 | file:src/main.rs 2 | function:3,1,_ZN27rust_code_coverage_sample_244compare_types<[i32; 3],alloc::vec::Vec>E 3 | function:8,1,_ZN27rust_code_coverage_sample_24mainE 4 | lcount:4,3 5 | lcount:5,3 6 | lcount:6,1 7 | lcount:9,2 8 | lcount:10,1 9 | lcount:11,1 10 | lcount:12,2 11 | -------------------------------------------------------------------------------- /test/rust/generics_with_two_parameters_old.gcov: -------------------------------------------------------------------------------- 1 | -: 0:Source:src/main.rs 2 | -: 0:Graph:main.gcno 3 | -: 0:Data:main.gcda 4 | -: 0:Runs:1 5 | -: 0:Programs:1 6 | -: 1:use std::fmt::{Debug, Display}; 7 | -: 2: 8 | function _ZN27rust_code_coverage_sample_244compare_types<[i32; 3],alloc::vec::Vec>E called 1 returned 100% blocks executed 100% 9 | -: 3:fn compare_types(t: &T, u: &U) { 10 | 3: 4: println!("t: `{:?}", t); 11 | 3: 5: println!("u: `{:?}", u); 12 | 1: 6:} 13 | -: 7: 14 | function _ZN27rust_code_coverage_sample_24mainE called 1 returned 100% blocks executed 100% 15 | -: 8:fn main() { 16 | 2: 9: let array = [1, 2, 3]; 17 | 1: 10: let vec = vec![1, 2, 3]; 18 | 1: 11: compare_types(&array, &vec); 19 | 2: 12:} 20 | -------------------------------------------------------------------------------- /test/rust/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/rust/main.rs -------------------------------------------------------------------------------- /test/rust/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/rust/src/main.rs -------------------------------------------------------------------------------- /test/sub/prova2.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/sub/prova2.gcda -------------------------------------------------------------------------------- /test/sub/prova2.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/sub/prova2.gcno -------------------------------------------------------------------------------- /test/sub/prova2.gcov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/sub/prova2.gcov -------------------------------------------------------------------------------- /test/sub2/RootAccessibleWrap.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/sub2/RootAccessibleWrap.gcda -------------------------------------------------------------------------------- /test/sub2/RootAccessibleWrap.gcno: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/sub2/RootAccessibleWrap.gcno -------------------------------------------------------------------------------- /test/test/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/test/main.rs -------------------------------------------------------------------------------- /test/zip_dir/Platform.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/zip_dir/Platform.gcda -------------------------------------------------------------------------------- /test/zip_dir/gcno.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/zip_dir/gcno.zip -------------------------------------------------------------------------------- /test/zip_dir/nsGnomeModule.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/zip_dir/nsGnomeModule.gcda -------------------------------------------------------------------------------- /test/zip_dir/nsMaiInterfaceDocument.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/zip_dir/nsMaiInterfaceDocument.gcda -------------------------------------------------------------------------------- /test/zip_dir/nsMaiInterfaceValue.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/zip_dir/nsMaiInterfaceValue.gcda -------------------------------------------------------------------------------- /test/zip_dir/sub/prova2.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/zip_dir/sub/prova2.gcda -------------------------------------------------------------------------------- /test/zip_dir/sub2/RootAccessibleWrap.gcda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/test/zip_dir/sub2/RootAccessibleWrap.gcda -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.out 2 | *.zip 3 | *.gcda 4 | *.gcno 5 | -------------------------------------------------------------------------------- /tests/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust:buster 2 | 3 | WORKDIR /grcov 4 | 5 | RUN apt-get update && apt-get install -y --no-install-recommends g++-7 clang-7 && rm -rf /var/lib/apt/lists/* 6 | 7 | # Fetch and build dependencies in a cachable step (hack until https://github.com/rust-lang/cargo/issues/2644 is fixed). 8 | COPY Cargo.toml Cargo.lock ./ 9 | RUN mkdir src/ && echo "fn main() {}" > src/main.rs && cargo build && rm target/debug/deps/grcov* && rm -r src/ 10 | 11 | COPY . . 12 | 13 | RUN cargo build 14 | 15 | ENV CLANG_CXX=clang++-7 16 | ENV GCC_CXX=g++-7 17 | ENV GCOV=gcov-7 18 | 19 | RUN cargo test 20 | -------------------------------------------------------------------------------- /tests/basic/expected_gcc.ade: -------------------------------------------------------------------------------- 1 | {"language":"c/c++","file":{"name":"main.c"},"method":{"covered":[3,5,6,7,10,15],"name":"main","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[11]}} 2 | {"language":"c/c++","file":{"covered":[3,5,6,7,10,15],"name":"main.c","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[11]},"is_file":true,"method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic/expected_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | -1, 13 | -1, 14 | 9, 15 | 0, 16 | -1, 17 | -1, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 85.71, 22 | "linesCovered": 6, 23 | "linesMissed": 1, 24 | "linesTotal": 7, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 85.71, 29 | "linesCovered": 6, 30 | "linesMissed": 1, 31 | "linesTotal": 7, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic/expected_gcc.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 1, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | null, 49 | null, 50 | 9, 51 | 0, 52 | null, 53 | null, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic/expected_llvm.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[3,5,6,7,8,10,13,15],"name":"main","percentage_covered":0.800000011920929,"total_covered":8,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[3,5,6,7,8,10,13,15],"name":"main.c","percentage_covered":0.800000011920929,"total_covered":8,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic/expected_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | 3, 13 | -1, 14 | 9, 15 | 0, 16 | 0, 17 | 9, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 80.0, 22 | "linesCovered": 8, 23 | "linesMissed": 2, 24 | "linesTotal": 10, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 80.0, 29 | "linesCovered": 8, 30 | "linesMissed": 2, 31 | "linesTotal": 10, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic/expected_llvm.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 1, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | 3, 49 | null, 50 | 9, 51 | 0, 52 | 0, 53 | 9, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic/expected_llvm_7.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[5,6,7,8,10,13,15],"name":"main","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[5,6,7,8,10,13,15],"name":"main.c","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic/expected_llvm_7.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | 3, 13 | -1, 14 | 9, 15 | 0, 16 | 0, 17 | 9, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 77.78, 22 | "linesCovered": 7, 23 | "linesMissed": 2, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 77.78, 29 | "linesCovered": 7, 30 | "linesMissed": 2, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic/expected_llvm_7.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | 3, 49 | null, 50 | 9, 51 | 0, 52 | 0, 53 | 9, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic/expected_llvm_mac.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[5,6,7,8,10,13,15],"name":"main","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[5,6,7,8,10,13,15],"name":"main.c","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic/expected_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | 3, 13 | -1, 14 | 9, 15 | 0, 16 | 0, 17 | 9, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 77.78, 22 | "linesCovered": 7, 23 | "linesMissed": 2, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 77.78, 29 | "linesCovered": 7, 30 | "linesMissed": 2, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic/expected_llvm_mac.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | 3, 49 | null, 50 | 9, 51 | 0, 52 | 0, 53 | 9, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | for (int i = 1; i < 10; i++) { 6 | if (i % 3 == 0) { 7 | printf ("%d is divisible by 3\n", i); 8 | } 9 | 10 | if (i % 11 == 0) { 11 | printf ("%d is divisible by 11\n", i); 12 | } 13 | } 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_gcc.ade: -------------------------------------------------------------------------------- 1 | {"language":"c/c++","file":{"name":"main.c"},"method":{"covered":[3,5,6,7,10,15],"name":"main","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[11]}} 2 | {"language":"c/c++","file":{"covered":[3,5,6,7,10,15],"name":"main.c","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[11]},"is_file":true,"method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | -1, 13 | -1, 14 | 9, 15 | 0, 16 | -1, 17 | -1, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 85.71, 22 | "linesCovered": 6, 23 | "linesMissed": 1, 24 | "linesTotal": 7, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 85.71, 29 | "linesCovered": 6, 30 | "linesMissed": 1, 31 | "linesTotal": 7, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_gcc.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 1, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | null, 49 | null, 50 | 9, 51 | 0, 52 | null, 53 | null, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_llvm.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[3,5,6,7,8,10,13,15],"name":"main","percentage_covered":0.800000011920929,"total_covered":8,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[3,5,6,7,8,10,13,15],"name":"main.c","percentage_covered":0.800000011920929,"total_covered":8,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | 3, 13 | -1, 14 | 9, 15 | 0, 16 | 0, 17 | 9, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 80.0, 22 | "linesCovered": 8, 23 | "linesMissed": 2, 24 | "linesTotal": 10, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 80.0, 29 | "linesCovered": 8, 30 | "linesMissed": 2, 31 | "linesTotal": 10, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_llvm.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 1, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | 3, 49 | null, 50 | 9, 51 | 0, 52 | 0, 53 | 9, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_llvm_7.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[5,6,7,8,10,13,15],"name":"main","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[5,6,7,8,10,13,15],"name":"main.c","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_llvm_7.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | 3, 13 | -1, 14 | 9, 15 | 0, 16 | 0, 17 | 9, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 77.78, 22 | "linesCovered": 7, 23 | "linesMissed": 2, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 77.78, 29 | "linesCovered": 7, 30 | "linesMissed": 2, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_llvm_7.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | 3, 49 | null, 50 | 9, 51 | 0, 52 | 0, 53 | 9, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_llvm_mac.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[5,6,7,8,10,13,15],"name":"main","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[5,6,7,8,10,13,15],"name":"main.c","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | 3, 13 | -1, 14 | 9, 15 | 0, 16 | 0, 17 | 9, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 77.78, 22 | "linesCovered": 7, 23 | "linesMissed": 2, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 77.78, 29 | "linesCovered": 7, 30 | "linesMissed": 2, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/expected_llvm_mac.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | 3, 49 | null, 50 | 9, 51 | 0, 52 | 0, 53 | 9, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_dir/foo_dir/bar_dir/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | for (int i = 1; i < 10; i++) { 6 | if (i % 3 == 0) { 7 | printf ("%d is divisible by 3\n", i); 8 | } 9 | 10 | if (i % 11 == 0) { 11 | printf ("%d is divisible by 11\n", i); 12 | } 13 | } 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_gcc.ade: -------------------------------------------------------------------------------- 1 | {"language":"c/c++","file":{"name":"main.c"},"method":{"covered":[3,5,6,7,10,15],"name":"main","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[11]}} 2 | {"language":"c/c++","file":{"covered":[3,5,6,7,10,15],"name":"main.c","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[11]},"is_file":true,"method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | -1, 13 | -1, 14 | 9, 15 | 0, 16 | -1, 17 | -1, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 85.71, 22 | "linesCovered": 6, 23 | "linesMissed": 1, 24 | "linesTotal": 7, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 85.71, 29 | "linesCovered": 6, 30 | "linesMissed": 1, 31 | "linesTotal": 7, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_gcc.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 1, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | null, 49 | null, 50 | 9, 51 | 0, 52 | null, 53 | null, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_llvm.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[3,5,6,7,8,10,13,15],"name":"main","percentage_covered":0.800000011920929,"total_covered":8,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[3,5,6,7,8,10,13,15],"name":"main.c","percentage_covered":0.800000011920929,"total_covered":8,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | 3, 13 | -1, 14 | 9, 15 | 0, 16 | 0, 17 | 9, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 80.0, 22 | "linesCovered": 8, 23 | "linesMissed": 2, 24 | "linesTotal": 10, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 80.0, 29 | "linesCovered": 8, 30 | "linesMissed": 2, 31 | "linesTotal": 10, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_llvm.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 1, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | 3, 49 | null, 50 | 9, 51 | 0, 52 | 0, 53 | 9, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_llvm_7.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[5,6,7,8,10,13,15],"name":"main","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[5,6,7,8,10,13,15],"name":"main.c","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_llvm_7.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | 3, 13 | -1, 14 | 9, 15 | 0, 16 | 0, 17 | 9, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 77.78, 22 | "linesCovered": 7, 23 | "linesMissed": 2, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 77.78, 29 | "linesCovered": 7, 30 | "linesMissed": 2, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_llvm_7.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | 3, 49 | null, 50 | 9, 51 | 0, 52 | 0, 53 | 9, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_llvm_mac.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[5,6,7,8,10,13,15],"name":"main","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[5,6,7,8,10,13,15],"name":"main.c","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 10, 10 | 9, 11 | 3, 12 | 3, 13 | -1, 14 | 9, 15 | 0, 16 | 0, 17 | 9, 18 | -1, 19 | 1 20 | ], 21 | "coveragePercent": 77.78, 22 | "linesCovered": 7, 23 | "linesMissed": 2, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 77.78, 29 | "linesCovered": 7, 30 | "linesMissed": 2, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_llvm_mac.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 10, 46 | 9, 47 | 3, 48 | 3, 49 | null, 50 | 9, 51 | 0, 52 | 0, 53 | 9, 54 | null, 55 | 1 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_no_gcda_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 0, 8 | -1, 9 | 0, 10 | 0, 11 | 0, 12 | -1, 13 | -1, 14 | 0, 15 | 0, 16 | -1, 17 | -1, 18 | -1, 19 | 0 20 | ], 21 | "coveragePercent": 0.0, 22 | "linesCovered": 0, 23 | "linesMissed": 7, 24 | "linesTotal": 7, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 0.0, 29 | "linesCovered": 0, 30 | "linesMissed": 7, 31 | "linesTotal": 7, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_no_gcda_gcc.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 0, 19 | 5, 20 | 0, 21 | 1, 22 | 0, 23 | 6, 24 | 0, 25 | 0, 26 | 0, 27 | 6, 28 | 0, 29 | 1, 30 | 0, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 0 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 0, 44 | null, 45 | 0, 46 | 0, 47 | 0, 48 | null, 49 | null, 50 | 0, 51 | 0, 52 | null, 53 | null, 54 | null, 55 | 0 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_no_gcda_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 0, 8 | -1, 9 | 0, 10 | 0, 11 | 0, 12 | 0, 13 | -1, 14 | 0, 15 | 0, 16 | 0, 17 | 0, 18 | -1, 19 | 0 20 | ], 21 | "coveragePercent": 0.0, 22 | "linesCovered": 0, 23 | "linesMissed": 10, 24 | "linesTotal": 10, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 0.0, 29 | "linesCovered": 0, 30 | "linesMissed": 10, 31 | "linesTotal": 10, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_no_gcda_llvm.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 0, 19 | 5, 20 | 0, 21 | 1, 22 | 0, 23 | 6, 24 | 0, 25 | 0, 26 | 0, 27 | 6, 28 | 0, 29 | 1, 30 | 0, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 0 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 0, 44 | null, 45 | 0, 46 | 0, 47 | 0, 48 | 0, 49 | null, 50 | 0, 51 | 0, 52 | 0, 53 | 0, 54 | null, 55 | 0 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_no_gcda_llvm_7.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 0, 10 | 0, 11 | 0, 12 | 0, 13 | -1, 14 | 0, 15 | 0, 16 | 0, 17 | 0, 18 | -1, 19 | 0 20 | ], 21 | "coveragePercent": 0.0, 22 | "linesCovered": 0, 23 | "linesMissed": 9, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 0.0, 29 | "linesCovered": 0, 30 | "linesMissed": 9, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_no_gcda_llvm_7.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 0, 19 | 5, 20 | 0, 21 | 1, 22 | 0, 23 | 6, 24 | 0, 25 | 0, 26 | 0, 27 | 6, 28 | 0, 29 | 1, 30 | 0, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 0 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 0, 46 | 0, 47 | 0, 48 | 0, 49 | null, 50 | 0, 51 | 0, 52 | 0, 53 | 0, 54 | null, 55 | 0 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_no_gcda_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 0, 10 | 0, 11 | 0, 12 | 0, 13 | -1, 14 | 0, 15 | 0, 16 | 0, 17 | 0, 18 | -1, 19 | 0 20 | ], 21 | "coveragePercent": 0.0, 22 | "linesCovered": 0, 23 | "linesMissed": 9, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 0.0, 29 | "linesCovered": 0, 30 | "linesMissed": 9, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_no_gcda_llvm_mac.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 0, 19 | 5, 20 | 0, 21 | 1, 22 | 0, 23 | 6, 24 | 0, 25 | 0, 26 | 0, 27 | 6, 28 | 0, 29 | 1, 30 | 0, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 0 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 0, 46 | 0, 47 | 0, 48 | 0, 49 | null, 50 | 0, 51 | 0, 52 | 0, 53 | 0, 54 | null, 55 | 0 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_two_gcda_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 2, 8 | -1, 9 | 20, 10 | 18, 11 | 6, 12 | -1, 13 | -1, 14 | 18, 15 | 0, 16 | -1, 17 | -1, 18 | -1, 19 | 2 20 | ], 21 | "coveragePercent": 85.71, 22 | "linesCovered": 6, 23 | "linesMissed": 1, 24 | "linesTotal": 7, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 85.71, 29 | "linesCovered": 6, 30 | "linesMissed": 1, 31 | "linesTotal": 7, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_two_gcda_gcc.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 2, 44 | null, 45 | 20, 46 | 18, 47 | 6, 48 | null, 49 | null, 50 | 18, 51 | 0, 52 | null, 53 | null, 54 | null, 55 | 2 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_two_gcda_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 2, 8 | -1, 9 | 20, 10 | 18, 11 | 6, 12 | 6, 13 | -1, 14 | 18, 15 | 0, 16 | 0, 17 | 18, 18 | -1, 19 | 2 20 | ], 21 | "coveragePercent": 80.0, 22 | "linesCovered": 8, 23 | "linesMissed": 2, 24 | "linesTotal": 10, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 80.0, 29 | "linesCovered": 8, 30 | "linesMissed": 2, 31 | "linesTotal": 10, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_two_gcda_llvm.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 2, 44 | null, 45 | 20, 46 | 18, 47 | 6, 48 | 6, 49 | null, 50 | 18, 51 | 0, 52 | 0, 53 | 18, 54 | null, 55 | 2 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_two_gcda_llvm_7.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 20, 10 | 18, 11 | 6, 12 | 6, 13 | -1, 14 | 18, 15 | 0, 16 | 0, 17 | 18, 18 | -1, 19 | 2 20 | ], 21 | "coveragePercent": 77.78, 22 | "linesCovered": 7, 23 | "linesMissed": 2, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 77.78, 29 | "linesCovered": 7, 30 | "linesMissed": 2, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_two_gcda_llvm_7.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 20, 46 | 18, 47 | 6, 48 | 6, 49 | null, 50 | 18, 51 | 0, 52 | 0, 53 | 18, 54 | null, 55 | 2 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_two_gcda_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 20, 10 | 18, 11 | 6, 12 | 6, 13 | -1, 14 | 18, 15 | 0, 16 | 0, 17 | 18, 18 | -1, 19 | 2 20 | ], 21 | "coveragePercent": 77.78, 22 | "linesCovered": 7, 23 | "linesMissed": 2, 24 | "linesTotal": 9, 25 | "name": "main.c" 26 | } 27 | }, 28 | "coveragePercent": 77.78, 29 | "linesCovered": 7, 30 | "linesMissed": 2, 31 | "linesTotal": 9, 32 | "name": "" 33 | } 34 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/expected_two_gcda_llvm_mac.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 10, 32 | 0, 33 | 0, 34 | 0, 35 | 10, 36 | 0, 37 | 1, 38 | 1 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 20, 46 | 18, 47 | 6, 48 | 6, 49 | null, 50 | 18, 51 | 0, 52 | 0, 53 | 18, 54 | null, 55 | 2 56 | ], 57 | "name": "main.c", 58 | "source_digest": "8c62b57cb7d17ca440f15f78b9661eae" 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /tests/basic_zip_zip/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | for (int i = 1; i < 10; i++) { 6 | if (i % 3 == 0) { 7 | printf ("%d is divisible by 3\n", i); 8 | } 9 | 10 | if (i % 11 == 0) { 11 | printf ("%d is divisible by 11\n", i); 12 | } 13 | } 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /tests/class/expected_gcc.ade: -------------------------------------------------------------------------------- 1 | {"language":"c/c++","file":{"name":"main.cpp"},"method":{"covered":[36],"name":"__static_initialization_and_destruction_0","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 2 | {"language":"c/c++","file":{"name":"main.cpp"},"method":{"covered":[24,26,28,29,31,35],"name":"main","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[32]}} 3 | {"language":"c/c++","file":{"name":"main.cpp"},"method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 4 | {"language":"c/c++","file":{"name":"main.cpp"},"method":{"covered":[36],"name":"_GLOBAL__sub_I_main","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 5 | {"language":"c/c++","file":{"name":"main.cpp"},"method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 6 | {"language":"c/c++","file":{"name":"main.cpp"},"method":{"covered":[12,13],"name":"Ciao::getName[abi:cxx11]","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 7 | {"language":"c/c++","file":{"name":"main.cpp"},"method":{"covered":[8,9,10],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 8 | {"language":"c/c++","file":{"name":"main.cpp"},"method":{"covered":[],"name":"Ciao::uncalled","percentage_covered":0.0,"total_covered":0,"total_uncovered":3,"uncovered":[16,17,18]}} 9 | {"language":"c/c++","file":{"covered":[6,8,9,10,12,13,24,26,28,29,31,35,36],"name":"main.cpp","percentage_covered":0.7647058963775635,"total_covered":13,"total_uncovered":4,"uncovered":[16,17,18,32]},"is_file":true,"method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 10 | -------------------------------------------------------------------------------- /tests/class/expected_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | 2, 11 | -1, 12 | 1, 13 | 1, 14 | 1, 15 | -1, 16 | 2, 17 | 2, 18 | -1, 19 | -1, 20 | 0, 21 | 0, 22 | 0, 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | -1, 30 | 2, 31 | -1, 32 | 1, 33 | 1, 34 | -1, 35 | 1, 36 | 0, 37 | -1, 38 | -1, 39 | 1, 40 | 3 41 | ], 42 | "coveragePercent": 76.47, 43 | "linesCovered": 13, 44 | "linesMissed": 4, 45 | "linesTotal": 17, 46 | "name": "main.cpp" 47 | } 48 | }, 49 | "coveragePercent": 76.47, 50 | "linesCovered": 13, 51 | "linesMissed": 4, 52 | "linesTotal": 17, 53 | "name": "" 54 | } 55 | -------------------------------------------------------------------------------- /tests/class/expected_gcc_10.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::uncalled()","percentage_covered":0.0,"total_covered":0,"total_uncovered":3,"uncovered":[16,17,18]}} 2 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[24,26,28,29,31,35],"name":"main","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[32]}} 3 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[8,9,10],"name":"Ciao::setName(std::__cxx11::basic_string, std::allocator >)","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[12,13],"name":"Ciao::getName[abi:cxx11]()","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"covered":[8,9,10,12,13,24,26,28,29,31,35],"name":"main.cpp","percentage_covered":0.7333333492279053,"total_covered":11,"total_uncovered":4,"uncovered":[16,17,18,32]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 6 | -------------------------------------------------------------------------------- /tests/class/expected_gcc_10.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | -1, 11 | -1, 12 | 1, 13 | 1, 14 | 1, 15 | -1, 16 | 2, 17 | 2, 18 | -1, 19 | -1, 20 | 0, 21 | 0, 22 | 0, 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | -1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | -1, 35 | 1, 36 | 0, 37 | -1, 38 | -1, 39 | 1 40 | ], 41 | "coveragePercent": 73.33, 42 | "linesCovered": 11, 43 | "linesMissed": 4, 44 | "linesTotal": 15, 45 | "name": "main.cpp" 46 | } 47 | }, 48 | "coveragePercent": 73.33, 49 | "linesCovered": 11, 50 | "linesMissed": 4, 51 | "linesTotal": 15, 52 | "name": "" 53 | } 54 | -------------------------------------------------------------------------------- /tests/class/expected_gcc_11.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::uncalled()","percentage_covered":0.0,"total_covered":0,"total_uncovered":3,"uncovered":[16,17,18]}} 2 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[24,26,28,29,31,35,36],"name":"main","percentage_covered":0.875,"total_covered":7,"total_uncovered":1,"uncovered":[32]}} 3 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[8,9,10],"name":"Ciao::setName(std::__cxx11::basic_string, std::allocator >)","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[12,13],"name":"Ciao::getName[abi:cxx11]()","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"covered":[8,9,10,12,13,24,26,28,29,31,35,36],"name":"main.cpp","percentage_covered":0.75,"total_covered":12,"total_uncovered":4,"uncovered":[16,17,18,32]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} -------------------------------------------------------------------------------- /tests/class/expected_gcc_11.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | -1, 11 | -1, 12 | 1, 13 | 1, 14 | 1, 15 | -1, 16 | 2, 17 | 2, 18 | -1, 19 | -1, 20 | 0, 21 | 0, 22 | 0, 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | -1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | -1, 35 | 1, 36 | 0, 37 | -1, 38 | -1, 39 | 1, 40 | 1 41 | ], 42 | "coveragePercent": 75.0, 43 | "linesCovered": 12, 44 | "linesMissed": 4, 45 | "linesTotal": 16, 46 | "name": "main.cpp" 47 | } 48 | }, 49 | "coveragePercent": 75.0, 50 | "linesCovered": 12, 51 | "linesMissed": 4, 52 | "linesTotal": 16, 53 | "name": "" 54 | } -------------------------------------------------------------------------------- /tests/class/expected_gcc_7.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | 2, 11 | -1, 12 | 1, 13 | 1, 14 | 1, 15 | -1, 16 | 2, 17 | 2, 18 | -1, 19 | -1, 20 | 0, 21 | 0, 22 | 0, 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | -1, 30 | 2, 31 | -1, 32 | 1, 33 | 1, 34 | -1, 35 | 1, 36 | 0, 37 | -1, 38 | -1, 39 | 1, 40 | 3 41 | ], 42 | "coveragePercent": 76.47, 43 | "linesCovered": 13, 44 | "linesMissed": 4, 45 | "linesTotal": 17, 46 | "name": "main.cpp" 47 | } 48 | }, 49 | "coveragePercent": 76.47, 50 | "linesCovered": 13, 51 | "linesMissed": 4, 52 | "linesTotal": 17, 53 | "name": "" 54 | } 55 | -------------------------------------------------------------------------------- /tests/class/expected_llvm.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[24,26,28,29,31,35,36],"name":"main","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[32,33]}} 2 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::uncalled","percentage_covered":0.0,"total_covered":0,"total_uncovered":3,"uncovered":[16,17,18]}} 5 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[8,9,10],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[12,13],"name":"Ciao::getName[abi:cxx11]","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"covered":[6,8,9,10,12,13,24,26,28,29,31,35,36],"name":"main.cpp","percentage_covered":0.7222222089767456,"total_covered":13,"total_uncovered":5,"uncovered":[16,17,18,32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 8 | -------------------------------------------------------------------------------- /tests/class/expected_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | 2, 11 | -1, 12 | 1, 13 | 1, 14 | 1, 15 | -1, 16 | 2, 17 | 2, 18 | -1, 19 | -1, 20 | 0, 21 | 0, 22 | 0, 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | -1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | -1, 35 | 1, 36 | 0, 37 | 0, 38 | -1, 39 | 1, 40 | 1 41 | ], 42 | "coveragePercent": 72.22, 43 | "linesCovered": 13, 44 | "linesMissed": 5, 45 | "linesTotal": 18, 46 | "name": "main.cpp" 47 | } 48 | }, 49 | "coveragePercent": 72.22, 50 | "linesCovered": 13, 51 | "linesMissed": 5, 52 | "linesTotal": 18, 53 | "name": "" 54 | } 55 | -------------------------------------------------------------------------------- /tests/class/expected_llvm_12.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::~Ciao","percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::Ciao","percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"__cxx_global_var_init","percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[24,26,28,29,31,35,36,74],"name":"main","percentage_covered":0.800000011920929,"total_covered":8,"total_uncovered":2,"uncovered":[32,33]}} 5 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[12,13],"name":"Ciao::getName[abi:cxx11]","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[8,9,10],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::uncalled","percentage_covered":0.0,"total_covered":0,"total_uncovered":3,"uncovered":[16,17,18]}} 8 | {"file":{"covered":[8,9,10,12,13,24,26,28,29,31,35,36,74],"name":"main.cpp","percentage_covered":0.7222222089767456,"total_covered":13,"total_uncovered":5,"uncovered":[16,17,18,32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} -------------------------------------------------------------------------------- /tests/class/expected_llvm_13.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::~Ciao","percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::Ciao","percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"__cxx_global_var_init","percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[24,26,28,29,31,35,36,74],"name":"main","percentage_covered":0.800000011920929,"total_covered":8,"total_uncovered":2,"uncovered":[32,33]}} 5 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[12,13],"name":"Ciao::getName[abi:cxx11]","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[8,9,10],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::uncalled","percentage_covered":0.0,"total_covered":0,"total_uncovered":3,"uncovered":[16,17,18]}} 8 | {"file":{"covered":[8,9,10,12,13,24,26,28,29,31,35,36,74],"name":"main.cpp","percentage_covered":0.7222222089767456,"total_covered":13,"total_uncovered":5,"uncovered":[16,17,18,32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} -------------------------------------------------------------------------------- /tests/class/expected_llvm_7_linux.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[26,28,29,31,35,36],"name":"main","percentage_covered":0.75,"total_covered":6,"total_uncovered":2,"uncovered":[32,33]}} 3 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[9,10],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::uncalled","percentage_covered":0.0,"total_covered":0,"total_uncovered":2,"uncovered":[17,18]}} 6 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[13],"name":"Ciao::getName[abi:cxx11]","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"covered":[6,9,10,13,26,28,29,31,35,36],"name":"main.cpp","percentage_covered":0.7142857313156128,"total_covered":10,"total_uncovered":4,"uncovered":[17,18,32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 8 | -------------------------------------------------------------------------------- /tests/class/expected_llvm_7_linux.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | 2, 11 | -1, 12 | -1, 13 | 1, 14 | 1, 15 | -1, 16 | -1, 17 | 2, 18 | -1, 19 | -1, 20 | -1, 21 | 0, 22 | 0, 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | -1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | -1, 35 | 1, 36 | 0, 37 | 0, 38 | -1, 39 | 1, 40 | 1 41 | ], 42 | "coveragePercent": 71.43, 43 | "linesCovered": 10, 44 | "linesMissed": 4, 45 | "linesTotal": 14, 46 | "name": "main.cpp" 47 | } 48 | }, 49 | "coveragePercent": 71.43, 50 | "linesCovered": 10, 51 | "linesMissed": 4, 52 | "linesTotal": 14, 53 | "name": "" 54 | } 55 | -------------------------------------------------------------------------------- /tests/class/expected_llvm_mac.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[26,28,29,31,35,36],"name":"main","percentage_covered":0.75,"total_covered":6,"total_uncovered":2,"uncovered":[32,33]}} 2 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[9,10],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[],"name":"Ciao::uncalled","percentage_covered":0.0,"total_covered":0,"total_uncovered":2,"uncovered":[17,18]}} 6 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[13],"name":"Ciao::getName","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 8 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 9 | {"file":{"covered":[6,9,10,13,26,28,29,31,35,36],"name":"main.cpp","percentage_covered":0.7142857313156128,"total_covered":10,"total_uncovered":4,"uncovered":[17,18,32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 10 | -------------------------------------------------------------------------------- /tests/class/expected_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | 4, 11 | -1, 12 | -1, 13 | 1, 14 | 1, 15 | -1, 16 | -1, 17 | 2, 18 | -1, 19 | -1, 20 | -1, 21 | 0, 22 | 0, 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | -1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | -1, 35 | 1, 36 | 0, 37 | 0, 38 | -1, 39 | 1, 40 | 1 41 | ], 42 | "coveragePercent": 71.43, 43 | "linesCovered": 10, 44 | "linesMissed": 4, 45 | "linesTotal": 14, 46 | "name": "main.cpp" 47 | } 48 | }, 49 | "coveragePercent": 71.43, 50 | "linesCovered": 10, 51 | "linesMissed": 4, 52 | "linesTotal": 14, 53 | "name": "" 54 | } 55 | -------------------------------------------------------------------------------- /tests/class/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | class Ciao { 7 | public: 8 | void setName(string n) { 9 | name = n; 10 | } 11 | 12 | string getName() { 13 | return name; 14 | } 15 | 16 | void uncalled() { 17 | cout << name; 18 | } 19 | 20 | private: 21 | string name; 22 | }; 23 | 24 | int main(void) 25 | { 26 | Ciao ciao; 27 | 28 | ciao.setName("Marco"); 29 | cout << ciao.getName() << endl; 30 | 31 | if (ciao.getName() == "marco") { 32 | ciao.uncalled(); 33 | } 34 | 35 | return 0; 36 | } 37 | -------------------------------------------------------------------------------- /tests/guess_single_file.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/grcov/ca5313f19eb7759addb0c5cf1b990678b8b68314/tests/guess_single_file.zip -------------------------------------------------------------------------------- /tests/include/expected_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | 1, 9 | 1, 10 | -1, 11 | 1, 12 | 1, 13 | 1, 14 | 3 15 | ], 16 | "coveragePercent": 100.0, 17 | "linesCovered": 7, 18 | "linesMissed": 0, 19 | "linesTotal": 7, 20 | "name": "file.cpp" 21 | }, 22 | "include.h": { 23 | "coverage": [ 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | 2, 30 | -1, 31 | -1, 32 | -1, 33 | 1, 34 | 1, 35 | 1 36 | ], 37 | "coveragePercent": 100.0, 38 | "linesCovered": 4, 39 | "linesMissed": 0, 40 | "linesTotal": 4, 41 | "name": "include.h" 42 | }, 43 | "main.cpp": { 44 | "coverage": [ 45 | -1, 46 | -1, 47 | 1, 48 | -1, 49 | 2, 50 | -1, 51 | 1, 52 | 2, 53 | -1, 54 | 1, 55 | 3 56 | ], 57 | "coveragePercent": 100.0, 58 | "linesCovered": 6, 59 | "linesMissed": 0, 60 | "linesTotal": 6, 61 | "name": "main.cpp" 62 | } 63 | }, 64 | "coveragePercent": 100.0, 65 | "linesCovered": 17, 66 | "linesMissed": 0, 67 | "linesTotal": 17, 68 | "name": "" 69 | } 70 | -------------------------------------------------------------------------------- /tests/include/expected_gcc_10.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[3,4,5],"name":"Ciao::setName(std::__cxx11::basic_string, std::allocator >)","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[7,8,9],"name":"Ciao::getName[abi:cxx11]()","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"covered":[3,4,5,7,8,9],"name":"file.cpp","percentage_covered":1.0,"total_covered":6,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[10,11,12],"name":"Ciao::calledFromFile()","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"covered":[10,11,12],"name":"include.h","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[3,5,7,8,10],"name":"main","percentage_covered":1.0,"total_covered":5,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"covered":[3,5,7,8,10],"name":"main.cpp","percentage_covered":1.0,"total_covered":5,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 8 | -------------------------------------------------------------------------------- /tests/include/expected_gcc_10.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | 1, 9 | 1, 10 | -1, 11 | 1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 6, 17 | "linesMissed": 0, 18 | "linesTotal": 6, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | -1, 30 | -1, 31 | -1, 32 | 1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 3, 38 | "linesMissed": 0, 39 | "linesTotal": 3, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | 1, 47 | -1, 48 | 2, 49 | -1, 50 | 1, 51 | 1, 52 | -1, 53 | 1 54 | ], 55 | "coveragePercent": 100.0, 56 | "linesCovered": 5, 57 | "linesMissed": 0, 58 | "linesTotal": 5, 59 | "name": "main.cpp" 60 | } 61 | }, 62 | "coveragePercent": 100.0, 63 | "linesCovered": 14, 64 | "linesMissed": 0, 65 | "linesTotal": 14, 66 | "name": "" 67 | } 68 | -------------------------------------------------------------------------------- /tests/include/expected_gcc_11.ade: -------------------------------------------------------------------------------- 1 | {"file": {"name": "file.cpp"},"language": "c/c++","method": {"covered": [3,4,5],"name": "Ciao::setName(std::__cxx11::basic_string, std::allocator >)","percentage_covered": 1.0,"total_covered": 3,"total_uncovered": 0,"uncovered": []}} 2 | {"file": {"name": "file.cpp"},"language": "c/c++","method": {"covered": [7,8,9],"name": "Ciao::getName[abi:cxx11]()","percentage_covered": 1.0,"total_covered": 3,"total_uncovered": 0,"uncovered": []}} 3 | {"file": {"covered": [3,4,5,7,8,9],"name": "file.cpp","percentage_covered": 1.0,"total_covered": 6,"total_uncovered": 0,"uncovered": []},"is_file": true,"language": "c/c++","method": {"covered": [],"percentage_covered": null,"total_covered": 0,"total_uncovered": 0,"uncovered": []}} 4 | {"file": {"name": "include.h"},"language": "c/c++","method": {"covered": [10,11,12],"name": "Ciao::calledFromFile()","percentage_covered": 1.0,"total_covered": 3,"total_uncovered": 0,"uncovered": []}} 5 | {"file": {"covered": [10,11,12],"name": "include.h","percentage_covered": 1.0,"total_covered": 3,"total_uncovered": 0,"uncovered": []},"is_file": true,"language": "c/c++","method": {"covered": [],"percentage_covered": null,"total_covered": 0,"total_uncovered": 0,"uncovered": []}} 6 | {"file": {"name": "main.cpp"},"language": "c/c++","method": {"covered": [3,5,7,8,10,11],"name": "main","percentage_covered": 1.0,"total_covered": 6,"total_uncovered": 0,"uncovered": []}} 7 | {"file": {"covered": [3,5,7,8,10,11],"name": "main.cpp","percentage_covered": 1.0,"total_covered": 6,"total_uncovered": 0,"uncovered": []},"is_file": true,"language": "c/c++","method": {"covered": [],"percentage_covered": null,"total_covered": 0,"total_uncovered": 0,"uncovered": []}} 8 | -------------------------------------------------------------------------------- /tests/include/expected_gcc_11.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | 1, 9 | 1, 10 | -1, 11 | 1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 6, 17 | "linesMissed": 0, 18 | "linesTotal": 6, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | -1, 30 | -1, 31 | -1, 32 | 1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 3, 38 | "linesMissed": 0, 39 | "linesTotal": 3, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | 1, 47 | -1, 48 | 1, 49 | -1, 50 | 1, 51 | 1, 52 | -1, 53 | 1, 54 | 1 55 | ], 56 | "coveragePercent": 100.0, 57 | "linesCovered": 6, 58 | "linesMissed": 0, 59 | "linesTotal": 6, 60 | "name": "main.cpp" 61 | } 62 | }, 63 | "coveragePercent": 100.0, 64 | "linesCovered": 15, 65 | "linesMissed": 0, 66 | "linesTotal": 15, 67 | "name": "" 68 | } -------------------------------------------------------------------------------- /tests/include/expected_gcc_11.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "author_email": "", 6 | "author_name": "", 7 | "committer_email": "", 8 | "committer_name": "", 9 | "id": "COMMIT", 10 | "message": "" 11 | }, 12 | "remotes": [ 13 | { 14 | "name": "origin", 15 | "url": "git@github.com:marco-c/grcov.git" 16 | } 17 | ] 18 | }, 19 | "parallel": false, 20 | "repo_token": "TOKEN", 21 | "service_job_id": "", 22 | "service_name": "", 23 | "service_number": "", 24 | "service_pull_request": "", 25 | "source_files": [ 26 | { 27 | "branches": [], 28 | "coverage": [ 29 | null, 30 | null, 31 | 1, 32 | 1, 33 | 1, 34 | null, 35 | 1, 36 | 1, 37 | 1 38 | ], 39 | "name": "file.cpp", 40 | "source_digest": "74a2a8e2849b4ebf97c08c3da0d83703" 41 | }, 42 | { 43 | "branches": [], 44 | "coverage": [ 45 | null, 46 | null, 47 | null, 48 | null, 49 | null, 50 | null, 51 | null, 52 | null, 53 | null, 54 | 1, 55 | 1, 56 | 1 57 | ], 58 | "name": "include.h", 59 | "source_digest": "d6261acc27f21cbf7b44654ef8db5be9" 60 | }, 61 | { 62 | "branches": [ 63 | 7, 64 | 0, 65 | 0, 66 | 1, 67 | 7, 68 | 0, 69 | 1, 70 | 0, 71 | 7, 72 | 0, 73 | 2, 74 | 1, 75 | 7, 76 | 0, 77 | 3, 78 | 0, 79 | 8, 80 | 0, 81 | 0, 82 | 1, 83 | 8, 84 | 0, 85 | 1, 86 | 0 87 | ], 88 | "coverage": [ 89 | null, 90 | null, 91 | 1, 92 | null, 93 | 1, 94 | null, 95 | 1, 96 | 1, 97 | null, 98 | 1, 99 | 1 100 | ], 101 | "name": "main.cpp", 102 | "source_digest": "3d6c13992a5a8f14b972702307216222" 103 | } 104 | ] 105 | } -------------------------------------------------------------------------------- /tests/include/expected_llvm.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[7,8,9],"name":"Ciao::getName[abi:cxx11]","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[3,4,5],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"covered":[3,4,5,7,8,9],"name":"file.cpp","percentage_covered":1.0,"total_covered":6,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[10,11,12],"name":"Ciao::calledFromFile","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"covered":[6,10,11,12],"name":"include.h","percentage_covered":1.0,"total_covered":4,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 8 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[3,5,7,8,10,11],"name":"main","percentage_covered":1.0,"total_covered":6,"total_uncovered":0,"uncovered":[]}} 9 | {"file":{"covered":[3,5,7,8,10,11],"name":"main.cpp","percentage_covered":1.0,"total_covered":6,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 10 | -------------------------------------------------------------------------------- /tests/include/expected_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | 1, 9 | 1, 10 | -1, 11 | 1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 6, 17 | "linesMissed": 0, 18 | "linesTotal": 6, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 2, 29 | -1, 30 | -1, 31 | -1, 32 | 1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 4, 38 | "linesMissed": 0, 39 | "linesTotal": 4, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | 1, 47 | -1, 48 | 1, 49 | -1, 50 | 1, 51 | 1, 52 | -1, 53 | 1, 54 | 1 55 | ], 56 | "coveragePercent": 100.0, 57 | "linesCovered": 6, 58 | "linesMissed": 0, 59 | "linesTotal": 6, 60 | "name": "main.cpp" 61 | } 62 | }, 63 | "coveragePercent": 100.0, 64 | "linesCovered": 16, 65 | "linesMissed": 0, 66 | "linesTotal": 16, 67 | "name": "" 68 | } 69 | -------------------------------------------------------------------------------- /tests/include/expected_llvm.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 7, 16 | 0, 17 | 0, 18 | 1, 19 | 7, 20 | 0, 21 | 1, 22 | 0, 23 | 7, 24 | 0, 25 | 2, 26 | 1, 27 | 7, 28 | 0, 29 | 3, 30 | 0, 31 | 8, 32 | 0, 33 | 0, 34 | 1, 35 | 8, 36 | 0, 37 | 1, 38 | 0 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | 1, 44 | null, 45 | 1, 46 | null, 47 | 1, 48 | 1, 49 | null, 50 | 1, 51 | 1 52 | ], 53 | "name": "main.cpp", 54 | "source_digest": "3d6c13992a5a8f14b972702307216222" 55 | }, 56 | { 57 | "branches": [], 58 | "coverage": [ 59 | null, 60 | null, 61 | 1, 62 | 1, 63 | 1, 64 | null, 65 | 1, 66 | 1, 67 | 1 68 | ], 69 | "name": "file.cpp", 70 | "source_digest": "74a2a8e2849b4ebf97c08c3da0d83703" 71 | }, 72 | { 73 | "branches": [], 74 | "coverage": [ 75 | null, 76 | null, 77 | null, 78 | null, 79 | null, 80 | 2, 81 | null, 82 | null, 83 | null, 84 | 1, 85 | 1, 86 | 1 87 | ], 88 | "name": "include.h", 89 | "source_digest": "d6261acc27f21cbf7b44654ef8db5be9" 90 | } 91 | ] 92 | } 93 | -------------------------------------------------------------------------------- /tests/include/expected_llvm_7_linux.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[11,12],"name":"Ciao::calledFromFile","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"covered":[6,11,12],"name":"include.h","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[5,7,8,10,11],"name":"main","percentage_covered":1.0,"total_covered":5,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"covered":[5,7,8,10,11],"name":"main.cpp","percentage_covered":1.0,"total_covered":5,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[4,5],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 8 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[8,9],"name":"Ciao::getName[abi:cxx11]","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 9 | {"file":{"covered":[4,5,8,9],"name":"file.cpp","percentage_covered":1.0,"total_covered":4,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 10 | -------------------------------------------------------------------------------- /tests/include/expected_llvm_7_linux.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | 1, 9 | 1, 10 | -1, 11 | -1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 4, 17 | "linesMissed": 0, 18 | "linesTotal": 4, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 2, 29 | -1, 30 | -1, 31 | -1, 32 | -1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 3, 38 | "linesMissed": 0, 39 | "linesTotal": 3, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | -1, 47 | -1, 48 | 1, 49 | -1, 50 | 1, 51 | 1, 52 | -1, 53 | 1, 54 | 1 55 | ], 56 | "coveragePercent": 100.0, 57 | "linesCovered": 5, 58 | "linesMissed": 0, 59 | "linesTotal": 5, 60 | "name": "main.cpp" 61 | } 62 | }, 63 | "coveragePercent": 100.0, 64 | "linesCovered": 12, 65 | "linesMissed": 0, 66 | "linesTotal": 12, 67 | "name": "" 68 | } 69 | -------------------------------------------------------------------------------- /tests/include/expected_llvm_7_linux.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 7, 16 | 0, 17 | 0, 18 | 1, 19 | 7, 20 | 0, 21 | 1, 22 | 0, 23 | 7, 24 | 0, 25 | 2, 26 | 1, 27 | 7, 28 | 0, 29 | 3, 30 | 0, 31 | 8, 32 | 0, 33 | 0, 34 | 1, 35 | 8, 36 | 0, 37 | 1, 38 | 0 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | 1, 46 | null, 47 | 1, 48 | 1, 49 | null, 50 | 1, 51 | 1 52 | ], 53 | "name": "main.cpp", 54 | "source_digest": "3d6c13992a5a8f14b972702307216222" 55 | }, 56 | { 57 | "branches": [], 58 | "coverage": [ 59 | null, 60 | null, 61 | null, 62 | null, 63 | null, 64 | 2, 65 | null, 66 | null, 67 | null, 68 | null, 69 | 1, 70 | 1 71 | ], 72 | "name": "include.h", 73 | "source_digest": "d6261acc27f21cbf7b44654ef8db5be9" 74 | }, 75 | { 76 | "branches": [], 77 | "coverage": [ 78 | null, 79 | null, 80 | null, 81 | 1, 82 | 1, 83 | null, 84 | null, 85 | 1, 86 | 1 87 | ], 88 | "name": "file.cpp", 89 | "source_digest": "74a2a8e2849b4ebf97c08c3da0d83703" 90 | } 91 | ] 92 | } 93 | -------------------------------------------------------------------------------- /tests/include/expected_llvm_mac.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[5,7,8,10,11],"name":"main","percentage_covered":1.0,"total_covered":5,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"covered":[5,7,8,10,11],"name":"main.cpp","percentage_covered":1.0,"total_covered":5,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[4,5],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[8,9],"name":"Ciao::getName","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"covered":[4,5,8,9],"name":"file.cpp","percentage_covered":1.0,"total_covered":4,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 8 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 9 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[11,12],"name":"Ciao::calledFromFile","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 10 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 11 | {"file":{"covered":[6,11,12],"name":"include.h","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 12 | -------------------------------------------------------------------------------- /tests/include/expected_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | 1, 9 | 1, 10 | -1, 11 | -1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 4, 17 | "linesMissed": 0, 18 | "linesTotal": 4, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 2, 29 | -1, 30 | -1, 31 | -1, 32 | -1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 3, 38 | "linesMissed": 0, 39 | "linesTotal": 3, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | -1, 47 | -1, 48 | 1, 49 | -1, 50 | 4, 51 | 1, 52 | -1, 53 | 1, 54 | 2 55 | ], 56 | "coveragePercent": 100.0, 57 | "linesCovered": 5, 58 | "linesMissed": 0, 59 | "linesTotal": 5, 60 | "name": "main.cpp" 61 | } 62 | }, 63 | "coveragePercent": 100.0, 64 | "linesCovered": 12, 65 | "linesMissed": 0, 66 | "linesTotal": 12, 67 | "name": "" 68 | } 69 | -------------------------------------------------------------------------------- /tests/include/file.cpp: -------------------------------------------------------------------------------- 1 | #include "include.h" 2 | 3 | void Ciao::setName(string n) { 4 | name = n; 5 | } 6 | 7 | string Ciao::getName() { 8 | calledFromFile(); 9 | return name; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /tests/include/include.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | class Ciao { 7 | public: 8 | void setName(string n); 9 | string getName(); 10 | void calledFromFile() { 11 | cout << name; 12 | } 13 | 14 | private: 15 | string name; 16 | }; 17 | -------------------------------------------------------------------------------- /tests/include/main.cpp: -------------------------------------------------------------------------------- 1 | #include "include.h" 2 | 3 | int main(void) 4 | { 5 | Ciao ciao; 6 | 7 | ciao.setName("marco"); 8 | string n = ciao.getName(); 9 | 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /tests/include2/expected_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | 1, 9 | 1, 10 | -1, 11 | 1, 12 | 1, 13 | 1, 14 | 3 15 | ], 16 | "coveragePercent": 100.0, 17 | "linesCovered": 7, 18 | "linesMissed": 0, 19 | "linesTotal": 7, 20 | "name": "file.cpp" 21 | }, 22 | "include.h": { 23 | "coverage": [ 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | 2, 30 | -1, 31 | -1, 32 | -1, 33 | 1, 34 | 1, 35 | 1 36 | ], 37 | "coveragePercent": 100.0, 38 | "linesCovered": 4, 39 | "linesMissed": 0, 40 | "linesTotal": 4, 41 | "name": "include.h" 42 | }, 43 | "main.cpp": { 44 | "coverage": [ 45 | -1, 46 | -1, 47 | 1, 48 | -1, 49 | 2, 50 | -1, 51 | 1, 52 | 2, 53 | -1, 54 | 1, 55 | 0, 56 | -1, 57 | -1, 58 | 1, 59 | 3 60 | ], 61 | "coveragePercent": 87.5, 62 | "linesCovered": 7, 63 | "linesMissed": 1, 64 | "linesTotal": 8, 65 | "name": "main.cpp" 66 | } 67 | }, 68 | "coveragePercent": 94.74, 69 | "linesCovered": 18, 70 | "linesMissed": 1, 71 | "linesTotal": 19, 72 | "name": "" 73 | } 74 | -------------------------------------------------------------------------------- /tests/include2/expected_gcc_10.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[3,4,5],"name":"Ciao::setName(std::__cxx11::basic_string, std::allocator >)","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[7,8,9],"name":"Ciao::getName[abi:cxx11]()","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"covered":[3,4,5,7,8,9],"name":"file.cpp","percentage_covered":1.0,"total_covered":6,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[10,11,12],"name":"Ciao::calledFromFile()","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"covered":[10,11,12],"name":"include.h","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[3,5,7,8,10,14],"name":"main","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[11]}} 7 | {"file":{"covered":[3,5,7,8,10,14],"name":"main.cpp","percentage_covered":0.8571428656578064,"total_covered":6,"total_uncovered":1,"uncovered":[11]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 8 | -------------------------------------------------------------------------------- /tests/include2/expected_gcc_10.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | 1, 9 | 1, 10 | -1, 11 | 1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 6, 17 | "linesMissed": 0, 18 | "linesTotal": 6, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | -1, 30 | -1, 31 | -1, 32 | 1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 3, 38 | "linesMissed": 0, 39 | "linesTotal": 3, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | 1, 47 | -1, 48 | 2, 49 | -1, 50 | 1, 51 | 1, 52 | -1, 53 | 1, 54 | 0, 55 | -1, 56 | -1, 57 | 1 58 | ], 59 | "coveragePercent": 85.71, 60 | "linesCovered": 6, 61 | "linesMissed": 1, 62 | "linesTotal": 7, 63 | "name": "main.cpp" 64 | } 65 | }, 66 | "coveragePercent": 93.75, 67 | "linesCovered": 15, 68 | "linesMissed": 1, 69 | "linesTotal": 16, 70 | "name": "" 71 | } 72 | -------------------------------------------------------------------------------- /tests/include2/expected_gcc_11.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[3,4,5],"name":"Ciao::setName(std::__cxx11::basic_string, std::allocator >)","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[7,8,9],"name":"Ciao::getName[abi:cxx11]()","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"covered":[3,4,5,7,8,9],"name":"file.cpp","percentage_covered":1.0,"total_covered":6,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[10,11,12],"name":"Ciao::calledFromFile()","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"covered":[10,11,12],"name":"include.h","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[3,5,7,8,10,14,15],"name":"main","percentage_covered":0.875,"total_covered":7,"total_uncovered":1,"uncovered":[11]}} 7 | {"file":{"covered":[3,5,7,8,10,14,15],"name":"main.cpp","percentage_covered":0.875,"total_covered":7,"total_uncovered":1,"uncovered":[11]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 8 | -------------------------------------------------------------------------------- /tests/include2/expected_gcc_11.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | 1, 9 | 1, 10 | -1, 11 | 1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 6, 17 | "linesMissed": 0, 18 | "linesTotal": 6, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | -1, 30 | -1, 31 | -1, 32 | 1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 3, 38 | "linesMissed": 0, 39 | "linesTotal": 3, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | 1, 47 | -1, 48 | 1, 49 | -1, 50 | 1, 51 | 1, 52 | -1, 53 | 1, 54 | 0, 55 | -1, 56 | -1, 57 | 1, 58 | 1 59 | ], 60 | "coveragePercent": 87.5, 61 | "linesCovered": 7, 62 | "linesMissed": 1, 63 | "linesTotal": 8, 64 | "name": "main.cpp" 65 | } 66 | }, 67 | "coveragePercent": 94.12, 68 | "linesCovered": 16, 69 | "linesMissed": 1, 70 | "linesTotal": 17, 71 | "name": "" 72 | } -------------------------------------------------------------------------------- /tests/include2/expected_gcc_7.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | 1, 9 | 1, 10 | -1, 11 | 1, 12 | 1, 13 | 1, 14 | 3 15 | ], 16 | "coveragePercent": 100.0, 17 | "linesCovered": 7, 18 | "linesMissed": 0, 19 | "linesTotal": 7, 20 | "name": "file.cpp" 21 | }, 22 | "include.h": { 23 | "coverage": [ 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | 2, 30 | -1, 31 | -1, 32 | -1, 33 | 1, 34 | 1, 35 | 1 36 | ], 37 | "coveragePercent": 100.0, 38 | "linesCovered": 4, 39 | "linesMissed": 0, 40 | "linesTotal": 4, 41 | "name": "include.h" 42 | }, 43 | "main.cpp": { 44 | "coverage": [ 45 | -1, 46 | -1, 47 | 1, 48 | -1, 49 | 2, 50 | -1, 51 | 1, 52 | 2, 53 | -1, 54 | 1, 55 | 0, 56 | -1, 57 | -1, 58 | 1, 59 | 3 60 | ], 61 | "coveragePercent": 87.5, 62 | "linesCovered": 7, 63 | "linesMissed": 1, 64 | "linesTotal": 8, 65 | "name": "main.cpp" 66 | } 67 | }, 68 | "coveragePercent": 94.74, 69 | "linesCovered": 18, 70 | "linesMissed": 1, 71 | "linesTotal": 19, 72 | "name": "" 73 | } 74 | -------------------------------------------------------------------------------- /tests/include2/expected_llvm.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[10,11,12],"name":"Ciao::calledFromFile","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"covered":[6,10,11,12],"name":"include.h","percentage_covered":1.0,"total_covered":4,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[7,8,9],"name":"Ciao::getName[abi:cxx11]","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[3,4,5],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"covered":[3,4,5,7,8,9],"name":"file.cpp","percentage_covered":1.0,"total_covered":6,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 8 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[3,5,7,8,10,14,15],"name":"main","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]}} 9 | {"file":{"covered":[3,5,7,8,10,14,15],"name":"main.cpp","percentage_covered":0.7777777910232544,"total_covered":7,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 10 | -------------------------------------------------------------------------------- /tests/include2/expected_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | 1, 9 | 1, 10 | -1, 11 | 1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 6, 17 | "linesMissed": 0, 18 | "linesTotal": 6, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 2, 29 | -1, 30 | -1, 31 | -1, 32 | 1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 4, 38 | "linesMissed": 0, 39 | "linesTotal": 4, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | 1, 47 | -1, 48 | 1, 49 | -1, 50 | 1, 51 | 1, 52 | -1, 53 | 1, 54 | 0, 55 | 0, 56 | -1, 57 | 1, 58 | 1 59 | ], 60 | "coveragePercent": 77.78, 61 | "linesCovered": 7, 62 | "linesMissed": 2, 63 | "linesTotal": 9, 64 | "name": "main.cpp" 65 | } 66 | }, 67 | "coveragePercent": 89.47, 68 | "linesCovered": 17, 69 | "linesMissed": 2, 70 | "linesTotal": 19, 71 | "name": "" 72 | } 73 | -------------------------------------------------------------------------------- /tests/include2/expected_llvm.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [{ 13 | "branches": [], 14 | "coverage": [null, null, null, null, null, 2, null, null, null, 1, 1, 1], 15 | "name": "include.h", 16 | "source_digest": "d6261acc27f21cbf7b44654ef8db5be9" 17 | }, { 18 | "branches": [7, 0, 0, 1, 7, 0, 1, 0, 7, 0, 2, 1, 7, 0, 3, 0, 8, 0, 0, 1, 8, 0, 1, 0, 10, 0, 0, 1, 10, 0, 1, 0, 10, 0, 2, 0, 10, 0, 3, 1, 11, 0, 0, 0, 11, 0, 1, 0], 19 | "coverage": [null, null, 1, null, 1, null, 1, 1, null, 1, 0, 0, null, 1, 1], 20 | "name": "main.cpp", 21 | "source_digest": "d68e8fe54f7c42b3e1cb8bd572ed62a7" 22 | }, { 23 | "branches": [], 24 | "coverage": [null, null, 1, 1, 1, null, 1, 1, 1], 25 | "name": "file.cpp", 26 | "source_digest": "74a2a8e2849b4ebf97c08c3da0d83703" 27 | }] 28 | } 29 | -------------------------------------------------------------------------------- /tests/include2/expected_llvm_7_linux.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[11,12],"name":"Ciao::calledFromFile","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"covered":[6,11,12],"name":"include.h","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[8,9],"name":"Ciao::getName[abi:cxx11]","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[4,5],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"covered":[4,5,8,9],"name":"file.cpp","percentage_covered":1.0,"total_covered":4,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 8 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[5,7,8,10,14,15],"name":"main","percentage_covered":0.75,"total_covered":6,"total_uncovered":2,"uncovered":[11,12]}} 9 | {"file":{"covered":[5,7,8,10,14,15],"name":"main.cpp","percentage_covered":0.75,"total_covered":6,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 10 | -------------------------------------------------------------------------------- /tests/include2/expected_llvm_7_linux.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | 1, 9 | 1, 10 | -1, 11 | -1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 4, 17 | "linesMissed": 0, 18 | "linesTotal": 4, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 2, 29 | -1, 30 | -1, 31 | -1, 32 | -1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 3, 38 | "linesMissed": 0, 39 | "linesTotal": 3, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | -1, 47 | -1, 48 | 1, 49 | -1, 50 | 1, 51 | 1, 52 | -1, 53 | 1, 54 | 0, 55 | 0, 56 | -1, 57 | 1, 58 | 1 59 | ], 60 | "coveragePercent": 75.0, 61 | "linesCovered": 6, 62 | "linesMissed": 2, 63 | "linesTotal": 8, 64 | "name": "main.cpp" 65 | } 66 | }, 67 | "coveragePercent": 86.67, 68 | "linesCovered": 13, 69 | "linesMissed": 2, 70 | "linesTotal": 15, 71 | "name": "" 72 | } 73 | -------------------------------------------------------------------------------- /tests/include2/expected_llvm_mac.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[5,7,8,10,14,15],"name":"main","percentage_covered":0.75,"total_covered":6,"total_uncovered":2,"uncovered":[11,12]}} 2 | {"file":{"covered":[5,7,8,10,14,15],"name":"main.cpp","percentage_covered":0.75,"total_covered":6,"total_uncovered":2,"uncovered":[11,12]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[11,12],"name":"Ciao::calledFromFile","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 7 | {"file":{"name":"include.h"},"language":"c/c++","method":{"covered":[6],"name":"Ciao::~Ciao","percentage_covered":1.0,"total_covered":1,"total_uncovered":0,"uncovered":[]}} 8 | {"file":{"covered":[6,11,12],"name":"include.h","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 9 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[4,5],"name":"Ciao::setName","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 10 | {"file":{"name":"file.cpp"},"language":"c/c++","method":{"covered":[8,9],"name":"Ciao::getName","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 11 | {"file":{"covered":[4,5,8,9],"name":"file.cpp","percentage_covered":1.0,"total_covered":4,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 12 | -------------------------------------------------------------------------------- /tests/include2/expected_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "file.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | 1, 9 | 1, 10 | -1, 11 | -1, 12 | 1, 13 | 1 14 | ], 15 | "coveragePercent": 100.0, 16 | "linesCovered": 4, 17 | "linesMissed": 0, 18 | "linesTotal": 4, 19 | "name": "file.cpp" 20 | }, 21 | "include.h": { 22 | "coverage": [ 23 | -1, 24 | -1, 25 | -1, 26 | -1, 27 | -1, 28 | 2, 29 | -1, 30 | -1, 31 | -1, 32 | -1, 33 | 1, 34 | 1 35 | ], 36 | "coveragePercent": 100.0, 37 | "linesCovered": 3, 38 | "linesMissed": 0, 39 | "linesTotal": 3, 40 | "name": "include.h" 41 | }, 42 | "main.cpp": { 43 | "coverage": [ 44 | -1, 45 | -1, 46 | -1, 47 | -1, 48 | 1, 49 | -1, 50 | 4, 51 | 1, 52 | -1, 53 | 2, 54 | 0, 55 | 0, 56 | -1, 57 | 1, 58 | 2 59 | ], 60 | "coveragePercent": 75.0, 61 | "linesCovered": 6, 62 | "linesMissed": 2, 63 | "linesTotal": 8, 64 | "name": "main.cpp" 65 | } 66 | }, 67 | "coveragePercent": 86.67, 68 | "linesCovered": 13, 69 | "linesMissed": 2, 70 | "linesTotal": 15, 71 | "name": "" 72 | } 73 | -------------------------------------------------------------------------------- /tests/include2/file.cpp: -------------------------------------------------------------------------------- 1 | #include "include.h" 2 | 3 | void Ciao::setName(string n) { 4 | name = n; 5 | } 6 | 7 | string Ciao::getName() { 8 | calledFromFile(); 9 | return name; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /tests/include2/include.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | class Ciao { 7 | public: 8 | void setName(string n); 9 | string getName(); 10 | void calledFromFile() { 11 | cout << name; 12 | } 13 | 14 | private: 15 | string name; 16 | }; 17 | -------------------------------------------------------------------------------- /tests/include2/main.cpp: -------------------------------------------------------------------------------- 1 | #include "include.h" 2 | 3 | int main(void) 4 | { 5 | Ciao ciao; 6 | 7 | ciao.setName("marco"); 8 | string n = ciao.getName(); 9 | 10 | if (n == "prova") { 11 | ciao.calledFromFile(); 12 | } 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /tests/rust/basic/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "basic" 3 | version = "0.1.0" 4 | authors = ["Marco Castelluccio "] 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /tests/rust/basic/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fmt::Debug; 2 | 3 | #[derive(Debug)] 4 | pub struct Ciao { 5 | pub saluto: String, 6 | } 7 | 8 | fn main() { 9 | let ciao = Ciao{ saluto: String::from("salve") }; 10 | 11 | assert!(ciao.saluto == "salve"); 12 | } 13 | -------------------------------------------------------------------------------- /tests/rust/hello_name/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hello_name" 3 | version = "0.1.0" 4 | edition = "2024" 5 | 6 | [dependencies] 7 | -------------------------------------------------------------------------------- /tests/rust/hello_name/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | if let Some(name) = std::env::args().skip(1).next() { 3 | println!("Hello, {name}"); 4 | } else { 5 | println!("Hello, world!"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/switch/expected_gcc.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[3,5,6,8,9,11,12,14,15,17,18,20,21,23,24,26,27,29,30,37],"name":"main","percentage_covered":0.9090909361839294,"total_covered":20,"total_uncovered":2,"uncovered":[32,33]}} 2 | {"file":{"covered":[3,5,6,8,9,11,12,14,15,17,18,20,21,23,24,26,27,29,30,37],"name":"main.c","percentage_covered":0.9090909361839294,"total_covered":20,"total_uncovered":2,"uncovered":[32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/switch/expected_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | -1, 12 | 1, 13 | 1, 14 | -1, 15 | 1, 16 | 1, 17 | -1, 18 | 1, 19 | 1, 20 | -1, 21 | 1, 22 | 1, 23 | -1, 24 | 1, 25 | 1, 26 | -1, 27 | 1, 28 | 1, 29 | -1, 30 | 1, 31 | 1, 32 | -1, 33 | 1, 34 | 1, 35 | -1, 36 | 0, 37 | 0, 38 | -1, 39 | -1, 40 | -1, 41 | 1 42 | ], 43 | "coveragePercent": 90.91, 44 | "linesCovered": 20, 45 | "linesMissed": 2, 46 | "linesTotal": 22, 47 | "name": "main.c" 48 | } 49 | }, 50 | "coveragePercent": 90.91, 51 | "linesCovered": 20, 52 | "linesMissed": 2, 53 | "linesTotal": 22, 54 | "name": "" 55 | } 56 | -------------------------------------------------------------------------------- /tests/switch/expected_gcc.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 6, 32 | 0, 33 | 2, 34 | 1, 35 | 6, 36 | 0, 37 | 3, 38 | 1, 39 | 6, 40 | 0, 41 | 4, 42 | 1, 43 | 6, 44 | 0, 45 | 5, 46 | 1, 47 | 6, 48 | 0, 49 | 6, 50 | 1, 51 | 6, 52 | 0, 53 | 7, 54 | 1, 55 | 6, 56 | 0, 57 | 8, 58 | 0, 59 | 6, 60 | 0, 61 | 9, 62 | 1 63 | ], 64 | "coverage": [ 65 | null, 66 | null, 67 | 1, 68 | null, 69 | 10, 70 | 9, 71 | null, 72 | 1, 73 | 1, 74 | null, 75 | 1, 76 | 1, 77 | null, 78 | 1, 79 | 1, 80 | null, 81 | 1, 82 | 1, 83 | null, 84 | 1, 85 | 1, 86 | null, 87 | 1, 88 | 1, 89 | null, 90 | 1, 91 | 1, 92 | null, 93 | 1, 94 | 1, 95 | null, 96 | 0, 97 | 0, 98 | null, 99 | null, 100 | null, 101 | 1 102 | ], 103 | "name": "main.c", 104 | "source_digest": "7618a0a118e267c1345e4f81260f4992" 105 | } 106 | ] 107 | } 108 | -------------------------------------------------------------------------------- /tests/switch/expected_gcc_10.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,37],"name":"main","percentage_covered":0.9032257795333862,"total_covered":28,"total_uncovered":3,"uncovered":[31,32,33]}} 2 | {"file":{"covered":[3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,37],"name":"main.c","percentage_covered":0.9032257795333862,"total_covered":28,"total_uncovered":3,"uncovered":[31,32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/switch/expected_gcc_10.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | 1, 12 | 1, 13 | 1, 14 | 1, 15 | 1, 16 | 1, 17 | 1, 18 | 1, 19 | 1, 20 | 1, 21 | 1, 22 | 1, 23 | 1, 24 | 1, 25 | 1, 26 | 1, 27 | 1, 28 | 1, 29 | 1, 30 | 1, 31 | 1, 32 | 1, 33 | 1, 34 | 1, 35 | 0, 36 | 0, 37 | 0, 38 | -1, 39 | -1, 40 | -1, 41 | 1 42 | ], 43 | "coveragePercent": 90.32, 44 | "linesCovered": 28, 45 | "linesMissed": 3, 46 | "linesTotal": 31, 47 | "name": "main.c" 48 | } 49 | }, 50 | "coveragePercent": 90.32, 51 | "linesCovered": 28, 52 | "linesMissed": 3, 53 | "linesTotal": 31, 54 | "name": "" 55 | } 56 | -------------------------------------------------------------------------------- /tests/switch/expected_gcc_11.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,37],"name":"main","percentage_covered":0.9032257795333862,"total_covered":28,"total_uncovered":3,"uncovered":[31,32,33]}} 2 | {"file":{"covered":[3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,37],"name":"main.c","percentage_covered":0.9032257795333862,"total_covered":28,"total_uncovered":3,"uncovered":[31,32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/switch/expected_gcc_11.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | 1, 12 | 1, 13 | 1, 14 | 1, 15 | 1, 16 | 1, 17 | 1, 18 | 1, 19 | 1, 20 | 1, 21 | 1, 22 | 1, 23 | 1, 24 | 1, 25 | 1, 26 | 1, 27 | 1, 28 | 1, 29 | 1, 30 | 1, 31 | 1, 32 | 1, 33 | 1, 34 | 1, 35 | 0, 36 | 0, 37 | 0, 38 | -1, 39 | -1, 40 | -1, 41 | 1 42 | ], 43 | "coveragePercent": 90.32, 44 | "linesCovered": 28, 45 | "linesMissed": 3, 46 | "linesTotal": 31, 47 | "name": "main.c" 48 | } 49 | }, 50 | "coveragePercent": 90.32, 51 | "linesCovered": 28, 52 | "linesMissed": 3, 53 | "linesTotal": 31, 54 | "name": "" 55 | } -------------------------------------------------------------------------------- /tests/switch/expected_gcc_7.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,37],"name":"main","percentage_covered":0.9032257795333862,"total_covered":28,"total_uncovered":3,"uncovered":[31,32,33]}} 2 | {"file":{"covered":[3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,37],"name":"main.c","percentage_covered":0.9032257795333862,"total_covered":28,"total_uncovered":3,"uncovered":[31,32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/switch/expected_gcc_7.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | 1, 12 | 1, 13 | 1, 14 | 1, 15 | 1, 16 | 1, 17 | 1, 18 | 1, 19 | 1, 20 | 1, 21 | 1, 22 | 1, 23 | 1, 24 | 1, 25 | 1, 26 | 1, 27 | 1, 28 | 1, 29 | 1, 30 | 1, 31 | 1, 32 | 1, 33 | 1, 34 | 1, 35 | 0, 36 | 0, 37 | 0, 38 | -1, 39 | -1, 40 | -1, 41 | 1 42 | ], 43 | "coveragePercent": 90.32, 44 | "linesCovered": 28, 45 | "linesMissed": 3, 46 | "linesTotal": 31, 47 | "name": "main.c" 48 | } 49 | }, 50 | "coveragePercent": 90.32, 51 | "linesCovered": 28, 52 | "linesMissed": 3, 53 | "linesTotal": 31, 54 | "name": "" 55 | } 56 | -------------------------------------------------------------------------------- /tests/switch/expected_gcc_7.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 6, 32 | 0, 33 | 2, 34 | 1, 35 | 6, 36 | 0, 37 | 3, 38 | 1, 39 | 6, 40 | 0, 41 | 4, 42 | 1, 43 | 6, 44 | 0, 45 | 5, 46 | 1, 47 | 6, 48 | 0, 49 | 6, 50 | 1, 51 | 6, 52 | 0, 53 | 7, 54 | 1, 55 | 6, 56 | 0, 57 | 8, 58 | 0, 59 | 6, 60 | 0, 61 | 9, 62 | 1 63 | ], 64 | "coverage": [ 65 | null, 66 | null, 67 | 1, 68 | null, 69 | 10, 70 | 9, 71 | 1, 72 | 1, 73 | 1, 74 | 1, 75 | 1, 76 | 1, 77 | 1, 78 | 1, 79 | 1, 80 | 1, 81 | 1, 82 | 1, 83 | 1, 84 | 1, 85 | 1, 86 | 1, 87 | 1, 88 | 1, 89 | 1, 90 | 1, 91 | 1, 92 | 1, 93 | 1, 94 | 1, 95 | 0, 96 | 0, 97 | 0, 98 | null, 99 | null, 100 | null, 101 | 1 102 | ], 103 | "name": "main.c", 104 | "source_digest": "7618a0a118e267c1345e4f81260f4992" 105 | } 106 | ] 107 | } 108 | -------------------------------------------------------------------------------- /tests/switch/expected_llvm.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[3,5,6,8,9,11,12,14,15,17,18,20,21,23,24,26,27,29,30,35,37],"name":"main","percentage_covered":0.91304349899292,"total_covered":21,"total_uncovered":2,"uncovered":[32,33]}} 2 | {"file":{"covered":[3,5,6,8,9,11,12,14,15,17,18,20,21,23,24,26,27,29,30,35,37],"name":"main.c","percentage_covered":0.91304349899292,"total_covered":21,"total_uncovered":2,"uncovered":[32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/switch/expected_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | 1, 8 | -1, 9 | 10, 10 | 9, 11 | -1, 12 | 1, 13 | 1, 14 | -1, 15 | 1, 16 | 1, 17 | -1, 18 | 1, 19 | 1, 20 | -1, 21 | 1, 22 | 1, 23 | -1, 24 | 1, 25 | 1, 26 | -1, 27 | 1, 28 | 1, 29 | -1, 30 | 1, 31 | 1, 32 | -1, 33 | 1, 34 | 1, 35 | -1, 36 | 0, 37 | 0, 38 | -1, 39 | 9, 40 | -1, 41 | 1 42 | ], 43 | "coveragePercent": 91.3, 44 | "linesCovered": 21, 45 | "linesMissed": 2, 46 | "linesTotal": 23, 47 | "name": "main.c" 48 | } 49 | }, 50 | "coveragePercent": 91.3, 51 | "linesCovered": 21, 52 | "linesMissed": 2, 53 | "linesTotal": 23, 54 | "name": "" 55 | } 56 | -------------------------------------------------------------------------------- /tests/switch/expected_llvm.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 6, 32 | 0, 33 | 2, 34 | 1, 35 | 6, 36 | 0, 37 | 3, 38 | 1, 39 | 6, 40 | 0, 41 | 4, 42 | 1, 43 | 6, 44 | 0, 45 | 5, 46 | 1, 47 | 6, 48 | 0, 49 | 6, 50 | 1, 51 | 6, 52 | 0, 53 | 7, 54 | 1, 55 | 6, 56 | 0, 57 | 8, 58 | 0, 59 | 6, 60 | 0, 61 | 9, 62 | 1 63 | ], 64 | "coverage": [ 65 | null, 66 | null, 67 | 1, 68 | null, 69 | 10, 70 | 9, 71 | null, 72 | 1, 73 | 1, 74 | null, 75 | 1, 76 | 1, 77 | null, 78 | 1, 79 | 1, 80 | null, 81 | 1, 82 | 1, 83 | null, 84 | 1, 85 | 1, 86 | null, 87 | 1, 88 | 1, 89 | null, 90 | 1, 91 | 1, 92 | null, 93 | 1, 94 | 1, 95 | null, 96 | 0, 97 | 0, 98 | null, 99 | 9, 100 | null, 101 | 1 102 | ], 103 | "name": "main.c", 104 | "source_digest": "7618a0a118e267c1345e4f81260f4992" 105 | } 106 | ] 107 | } 108 | -------------------------------------------------------------------------------- /tests/switch/expected_llvm_7.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[5,6,8,9,11,12,14,15,17,18,20,21,23,24,26,27,29,30,35,37],"name":"main","percentage_covered":0.9090909361839294,"total_covered":20,"total_uncovered":2,"uncovered":[32,33]}} 2 | {"file":{"covered":[5,6,8,9,11,12,14,15,17,18,20,21,23,24,26,27,29,30,35,37],"name":"main.c","percentage_covered":0.9090909361839294,"total_covered":20,"total_uncovered":2,"uncovered":[32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/switch/expected_llvm_7.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 10, 10 | 9, 11 | -1, 12 | 1, 13 | 1, 14 | -1, 15 | 1, 16 | 1, 17 | -1, 18 | 1, 19 | 1, 20 | -1, 21 | 1, 22 | 1, 23 | -1, 24 | 1, 25 | 1, 26 | -1, 27 | 1, 28 | 1, 29 | -1, 30 | 1, 31 | 1, 32 | -1, 33 | 1, 34 | 1, 35 | -1, 36 | 0, 37 | 0, 38 | -1, 39 | 17, 40 | -1, 41 | 1 42 | ], 43 | "coveragePercent": 90.91, 44 | "linesCovered": 20, 45 | "linesMissed": 2, 46 | "linesTotal": 22, 47 | "name": "main.c" 48 | } 49 | }, 50 | "coveragePercent": 90.91, 51 | "linesCovered": 20, 52 | "linesMissed": 2, 53 | "linesTotal": 22, 54 | "name": "" 55 | } 56 | -------------------------------------------------------------------------------- /tests/switch/expected_llvm_7.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 6, 32 | 0, 33 | 2, 34 | 1, 35 | 6, 36 | 0, 37 | 3, 38 | 1, 39 | 6, 40 | 0, 41 | 4, 42 | 1, 43 | 6, 44 | 0, 45 | 5, 46 | 1, 47 | 6, 48 | 0, 49 | 6, 50 | 1, 51 | 6, 52 | 0, 53 | 7, 54 | 1, 55 | 6, 56 | 0, 57 | 8, 58 | 0, 59 | 6, 60 | 0, 61 | 9, 62 | 1 63 | ], 64 | "coverage": [ 65 | null, 66 | null, 67 | null, 68 | null, 69 | 10, 70 | 17, 71 | null, 72 | 1, 73 | 1, 74 | null, 75 | 1, 76 | 1, 77 | null, 78 | 1, 79 | 1, 80 | null, 81 | 1, 82 | 1, 83 | null, 84 | 1, 85 | 1, 86 | null, 87 | 1, 88 | 1, 89 | null, 90 | 1, 91 | 1, 92 | null, 93 | 1, 94 | 1, 95 | null, 96 | 0, 97 | 0, 98 | null, 99 | 9, 100 | null, 101 | 1 102 | ], 103 | "name": "main.c", 104 | "source_digest": "7618a0a118e267c1345e4f81260f4992" 105 | } 106 | ] 107 | } 108 | -------------------------------------------------------------------------------- /tests/switch/expected_llvm_mac.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.c"},"language":"c/c++","method":{"covered":[5,6,8,9,11,12,14,15,17,18,20,21,23,24,26,27,29,30,35,37],"name":"main","percentage_covered":0.9090909361839294,"total_covered":20,"total_uncovered":2,"uncovered":[32,33]}} 2 | {"file":{"covered":[5,6,8,9,11,12,14,15,17,18,20,21,23,24,26,27,29,30,35,37],"name":"main.c","percentage_covered":0.9090909361839294,"total_covered":20,"total_uncovered":2,"uncovered":[32,33]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 3 | -------------------------------------------------------------------------------- /tests/switch/expected_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.c": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | 10, 10 | 9, 11 | -1, 12 | 1, 13 | 1, 14 | -1, 15 | 1, 16 | 1, 17 | -1, 18 | 1, 19 | 1, 20 | -1, 21 | 1, 22 | 1, 23 | -1, 24 | 1, 25 | 1, 26 | -1, 27 | 1, 28 | 1, 29 | -1, 30 | 1, 31 | 1, 32 | -1, 33 | 1, 34 | 1, 35 | -1, 36 | 0, 37 | 0, 38 | -1, 39 | 17, 40 | -1, 41 | 1 42 | ], 43 | "coveragePercent": 90.91, 44 | "linesCovered": 20, 45 | "linesMissed": 2, 46 | "linesTotal": 22, 47 | "name": "main.c" 48 | } 49 | }, 50 | "coveragePercent": 90.91, 51 | "linesCovered": 20, 52 | "linesMissed": 2, 53 | "linesTotal": 22, 54 | "name": "" 55 | } 56 | -------------------------------------------------------------------------------- /tests/switch/expected_llvm_mac.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 5, 16 | 0, 17 | 0, 18 | 1, 19 | 5, 20 | 0, 21 | 1, 22 | 1, 23 | 6, 24 | 0, 25 | 0, 26 | 1, 27 | 6, 28 | 0, 29 | 1, 30 | 1, 31 | 6, 32 | 0, 33 | 2, 34 | 1, 35 | 6, 36 | 0, 37 | 3, 38 | 1, 39 | 6, 40 | 0, 41 | 4, 42 | 1, 43 | 6, 44 | 0, 45 | 5, 46 | 1, 47 | 6, 48 | 0, 49 | 6, 50 | 1, 51 | 6, 52 | 0, 53 | 7, 54 | 1, 55 | 6, 56 | 0, 57 | 8, 58 | 0, 59 | 6, 60 | 0, 61 | 9, 62 | 1 63 | ], 64 | "coverage": [ 65 | null, 66 | null, 67 | null, 68 | null, 69 | 10, 70 | 9, 71 | null, 72 | 1, 73 | 1, 74 | null, 75 | 1, 76 | 1, 77 | null, 78 | 1, 79 | 1, 80 | null, 81 | 1, 82 | 1, 83 | null, 84 | 1, 85 | 1, 86 | null, 87 | 1, 88 | 1, 89 | null, 90 | 1, 91 | 1, 92 | null, 93 | 1, 94 | 1, 95 | null, 96 | 0, 97 | 0, 98 | null, 99 | 17, 100 | null, 101 | 1 102 | ], 103 | "name": "main.c", 104 | "source_digest": "7618a0a118e267c1345e4f81260f4992" 105 | } 106 | ] 107 | } 108 | -------------------------------------------------------------------------------- /tests/switch/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(void) 4 | { 5 | for (int i = 1; i < 10; i++) { 6 | switch (i) { 7 | case 1: 8 | printf("1"); 9 | break; 10 | case 2: 11 | printf("2"); 12 | break; 13 | case 3: 14 | printf("3"); 15 | break; 16 | case 4: 17 | printf("4"); 18 | break; 19 | case 5: 20 | printf("5"); 21 | break; 22 | case 6: 23 | printf("6"); 24 | break; 25 | case 8: 26 | printf("8"); 27 | break; 28 | case 9: 29 | printf("9"); 30 | break; 31 | case 10: 32 | printf("10"); 33 | break; 34 | } 35 | } 36 | 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /tests/template/expected_gcc.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | 4, 11 | -1, 12 | -1, 13 | -1, 14 | -1, 15 | 1, 16 | 1, 17 | 1, 18 | -1, 19 | 1, 20 | 1, 21 | -1, 22 | -1, 23 | 2, 24 | 2, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | 2, 30 | 2, 31 | -1, 32 | 1, 33 | 1, 34 | 1, 35 | 1, 36 | 1 37 | ], 38 | "coveragePercent": 100.0, 39 | "linesCovered": 16, 40 | "linesMissed": 0, 41 | "linesTotal": 16, 42 | "name": "main.cpp" 43 | } 44 | }, 45 | "coveragePercent": 100.0, 46 | "linesCovered": 16, 47 | "linesMissed": 0, 48 | "linesTotal": 16, 49 | "name": "" 50 | } 51 | -------------------------------------------------------------------------------- /tests/template/expected_gcc.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 28, 16 | 0, 17 | 0, 18 | 1, 19 | 28, 20 | 0, 21 | 1, 22 | 0, 23 | 28, 24 | 0, 25 | 2, 26 | 1, 27 | 28, 28 | 0, 29 | 3, 30 | 0, 31 | 29, 32 | 0, 33 | 0, 34 | 1, 35 | 29, 36 | 0, 37 | 1, 38 | 0 39 | ], 40 | "coverage": [ 41 | null, 42 | null, 43 | null, 44 | null, 45 | null, 46 | 4, 47 | null, 48 | null, 49 | null, 50 | null, 51 | 1, 52 | 1, 53 | 1, 54 | null, 55 | 1, 56 | 1, 57 | null, 58 | null, 59 | 2, 60 | 2, 61 | null, 62 | null, 63 | null, 64 | 1, 65 | 2, 66 | 2, 67 | null, 68 | 1, 69 | 1, 70 | 1, 71 | 1, 72 | 1 73 | ], 74 | "name": "main.cpp", 75 | "source_digest": "38c9d0dc1aeb326b6b93a6843c8ca936" 76 | } 77 | ] 78 | } 79 | -------------------------------------------------------------------------------- /tests/template/expected_gcc_10.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[15,16],"name":"Ciao, std::allocator > >::get()","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[11,12,13],"name":"Ciao, std::allocator > >::set(std::__cxx11::basic_string, std::allocator >)","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[19,20],"name":"Ciao, std::allocator > >::get2()","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[24,25,26,28,29,30,31,32],"name":"main","percentage_covered":1.0,"total_covered":8,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[19,20],"name":"Ciao, std::allocator > >::get2()","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"covered":[11,12,13,15,16,19,20,24,25,26,28,29,30,31,32],"name":"main.cpp","percentage_covered":1.0,"total_covered":15,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} 7 | -------------------------------------------------------------------------------- /tests/template/expected_gcc_10.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | -1, 11 | -1, 12 | -1, 13 | -1, 14 | -1, 15 | 1, 16 | 1, 17 | 1, 18 | -1, 19 | 1, 20 | 1, 21 | -1, 22 | -1, 23 | 1, 24 | 1, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | 2, 30 | 2, 31 | -1, 32 | 1, 33 | 1, 34 | 1, 35 | 1, 36 | 1 37 | ], 38 | "coveragePercent": 100.0, 39 | "linesCovered": 15, 40 | "linesMissed": 0, 41 | "linesTotal": 15, 42 | "name": "main.cpp" 43 | } 44 | }, 45 | "coveragePercent": 100.0, 46 | "linesCovered": 15, 47 | "linesMissed": 0, 48 | "linesTotal": 15, 49 | "name": "" 50 | } 51 | -------------------------------------------------------------------------------- /tests/template/expected_gcc_11.ade: -------------------------------------------------------------------------------- 1 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[15,16],"name":"Ciao, std::allocator > >::get()","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 2 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[11,12,13],"name":"Ciao, std::allocator > >::set(std::__cxx11::basic_string, std::allocator >)","percentage_covered":1.0,"total_covered":3,"total_uncovered":0,"uncovered":[]}} 3 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[19,20],"name":"Ciao, std::allocator > >::get2()","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 4 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[24,25,26,28,29,30,31,32],"name":"main","percentage_covered":1.0,"total_covered":8,"total_uncovered":0,"uncovered":[]}} 5 | {"file":{"name":"main.cpp"},"language":"c/c++","method":{"covered":[19,20],"name":"Ciao, std::allocator > >::get2()","percentage_covered":1.0,"total_covered":2,"total_uncovered":0,"uncovered":[]}} 6 | {"file":{"covered":[11,12,13,15,16,19,20,24,25,26,28,29,30,31,32],"name":"main.cpp","percentage_covered":1.0,"total_covered":15,"total_uncovered":0,"uncovered":[]},"is_file":true,"language":"c/c++","method":{"covered":[],"percentage_covered":null,"total_covered":0,"total_uncovered":0,"uncovered":[]}} -------------------------------------------------------------------------------- /tests/template/expected_gcc_11.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | -1, 11 | -1, 12 | -1, 13 | -1, 14 | -1, 15 | 1, 16 | 1, 17 | 1, 18 | -1, 19 | 1, 20 | 1, 21 | -1, 22 | -1, 23 | 1, 24 | 1, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | 1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | 1, 35 | 1, 36 | 1 37 | ], 38 | "coveragePercent": 100.0, 39 | "linesCovered": 15, 40 | "linesMissed": 0, 41 | "linesTotal": 15, 42 | "name": "main.cpp" 43 | } 44 | }, 45 | "coveragePercent": 100.0, 46 | "linesCovered": 15, 47 | "linesMissed": 0, 48 | "linesTotal": 15, 49 | "name": "" 50 | } -------------------------------------------------------------------------------- /tests/template/expected_gcc_11.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "author_email": "", 6 | "author_name": "", 7 | "committer_email": "", 8 | "committer_name": "", 9 | "id": "COMMIT", 10 | "message": "" 11 | }, 12 | "remotes": [ 13 | { 14 | "name": "origin", 15 | "url": "git@github.com:marco-c/grcov.git" 16 | } 17 | ] 18 | }, 19 | "parallel": false, 20 | "repo_token": "TOKEN", 21 | "service_job_id": "", 22 | "service_name": "", 23 | "service_number": "", 24 | "service_pull_request": "", 25 | "source_files": [ 26 | { 27 | "branches": [ 28 | 28, 29 | 0, 30 | 0, 31 | 1, 32 | 28, 33 | 0, 34 | 1, 35 | 0, 36 | 28, 37 | 0, 38 | 2, 39 | 1, 40 | 28, 41 | 0, 42 | 3, 43 | 0, 44 | 29, 45 | 0, 46 | 0, 47 | 1, 48 | 29, 49 | 0, 50 | 1, 51 | 0 52 | ], 53 | "coverage": [ 54 | null, 55 | null, 56 | null, 57 | null, 58 | null, 59 | null, 60 | null, 61 | null, 62 | null, 63 | null, 64 | 1, 65 | 1, 66 | 1, 67 | null, 68 | 1, 69 | 1, 70 | null, 71 | null, 72 | 1, 73 | 1, 74 | null, 75 | null, 76 | null, 77 | 1, 78 | 1, 79 | 1, 80 | null, 81 | 1, 82 | 1, 83 | 1, 84 | 1, 85 | 1 86 | ], 87 | "name": "main.cpp", 88 | "source_digest": "38c9d0dc1aeb326b6b93a6843c8ca936" 89 | } 90 | ] 91 | } -------------------------------------------------------------------------------- /tests/template/expected_llvm.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | 4, 11 | -1, 12 | -1, 13 | -1, 14 | -1, 15 | 1, 16 | 1, 17 | 1, 18 | -1, 19 | 1, 20 | 1, 21 | -1, 22 | -1, 23 | 2, 24 | 2, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | 1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | 1, 35 | 1, 36 | 1 37 | ], 38 | "coveragePercent": 100.0, 39 | "linesCovered": 16, 40 | "linesMissed": 0, 41 | "linesTotal": 16, 42 | "name": "main.cpp" 43 | } 44 | }, 45 | "coveragePercent": 100.0, 46 | "linesCovered": 16, 47 | "linesMissed": 0, 48 | "linesTotal": 16, 49 | "name": "" 50 | } 51 | -------------------------------------------------------------------------------- /tests/template/expected_llvm.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 28, 16 | 0, 17 | 0, 18 | 1, 19 | 28, 20 | 0, 21 | 1, 22 | 0, 23 | 28, 24 | 0, 25 | 2, 26 | 1, 27 | 28, 28 | 0, 29 | 3, 30 | 0, 31 | 29, 32 | 0, 33 | 0, 34 | 1, 35 | 29, 36 | 0, 37 | 1, 38 | 0, 39 | 30, 40 | 0, 41 | 0, 42 | 1, 43 | 30, 44 | 0, 45 | 1, 46 | 0, 47 | 31, 48 | 0, 49 | 0, 50 | 1, 51 | 31, 52 | 0, 53 | 1, 54 | 0 55 | ], 56 | "coverage": [ 57 | null, 58 | null, 59 | null, 60 | null, 61 | null, 62 | 4, 63 | null, 64 | null, 65 | null, 66 | null, 67 | 1, 68 | 1, 69 | 1, 70 | null, 71 | 1, 72 | 1, 73 | null, 74 | null, 75 | 2, 76 | 2, 77 | null, 78 | null, 79 | null, 80 | 1, 81 | 1, 82 | 1, 83 | null, 84 | 1, 85 | 1, 86 | 1, 87 | 1, 88 | 1 89 | ], 90 | "name": "main.cpp", 91 | "source_digest": "38c9d0dc1aeb326b6b93a6843c8ca936" 92 | } 93 | ] 94 | } 95 | -------------------------------------------------------------------------------- /tests/template/expected_llvm_12.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | -1, 11 | -1, 12 | -1, 13 | -1, 14 | -1, 15 | 1, 16 | 1, 17 | 1, 18 | -1, 19 | 1, 20 | 1, 21 | -1, 22 | -1, 23 | 2, 24 | 2, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | 1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | 1, 35 | 1, 36 | 1 37 | ], 38 | "coveragePercent": 100.0, 39 | "linesCovered": 15, 40 | "linesMissed": 0, 41 | "linesTotal": 15, 42 | "name": "main.cpp" 43 | } 44 | }, 45 | "coveragePercent": 100.0, 46 | "linesCovered": 15, 47 | "linesMissed": 0, 48 | "linesTotal": 15, 49 | "name": "" 50 | } -------------------------------------------------------------------------------- /tests/template/expected_llvm_12.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "author_email": "", 6 | "author_name": "", 7 | "committer_email": "", 8 | "committer_name": "", 9 | "id": "COMMIT", 10 | "message": "" 11 | }, 12 | "remotes": [ 13 | { 14 | "name": "origin", 15 | "url": "git@github.com:marco-c/grcov.git" 16 | } 17 | ] 18 | }, 19 | "parallel": false, 20 | "repo_token": "TOKEN", 21 | "service_job_id": "", 22 | "service_name": "", 23 | "service_number": "", 24 | "service_pull_request": "", 25 | "source_files": [ 26 | { 27 | "branches": [ 28 | 28, 29 | 0, 30 | 0, 31 | 1, 32 | 28, 33 | 0, 34 | 1, 35 | 0, 36 | 28, 37 | 0, 38 | 2, 39 | 1, 40 | 28, 41 | 0, 42 | 3, 43 | 0, 44 | 29, 45 | 0, 46 | 0, 47 | 1, 48 | 29, 49 | 0, 50 | 1, 51 | 0, 52 | 30, 53 | 0, 54 | 0, 55 | 1, 56 | 30, 57 | 0, 58 | 1, 59 | 0, 60 | 31, 61 | 0, 62 | 0, 63 | 1, 64 | 31, 65 | 0, 66 | 1, 67 | 0 68 | ], 69 | "coverage": [ 70 | null, 71 | null, 72 | null, 73 | null, 74 | null, 75 | null, 76 | null, 77 | null, 78 | null, 79 | null, 80 | 1, 81 | 1, 82 | 1, 83 | null, 84 | 1, 85 | 1, 86 | null, 87 | null, 88 | 2, 89 | 2, 90 | null, 91 | null, 92 | null, 93 | 1, 94 | 1, 95 | 1, 96 | null, 97 | 1, 98 | 1, 99 | 1, 100 | 1, 101 | 1 102 | ], 103 | "name": "main.cpp", 104 | "source_digest": "38c9d0dc1aeb326b6b93a6843c8ca936" 105 | } 106 | ] 107 | } -------------------------------------------------------------------------------- /tests/template/expected_llvm_13.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | -1, 11 | -1, 12 | -1, 13 | -1, 14 | -1, 15 | 1, 16 | 1, 17 | 1, 18 | -1, 19 | 1, 20 | 1, 21 | -1, 22 | -1, 23 | 2, 24 | 2, 25 | -1, 26 | -1, 27 | -1, 28 | 1, 29 | 1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | 1, 35 | 1, 36 | 1 37 | ], 38 | "coveragePercent": 100.0, 39 | "linesCovered": 15, 40 | "linesMissed": 0, 41 | "linesTotal": 15, 42 | "name": "main.cpp" 43 | } 44 | }, 45 | "coveragePercent": 100.0, 46 | "linesCovered": 15, 47 | "linesMissed": 0, 48 | "linesTotal": 15, 49 | "name": "" 50 | } -------------------------------------------------------------------------------- /tests/template/expected_llvm_13.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "author_email": "", 6 | "author_name": "", 7 | "committer_email": "", 8 | "committer_name": "", 9 | "id": "COMMIT", 10 | "message": "" 11 | }, 12 | "remotes": [ 13 | { 14 | "name": "origin", 15 | "url": "git@github.com:marco-c/grcov.git" 16 | } 17 | ] 18 | }, 19 | "parallel": false, 20 | "repo_token": "TOKEN", 21 | "service_job_id": "", 22 | "service_name": "", 23 | "service_number": "", 24 | "service_pull_request": "", 25 | "source_files": [ 26 | { 27 | "branches": [ 28 | 28, 29 | 0, 30 | 0, 31 | 1, 32 | 28, 33 | 0, 34 | 1, 35 | 0, 36 | 28, 37 | 0, 38 | 2, 39 | 1, 40 | 28, 41 | 0, 42 | 3, 43 | 0, 44 | 29, 45 | 0, 46 | 0, 47 | 1, 48 | 29, 49 | 0, 50 | 1, 51 | 0, 52 | 30, 53 | 0, 54 | 0, 55 | 1, 56 | 30, 57 | 0, 58 | 1, 59 | 0, 60 | 31, 61 | 0, 62 | 0, 63 | 1, 64 | 31, 65 | 0, 66 | 1, 67 | 0 68 | ], 69 | "coverage": [ 70 | null, 71 | null, 72 | null, 73 | null, 74 | null, 75 | null, 76 | null, 77 | null, 78 | null, 79 | null, 80 | 1, 81 | 1, 82 | 1, 83 | null, 84 | 1, 85 | 1, 86 | null, 87 | null, 88 | 2, 89 | 2, 90 | null, 91 | null, 92 | null, 93 | 1, 94 | 1, 95 | 1, 96 | null, 97 | 1, 98 | 1, 99 | 1, 100 | 1, 101 | 1 102 | ], 103 | "name": "main.cpp", 104 | "source_digest": "38c9d0dc1aeb326b6b93a6843c8ca936" 105 | } 106 | ] 107 | } -------------------------------------------------------------------------------- /tests/template/expected_llvm_7_linux.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | 4, 11 | -1, 12 | -1, 13 | -1, 14 | -1, 15 | -1, 16 | 1, 17 | 1, 18 | -1, 19 | -1, 20 | 1, 21 | -1, 22 | -1, 23 | -1, 24 | 2, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | 1, 30 | 1, 31 | -1, 32 | 1, 33 | 1, 34 | 1, 35 | 1, 36 | 1 37 | ], 38 | "coveragePercent": 100.0, 39 | "linesCovered": 12, 40 | "linesMissed": 0, 41 | "linesTotal": 12, 42 | "name": "main.cpp" 43 | } 44 | }, 45 | "coveragePercent": 100.0, 46 | "linesCovered": 12, 47 | "linesMissed": 0, 48 | "linesTotal": 12, 49 | "name": "" 50 | } 51 | -------------------------------------------------------------------------------- /tests/template/expected_llvm_7_linux.coveralls: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "branch": "master", 4 | "head": { 5 | "id": "COMMIT" 6 | } 7 | }, 8 | "repo_token": "TOKEN", 9 | "service_job_id": "", 10 | "service_name": "", 11 | "service_number": "", 12 | "source_files": [ 13 | { 14 | "branches": [ 15 | 28, 16 | 0, 17 | 0, 18 | 1, 19 | 28, 20 | 0, 21 | 1, 22 | 0, 23 | 28, 24 | 0, 25 | 2, 26 | 1, 27 | 28, 28 | 0, 29 | 3, 30 | 0, 31 | 29, 32 | 0, 33 | 0, 34 | 1, 35 | 29, 36 | 0, 37 | 1, 38 | 0, 39 | 30, 40 | 0, 41 | 0, 42 | 1, 43 | 30, 44 | 0, 45 | 1, 46 | 0, 47 | 31, 48 | 0, 49 | 0, 50 | 1, 51 | 31, 52 | 0, 53 | 1, 54 | 0 55 | ], 56 | "coverage": [ 57 | null, 58 | null, 59 | null, 60 | null, 61 | null, 62 | 4, 63 | null, 64 | null, 65 | null, 66 | null, 67 | null, 68 | 1, 69 | 1, 70 | null, 71 | null, 72 | 1, 73 | null, 74 | null, 75 | null, 76 | 2, 77 | null, 78 | null, 79 | null, 80 | null, 81 | 1, 82 | 1, 83 | null, 84 | 1, 85 | 1, 86 | 1, 87 | 1, 88 | 1 89 | ], 90 | "name": "main.cpp", 91 | "source_digest": "38c9d0dc1aeb326b6b93a6843c8ca936" 92 | } 93 | ] 94 | } 95 | -------------------------------------------------------------------------------- /tests/template/expected_llvm_mac.covdir: -------------------------------------------------------------------------------- 1 | { 2 | "children": { 3 | "main.cpp": { 4 | "coverage": [ 5 | -1, 6 | -1, 7 | -1, 8 | -1, 9 | -1, 10 | 4, 11 | -1, 12 | -1, 13 | -1, 14 | -1, 15 | -1, 16 | 1, 17 | 1, 18 | -1, 19 | -1, 20 | 1, 21 | -1, 22 | -1, 23 | -1, 24 | 2, 25 | -1, 26 | -1, 27 | -1, 28 | -1, 29 | 2, 30 | 1, 31 | -1, 32 | 4, 33 | 2, 34 | 1, 35 | 1, 36 | 2 37 | ], 38 | "coveragePercent": 100.0, 39 | "linesCovered": 12, 40 | "linesMissed": 0, 41 | "linesTotal": 12, 42 | "name": "main.cpp" 43 | } 44 | }, 45 | "coveragePercent": 100.0, 46 | "linesCovered": 12, 47 | "linesMissed": 0, 48 | "linesTotal": 12, 49 | "name": "" 50 | } 51 | -------------------------------------------------------------------------------- /tests/template/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | template 6 | class Ciao { 7 | private: 8 | T val; 9 | 10 | public: 11 | void set(T v) { 12 | val = v; 13 | } 14 | 15 | T get() { 16 | return val; 17 | } 18 | 19 | T* get2() { 20 | return &val; 21 | } 22 | }; 23 | 24 | int main() { 25 | Ciao cW; 26 | Ciao cS; 27 | 28 | cS.set("marco"); 29 | cW.get(); 30 | cS.get2(); 31 | cW.get2(); 32 | } 33 | --------------------------------------------------------------------------------