summaryrefslogtreecommitdiffstats
path: root/tests/run-make/link-cfg/with-staticlib-deps.rs
blob: 23e5926a73ce36e0e3a0636895a79b2cb2dbd5c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate dep_with_staticlib;

fn main() {
    unsafe {
        let v = dep_with_staticlib::my_function();
        if cfg!(foo) {
            assert_eq!(v, 1);
        } else if cfg!(bar) {
            assert_eq!(v, 3);
        } else {
            panic!("unknown");
        }
    }
}