-
-
Save farcaller/15d1c05f12ccf52390f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% cargo build --target=thumbv6-none-eabi --verbose -j1 --lib | |
Compiling core v1.0.0 (https://github.com/hackndev/rust-libcore#d9dc4f94) | |
Running `rustc /Users/farcaller/.cargo/git/checkouts/rust-libcore-a3e1d25b35d5cd12/master/./build.rs --crate-name build_script_build --crate-type bin -C prefer-dynamic -g --out-dir /Users/farcaller/temp/bug/test/target/debug/build/core-59996a419f60f2f9 --emit=dep-info,link -L dependency=/Users/farcaller/temp/bug/test/target/debug/deps -L dependency=/Users/farcaller/temp/bug/test/target/debug/deps -Awarnings` | |
Fresh libc v0.1.8 | |
Fresh rustc-serialize v0.3.15 | |
Fresh rand v0.3.8 | |
Fresh num v0.1.25 | |
Fresh expectest v0.2.1 | |
Running `/Users/farcaller/temp/bug/test/target/debug/build/core-59996a419f60f2f9/build-script-build` | |
Running `rustc /Users/farcaller/.cargo/git/checkouts/rust-libcore-a3e1d25b35d5cd12/master/rust/src/libcore/lib.rs --crate-name core --crate-type lib -g -C metadata=59996a419f60f2f9 -C extra-filename=-59996a419f60f2f9 --out-dir /Users/farcaller/temp/bug/test/target/thumbv6-none-eabi/debug/deps --emit=dep-info,link --target thumbv6-none-eabi -L dependency=/Users/farcaller/temp/bug/test/target/thumbv6-none-eabi/debug/deps -L dependency=/Users/farcaller/temp/bug/test/target/thumbv6-none-eabi/debug/deps -Awarnings` | |
Compiling test v0.1.0 (file:///Users/farcaller/temp/bug/test) | |
Running `rustc src/lib.rs --crate-name test --crate-type lib -g --out-dir /Users/farcaller/temp/bug/test/target/thumbv6-none-eabi/debug --emit=dep-info,link --target thumbv6-none-eabi -L dependency=/Users/farcaller/temp/bug/test/target/thumbv6-none-eabi/debug -L dependency=/Users/farcaller/temp/bug/test/target/thumbv6-none-eabi/debug/deps --extern core=/Users/farcaller/temp/bug/test/target/thumbv6-none-eabi/debug/deps/libcore-59996a419f60f2f9.rlib` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "test" | |
version = "0.1.0" | |
authors = ["Vladimir Pouzanov <farcaller@gmail.com>"] | |
[lib] | |
name = "test" | |
crate-type = ["lib"] | |
[target.thumbv6-none-eabi.dependencies.core] | |
git = "https://github.com/hackndev/rust-libcore" | |
[dev-dependencies] | |
expectest = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(no_std, core)] | |
#![no_std] | |
extern crate core; | |
#[cfg(test)] extern crate std; | |
#[cfg(test)] #[macro_use(expect)] extern crate expectest; | |
fn f() -> u8 { | |
42 | |
} | |
#[test] | |
fn it_works() { | |
use expectest::prelude::*; | |
let v = f(); | |
// expect!(v).to(be_equal_to(42)); | |
expect(v) | |
.location(expectest::core::SourceLocation::new(file!(), line!())) | |
.to(be_equal_to(42)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment