2014-01-25から1日間の記事一覧

rustpkg test でプロダクトコード中に書かれたユニットテストを実行する

以下のようなパッケージ foo が存在したとします。 // src/foo/lib.rs #[crate_id = "foo"]; pub fn super_complex_function() -> uint { 42 } #[cfg(test)] mod test { #[test] fn test_super_complex_function() { assert_eq!(42, super::super_complex_fu…