MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / fmt

Method fmt

crates/cli/src/wast_runner.rs:526–548  ·  view source on GitHub ↗
(&self, f: &mut Formatter<'_>)

Source from the content-addressed store, hash-verified

524
525impl Display for WastRunner {
526 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
527 use owo_colors::OwoColorize;
528
529 let mut total_passed = 0;
530 let mut total_failed = 0;
531
532 for group in self.group_results() {
533 total_passed += group.passed;
534 total_failed += group.failed;
535
536 writeln!(f, "{}", group.name.bold().underline())?;
537 writeln!(f, " Tests Passed: {}", group.passed.to_string().green())?;
538 if group.failed != 0 {
539 writeln!(f, " Tests Failed: {}", group.failed.to_string().red())?;
540 }
541 }
542
543 writeln!(f, "\n{}", "Total Test Summary:".bold().underline())?;
544 writeln!(f, " Total Tests: {}", total_passed + total_failed)?;
545 writeln!(f, " Total Passed: {}", total_passed.to_string().green())?;
546 writeln!(f, " Total Failed: {}", total_failed.to_string().red())?;
547 Ok(())
548 }
549}
550
551#[derive(Debug)]

Callers

nothing calls this directly

Calls 1

group_resultsMethod · 0.45

Tested by

no test coverage detected