Skip to content

Commit

Permalink
pretty -> verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Dec 12, 2024
1 parent a612d90 commit 6b9c3b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tooling/nargo_cli/src/cli/test_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use acvm::{BlackBoxFunctionSolver, FieldElement};
use bn254_blackbox_solver::Bn254BlackBoxSolver;
use clap::Args;
use fm::FileManager;
use formatters::{Formatter, PrettyFormatter, TerseFormatter};
use formatters::{Formatter, TerseFormatter, VerboseFormatter};
use nargo::{
insert_all_files_for_workspace_into_file_manager, ops::TestStatus, package::Package, parse_all,
prepare_package, workspace::Workspace, PrintOutput,
Expand Down Expand Up @@ -68,15 +68,15 @@ pub(crate) struct TestCommand {
#[derive(Debug, Copy, Clone, clap::ValueEnum)]
enum Format {
/// Print verbose output
Pretty,
Verbose,
/// Display one character per test
Terse,
}

impl Format {
fn formatter(&self) -> Box<dyn Formatter> {
match self {
Format::Pretty => Box::new(PrettyFormatter),
Format::Verbose => Box::new(VerboseFormatter),
Format::Terse => Box::new(TerseFormatter),
}
}
Expand All @@ -85,7 +85,7 @@ impl Format {
impl Display for Format {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Format::Pretty => write!(f, "pretty"),
Format::Verbose => write!(f, "pretty"),
Format::Terse => write!(f, "terse"),
}
}
Expand Down Expand Up @@ -136,7 +136,7 @@ pub(crate) fn run(args: TestCommand, config: NargoConfig) -> Result<(), CliError
} else if args.quiet {
Box::new(TerseFormatter)
} else {
Box::new(PrettyFormatter)
Box::new(VerboseFormatter)
};

let runner = TestRunner {
Expand Down
4 changes: 2 additions & 2 deletions tooling/nargo_cli/src/cli/test_cmd/formatters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ pub(super) trait Formatter: Send + Sync + RefUnwindSafe {
) -> std::io::Result<()>;
}

pub(super) struct PrettyFormatter;
pub(super) struct VerboseFormatter;

impl Formatter for PrettyFormatter {
impl Formatter for VerboseFormatter {
fn package_start(&self, package_name: &str, test_count: usize) -> std::io::Result<()> {
package_start(package_name, test_count)
}
Expand Down

0 comments on commit 6b9c3b2

Please sign in to comment.