Wow--thanks for everyone responding so quickly and helping out! This solves my problem--how can I update the documentation for at least version 0.5?
Thanks, David On Sat, Mar 2, 2013 at 6:46 AM, Niko Matsakis <[email protected]> wrote: > You need to include "extern mod std;" at the top of your program. This > will link in the standard library (as opposed to the core lib). I think > that in modern versions of the compiler (i.e., the trunk) this is > automatic, or at least has a better error message, but I am not sure. > > > Niko > > David Siefert <[email protected]> > March 2, 2013 12:10 AM > Hi, > > I'm trying to get started with rust 0.5. I've got it built and can > compile+execute some simple programs. Now I want to get running with test > driven development, so I just want to write, build, and run a simple unit > test... according to the documentation+wiki, the following is the minimal > unit test: > > $ cat test.rs > // sample > #[test] > fn testFail() { > fail; > } > > And the --test option is supposed to build a harness to run everything > marked with attribute #[test]: > > $ rustc test.rs --test > test.rs:1:0: 1:0 error: unresolved name > test.rs:1 // sample > ^ > test.rs:1:0: 1:0 error: use of undeclared module `std::test` > test.rs:1 // sample > ^ > test.rs:1:0: 1:0 error: unresolved name: std::test::test_main > test.rs:1 // sample > ^ > test.rs:1:0: 1:0 error: unresolved name > test.rs:1 // sample > ^ > test.rs:1:0: 1:0 error: use of undeclared module `std::test` > test.rs:1 // sample > ^ > test.rs:1:0: 1:0 error: use of undeclared type name `std::test::TestDesc` > test.rs:1 // sample > ^ > Can someone point me in the right direction here? > > Thanks, > David > > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev > >
<<compose-unknown-contact.jpg>>
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
