Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Mar 15, 2020
1 parent 9c8f9e2 commit 38e13d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- zlib1g-dev
update: true
before_script:
- cargo install cargo-tarpaulin
- cargo install cargo-tarpaulin --git https://github.com/xd009642/tarpaulin --branch develop
script:
- cargo tarpaulin --workspace --features "yaml unstable" --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
script:
Expand Down
12 changes: 12 additions & 0 deletions clap_derive/tests/macro-errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,21 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed

use std::env;

#[rustversion::attr(any(not(stable), before(1.42)), ignore)]
#[test]
fn ui() {
let not_present = env::var("CARGO_PKG_NAME").is_err();

if not_present {
env::set_var("CARGO_PKG_NAME", "test");
}

let t = trybuild::TestCases::new();
t.compile_fail("tests/ui/*.rs");

if not_present {
env::remove_var("CARGO_PKG_NAME");
}
}

1 comment on commit 38e13d7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 38e13d7 Previous: 9c8f9e2 Ratio
build_empty 103 ns/iter (+/- 1) 105 ns/iter (+/- 1) 0.98
parse_empty 1056 ns/iter (+/- 19) 1020 ns/iter (+/- 11) 1.0
parse_simple_with_complex 4300 ns/iter (+/- 73) 4232 ns/iter (+/- 99) 1.0
parse_simple_with_pos 3356 ns/iter (+/- 63) 3250 ns/iter (+/- 49) 1.0
parse_simple_with_opt 3463 ns/iter (+/- 44) 3524 ns/iter (+/- 58) 0.98
parse_simple_with_flag 3185 ns/iter (+/- 42) 3056 ns/iter (+/- 51) 1.0
build_with_pos_ref 252 ns/iter (+/- 4) 238 ns/iter (+/- 2) 1.1
build_with_pos 195 ns/iter (+/- 3) 183 ns/iter (+/- 3) 1.1
build_with_opt_ref 377 ns/iter (+/- 6) 353 ns/iter (+/- 5) 1.1
build_with_opt 309 ns/iter (+/- 3) 284 ns/iter (+/- 6) 1.1
build_with_flag_ref 316 ns/iter (+/- 4) 305 ns/iter (+/- 4) 1.0
build_with_flag 255 ns/iter (+/- 5) 243 ns/iter (+/- 3) 1.0
build_simple 775 ns/iter (+/- 12) 925 ns/iter (+/- 17) 0.84
build_from_usage 4786 ns/iter (+/- 82) 4643 ns/iter (+/- 72) 1.0
build_from_builder 2578 ns/iter (+/- 50) 2563 ns/iter (+/- 42) 1.0
build_from_macros 2631 ns/iter (+/- 37) 2850 ns/iter (+/- 41) 0.92
parse_complex 8057 ns/iter (+/- 170) 7811 ns/iter (+/- 130) 1.0
parse_complex_with_flag 9939 ns/iter (+/- 269) 9206 ns/iter (+/- 173) 1.1
parse_complex_with_opt 9507 ns/iter (+/- 142) 9608 ns/iter (+/- 149) 0.99
parse_complex_with_pos 10320 ns/iter (+/- 199) 9394 ns/iter (+/- 206) 1.1
parse_complex_with_sc 11359 ns/iter (+/- 179) 11526 ns/iter (+/- 431) 0.99
parse_complex_with_sc_flag 12704 ns/iter (+/- 258) 11855 ns/iter (+/- 139) 1.1
parse_complex_with_sc_opt 12425 ns/iter (+/- 259) 11991 ns/iter (+/- 214) 1.0
parse_complex_with_sc_pos 13332 ns/iter (+/- 353) 11748 ns/iter (+/- 187) 1.1
parse_complex1 15592 ns/iter (+/- 398) 14895 ns/iter (+/- 245) 1.0
parse_complex2 17270 ns/iter (+/- 299) 17022 ns/iter (+/- 264) 1.0
parse_args_negate_scs 17210 ns/iter (+/- 531) 15787 ns/iter (+/- 174) 1.1
parse_complex_with_sc_complex 14107 ns/iter (+/- 251) 12845 ns/iter (+/- 232) 1.1
example1 17454 ns/iter (+/- 313) 17536 ns/iter (+/- 496) 1.0
example2 369647 ns/iter (+/- 39,836) 364450 ns/iter (+/- 38,114) 1.0
example3 18673 ns/iter (+/- 408) 18466 ns/iter (+/- 215) 1.0
example4 12919 ns/iter (+/- 203) 13759 ns/iter (+/- 373) 0.94
example5 474115 ns/iter (+/- 39,854) 459755 ns/iter (+/- 41,848) 1.0
example6 10192 ns/iter (+/- 241) 10131 ns/iter (+/- 186) 1.0
example7 14193 ns/iter (+/- 216) 14180 ns/iter (+/- 178) 1.0
example8 14221 ns/iter (+/- 235) 14292 ns/iter (+/- 237) 1.0
example10 421430 ns/iter (+/- 36,764) 406031 ns/iter (+/- 38,922) 1.0
example4_template 12566 ns/iter (+/- 256) 11969 ns/iter (+/- 191) 1.0
build_rg_with_short_help 12630 ns/iter (+/- 230) 12207 ns/iter (+/- 155) 1.0
build_rg_with_long_help 13830 ns/iter (+/- 292) 13324 ns/iter (+/- 186) 1.0
write_rg_short_help 119098 ns/iter (+/- 2,318) 121574 ns/iter (+/- 2,964) 0.98
write_rg_long_help 251144 ns/iter (+/- 5,077) 251581 ns/iter (+/- 7,112) 1.0
parse_rg 27793 ns/iter (+/- 452) 27205 ns/iter (+/- 586) 1.0
parse_rg_with_complex 40795 ns/iter (+/- 790) 38920 ns/iter (+/- 517) 1.0
parse_rg_with_lots 919356 ns/iter (+/- 13,949) 901209 ns/iter (+/- 13,114) 1.0
build_rustup 16472 ns/iter (+/- 304) 14588 ns/iter (+/- 348) 1.1
parse_rustup 18767 ns/iter (+/- 389) 17893 ns/iter (+/- 179) 1.0
parse_rustup_with_sc 18335 ns/iter (+/- 345) 17729 ns/iter (+/- 195) 1.0

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.