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

16 lines
325 B
Rust
Raw Normal View History

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