rust/tests/ui/statics/static-method-xcrate.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
344 B
Rust
Raw Normal View History

// run-pass
// aux-build:static-methods-crate.rs
extern crate static_methods_crate;
2012-09-05 19:32:05 +00:00
use static_methods_crate::read;
pub fn main() {
let result: isize = read("5".to_string());
assert_eq!(result, 5);
assert_eq!(read::readMaybe("false".to_string()), Some(false));
assert_eq!(read::readMaybe("foo".to_string()), None::<bool>);
}