Skip to content

Commit cbb0b3d

Browse files
Allow test invocations to elide empty program declarations
1 parent 977b0a5 commit cbb0b3d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ macro_rules! test {
5555
let (program, goals) = parse_test_data!(program $program $($goals)*);
5656
solve_goal(program, goals, false)
5757
}};
58+
59+
// If `program` is omitted, default to an empty one.
60+
($($goals:tt)*) => {
61+
test!(program {} $($goals)*)
62+
};
5863
}
5964

6065
macro_rules! parse_test_data {

0 commit comments

Comments
 (0)