2020-09-13 15:31:08 +00:00
|
|
|
#[test]
|
|
|
|
fn compile_macros() {
|
|
|
|
let t = trybuild::TestCases::new();
|
|
|
|
|
|
|
|
t.pass("tests/trybuild/simple.rs");
|
|
|
|
t.compile_fail("tests/trybuild/simple-fail.rs");
|
2020-09-16 21:37:41 +00:00
|
|
|
|
|
|
|
t.pass("tests/trybuild/route-ok.rs");
|
|
|
|
|
2020-10-19 02:52:05 +00:00
|
|
|
test_route_duplicate_unexpected_method(&t);
|
2020-09-16 21:37:41 +00:00
|
|
|
test_route_missing_method(&t)
|
|
|
|
}
|
|
|
|
|
|
|
|
#[rustversion::stable(1.42)]
|
|
|
|
fn test_route_missing_method(t: &trybuild::TestCases) {
|
|
|
|
t.compile_fail("tests/trybuild/route-missing-method-fail-msrv.rs");
|
2020-09-13 15:31:08 +00:00
|
|
|
}
|
2020-09-16 21:37:41 +00:00
|
|
|
|
|
|
|
#[rustversion::not(stable(1.42))]
|
|
|
|
#[rustversion::not(nightly)]
|
|
|
|
fn test_route_missing_method(t: &trybuild::TestCases) {
|
|
|
|
t.compile_fail("tests/trybuild/route-missing-method-fail.rs");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[rustversion::nightly]
|
|
|
|
fn test_route_missing_method(_t: &trybuild::TestCases) {}
|
2020-10-19 02:52:05 +00:00
|
|
|
|
|
|
|
// FIXME: Re-test them on nightly once rust-lang/rust#77993 is fixed.
|
|
|
|
#[rustversion::not(nightly)]
|
|
|
|
fn test_route_duplicate_unexpected_method(t: &trybuild::TestCases) {
|
|
|
|
t.compile_fail("tests/trybuild/route-duplicate-method-fail.rs");
|
|
|
|
t.compile_fail("tests/trybuild/route-unexpected-method-fail.rs");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[rustversion::nightly]
|
|
|
|
fn test_route_duplicate_unexpected_method(_t: &trybuild::TestCases) {}
|