mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-14 21:31:05 +00:00
ad61b6e3c9
# Description Closes [#403](https://github.com/paritytech/revive/issues/403) Adds compilation time benchmarks for resolc end-to-end. The benchmarks can be run from the root via: ```sh make bench-resolc ``` HTML reports will be generated under `target/criterion`, and a summary of the results at [crates/resolc/BENCHMARKS_M4PRO.md](https://github.com/paritytech/revive/blob/lj/compilation-benchmarks/crates/resolc/BENCHMARKS_M4PRO.md) (currently from running on a Mac M4 Pro).
30 lines
883 B
Rust
30 lines
883 B
Rust
//! The tests for running resolc when expecting usage output.
|
|
|
|
use crate::cli_utils::{
|
|
assert_command_failure, assert_command_success, assert_equal_exit_codes, execute_resolc,
|
|
execute_solc,
|
|
};
|
|
|
|
#[test]
|
|
fn shows_usage_with_help() {
|
|
let arguments = &["--help"];
|
|
let resolc_result = execute_resolc(arguments);
|
|
assert_command_success(&resolc_result, "Providing the `--help` option");
|
|
|
|
assert!(resolc_result.stdout.contains("Usage: resolc"));
|
|
|
|
let solc_result = execute_solc(arguments);
|
|
assert_equal_exit_codes(&solc_result, &resolc_result);
|
|
}
|
|
|
|
#[test]
|
|
fn fails_without_options() {
|
|
let resolc_result = execute_resolc(&[]);
|
|
assert_command_failure(&resolc_result, "Omitting options");
|
|
|
|
assert!(resolc_result.stderr.contains("Usage: resolc"));
|
|
|
|
let solc_result = execute_solc(&[]);
|
|
assert_equal_exit_codes(&solc_result, &resolc_result);
|
|
}
|