File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ on: [push, workflow_dispatch]
44
55env :
66 CARGO_TERM_COLOR : always
7- RUSTFLAGS : -D warnings -C instrument-coverage -C link-dead-code
7+ RUSTFLAGS : -D warnings -C instrument-coverage -C link-dead-code -Z coverage-options=branch
88 RUSTDOCFLAGS : -D warnings -D missing_docs
99
1010jobs :
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # RUSTFLAGS="-C instrument-coverage -C link-dead-code" oj-verify run --tle 20 --jobs 4 examples/data_structures/rmq.rs
2+ # RUSTFLAGS="-C instrument-coverage -C link-dead-code -Z coverage-options=branch " oj-verify run --tle 20 --jobs 4 examples/data_structures/rmq.rs
33
44set -eo pipefail
55
@@ -8,6 +8,6 @@ cov_flags=(-Xdemangler=rustfilt --ignore-filename-regex='/.cargo/registry' --ins
88
99cargo profdata -- merge -sparse default_* .profraw -o ptc_rust.profdata
1010# shellcheck disable=SC2068 # double quotes cause command to fail, not sure why
11- cargo cov -- show ${cov_flags[@]} --use-color
11+ cargo cov -- show ${cov_flags[@]} --use-color --show-branches=count
1212# shellcheck disable=SC2068
1313cargo cov -- export ${cov_flags[@]} --summary-only | python .github/workflows/check_code_cov.py
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ use programming_team_code_rust::numbers::primes::Primes;
66fn main ( ) {
77 let primes = Primes :: new ( 100_000_001 ) ;
88
9+ for i in 0 ..=1 {
10+ assert ! ( !primes. is_prime( i) ) ;
11+ }
12+
913 input ! {
1014 n: usize ,
1115 }
You can’t perform that action at this time.
0 commit comments