3278 Commits

Author SHA1 Message Date
Brian Anderson
ecdd7b37a3 libstd: Move std tests into libstd 2012-01-17 19:48:58 -08:00
Marijn Haverbeke
8f36a48bef Convert std::sha1 and std::rand over to ifaces 2012-01-11 20:33:44 +01:00
Erick Tryzelaar
71419d0d8d libstd: add a method to generate random bytestrings. 2011-12-28 11:19:41 -08:00
Graydon Hoare
fc5a025feb Register new snapshots, purge log_err and log_full in favour of log(...). 2011-12-22 17:53:53 -08:00
Graydon Hoare
f5651ab09a Register snapshots and switch logging over to use of log_full or #error / #debug. 2011-12-22 14:42:52 -08:00
Graydon Hoare
2aba6bd673 Copy first batch of material from libstd to libcore. 2011-12-13 16:34:50 -08:00
Graydon Hoare
f902277b21 Establish 'core' library separate from 'std'. 2011-12-06 12:13:04 -08:00
Elly Jones
e62093d4d9 Add fs::rmdir() and tempfile/gen_str() tests. 2011-11-22 14:43:18 -08:00
Elly Jones
77888b23a9 Fix long lines 2011-11-22 14:43:18 -08:00
Elly Jones
1924b6b846 std: add fs::mkdir(), rng.gen_str(), tempfile::mkdtemp()
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-11-22 14:43:18 -08:00
Niko Matsakis
44ed8bee2a remove compile-command from local variable blocks 2011-11-17 11:46:13 -08:00
Haitao Li
a19c0560ec Use attributes for native module ABI and link name
This patch changes how to specify ABI and link name of a native module.

Before:
  native "cdecl" mod llvm = "rustllvm" {...}

After:
  #[abi = "cdecl"]
  #[link_name = "rustllvm"]
  native mod llvm {...}

The old optional syntax for ABI and link name is no longer supported.

Fixes issue #547
2011-11-16 11:35:13 -08:00
Stefan Plantikow
2b34e240c1 Replaced constant functions with actual constants in std and updated tests
Fixes issue #1165
2011-11-15 18:02:45 -08:00
Brian Anderson
ef236b46c8 Rename "c-stack-cdecl" ABI to "cdecl" 2011-11-09 18:44:12 -08:00
Brian Anderson
642eab50aa Add more std documentation 2011-10-26 18:32:34 -07:00
Niko Matsakis
031d785db2 move rand functions into c-stack-cdecl mode 2011-10-24 16:06:17 -07:00
David Rajchenbach-Teller
05b2ea78a8 [Lib] rand.rs: type rng now defines next_float 2011-10-17 11:22:57 -07:00
Brian Anderson
44a7cc40e7 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00
Marijn Haverbeke
77dc2f3139 Replace obj dtors with resources in stdlib and rustc 2011-07-29 14:03:24 +02:00
Marijn Haverbeke
44c793a05e Some more obj dtor reformatting 2011-07-27 17:05:34 +02:00
Marijn Haverbeke
b0040569f3 Reformat for new syntax 2011-07-27 15:54:33 +02:00
Brian Anderson
d4abb5b93a The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.

A few main things happen here:

1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.

2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.

3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.

4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.

It adds two new features to the cfail/rfail/rpass/bench tests:

1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.

2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.

There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.

Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.

This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-24 15:34:34 -07:00
Graydon Hoare
897080bc1b Fix a bunch of compile-command lines to use RBUILD 2011-06-15 12:01:19 -07:00
Graydon Hoare
69b3b34161 Reformat source tree (minus a couple tests that are still grumpy). 2011-06-15 11:19:50 -07:00
Marijn Haverbeke
643d6035d4 Downcase std modules again, move to :: for module dereferencing
This should be a snapshot transition.
2011-05-12 21:30:44 +02:00
Marijn Haverbeke
4f97ece063 Rename std modules to be camelcased
(Have fun mergining your stuff with this.)
2011-05-06 22:51:19 +02:00
Graydon Hoare
dfb74263ac Reformat standard library; no code changes. 2010-09-22 15:44:13 -07:00
Roy Frostig
4f6a3d81e8 Expose an RNG (the one used by our runtime) to Rust via std. 2010-07-25 21:45:09 -07:00