use tester::{ShouldPanic, TestDesc, TestDescAndFn, TestFn, TestName, TestType};
#[derive(Clone)]
pub struct TestCase {
pub name: &'static str,
pub f: fn(),
}
#[::linkme::distributed_slice]
pub static TLUA_TESTS: [TestCase] = [..];
pub fn collect() -> Vec<TestDescAndFn> {
TLUA_TESTS
.iter()
.map(|case| TestDescAndFn {
desc: TestDesc {
name: TestName::StaticTestName(case.name),
ignore: false,
should_panic: ShouldPanic::No,
allow_fail: false,
test_type: TestType::IntegrationTest,
},
testfn: TestFn::StaticTestFn(case.f),
})
.collect()
}