Skip to content

Commit

Permalink
test(transformer): add --debug option to transform conformance
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Nov 21, 2024
1 parent 0918e52 commit d35900f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions tasks/transform_conformance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fn test() {
pub struct TestRunnerOptions {
pub filter: Option<String>,
pub exec: bool,
pub debug: bool,
}

/// The test runner which walks the babel repository and searches for transformation tests.
Expand Down
1 change: 1 addition & 0 deletions tasks/transform_conformance/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ fn main() {
let options = TestRunnerOptions {
filter: args.opt_value_from_str("--filter").unwrap(),
exec: args.contains("--exec"),
debug: args.contains("--debug"),
};

TestRunner::new(options.clone()).run();
Expand Down
4 changes: 4 additions & 0 deletions tasks/transform_conformance/src/test_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ impl TestCase {
}

pub fn test(&mut self, options: &TestRunnerOptions) {
if options.debug {
println!("{:?}", &self.path);
}

let filtered = options.filter.is_some();
match self.kind {
TestCaseKind::Conformance => self.test_conformance(filtered),
Expand Down

0 comments on commit d35900f

Please sign in to comment.