rust/src/test/run-pass/extern-crosscrate.rs

16 lines
318 B
Rust
Raw Normal View History

2012-07-09 15:41:16 -05:00
// xfail-fast
//aux-build:extern-crosscrate-source.rs
use externcallback(vers = "0.1");
fn fact(n: uint) -> uint {
debug!{"n = %?", n};
externcallback::rustrt::rust_dbg_call(externcallback::cb, n)
}
fn main() {
let result = fact(10u);
debug!{"result = %?", result};
assert result == 3628800u;
}