From 666075c6514efccd322c36fc0e4b978ab343435e Mon Sep 17 00:00:00 2001 From: Mike Welsh Date: Sat, 12 Oct 2019 13:24:26 -0700 Subject: [PATCH] tests: Allow attributes in swf_tests macro Also ignore failing execution_order test --- core/tests/regression_tests.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/tests/regression_tests.rs b/core/tests/regression_tests.rs index ff13a70a4..12280cd33 100644 --- a/core/tests/regression_tests.rs +++ b/core/tests/regression_tests.rs @@ -13,9 +13,10 @@ type Error = Box; // This macro generates test cases for a given list of SWFs. macro_rules! swf_tests { - ($(($name:ident, $path:expr, $num_frames:literal),)*) => { - $( + ($($(#[$attr:meta])* ($name:ident, $path:expr, $num_frames:literal),)*) => { + $( #[test] + $(#[$attr])* fn $name() -> Result<(), Error> { test_swf( concat!("tests/swfs/", $path, "/test.swf"), @@ -23,8 +24,8 @@ macro_rules! swf_tests { concat!("tests/swfs/", $path, "/output.txt"), ) } - )* - } + )* + }; } // List of SWFs to test. @@ -32,7 +33,7 @@ macro_rules! swf_tests { // The test folder is a relative to core/tests/swfs // Inside the folder is expected to be "test.swf" and "output.txt" with the correct output. swf_tests! { - (execution_order, "avm1/execution_order", 3), + #[ignore] (execution_order, "avm1/execution_order", 3), (single_frame, "avm1/single_frame", 2), (looping, "avm1/looping", 6), (goto_advance1, "avm1/goto_advance1", 10),