summaryrefslogtreecommitdiff
path: root/tests/compile.rs
blob: 5a1a62625e388f342de7d39ecbdb042a13add47d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#[test]
#[ignore]
fn test_compilation() {
    let t = trybuild::TestCases::new();

    t.compile_fail("tests/compile/function_borrow.rs");
    t.compile_fail("tests/compile/lua_norefunwindsafe.rs");
    t.compile_fail("tests/compile/ref_nounwindsafe.rs");
    t.compile_fail("tests/compile/scope_callback_capture.rs");
    t.compile_fail("tests/compile/scope_callback_inner.rs");
    t.compile_fail("tests/compile/scope_callback_outer.rs");
    t.compile_fail("tests/compile/scope_invariance.rs");
    t.compile_fail("tests/compile/scope_mutable_aliasing.rs");
    t.compile_fail("tests/compile/scope_userdata_borrow.rs");
    t.compile_fail("tests/compile/static_callback_args.rs");

    #[cfg(feature = "async")]
    {
        t.compile_fail("tests/compile/async_any_userdata_method.rs");
        t.compile_fail("tests/compile/async_nonstatic_userdata.rs");
        t.compile_fail("tests/compile/async_userdata_method.rs");
    }

    #[cfg(feature = "send")]
    t.compile_fail("tests/compile/non_send.rs");
    #[cfg(not(feature = "send"))]
    t.pass("tests/compile/non_send.rs");
}