enable tests for the container tutorial

This commit is contained in:
Daniel Micay 2013-08-19 18:15:01 -04:00
parent 7727920ba2
commit 5f3a637b7c
4 changed files with 8 additions and 7 deletions

1
configure vendored
View File

@ -739,6 +739,7 @@ do
make_dir $h/test/doc-tutorial-ffi
make_dir $h/test/doc-tutorial-macros
make_dir $h/test/doc-tutorial-borrowed-ptr
make_dir $h/test/doc-tutorial-container
make_dir $h/test/doc-tutorial-tasks
make_dir $h/test/doc-tutorial-conditions
make_dir $h/test/doc-rust

View File

@ -163,7 +163,7 @@ assert_eq!(sum, 57);
The `for` keyword can be used as sugar for iterating through any iterator:
~~~
let xs = [2, 3, 5, 7, 11, 13, 17];
let xs = [2u, 3, 5, 7, 11, 13, 17];
// print out all the elements in the vector
for x in xs.iter() {
@ -219,7 +219,7 @@ Containers can provide conversion from iterators through `collect` by
implementing the `FromIterator` trait. For example, the implementation for
vectors is as follows:
~~~
~~~ {.xfail-test}
impl<A> FromIterator<A> for ~[A] {
pub fn from_iterator<T: Iterator<A>>(iterator: &mut T) -> ~[A] {
let (lower, _) = iterator.size_hint();
@ -237,7 +237,7 @@ impl<A> FromIterator<A> for ~[A] {
The `Iterator` trait provides a `size_hint` default method, returning a lower
bound and optionally on upper bound on the length of the iterator:
~~~
~~~ {.xfail-test}
fn size_hint(&self) -> (uint, Option<uint>) { (0, None) }
~~~

View File

@ -20,7 +20,7 @@ TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
# Markdown files under doc/ that should have their code extracted and run
DOC_TEST_NAMES = tutorial tutorial-ffi tutorial-macros tutorial-borrowed-ptr \
tutorial-tasks tutorial-conditions rust
tutorial-tasks tutorial-conditions tutorial-container rust
######################################################################
# Environment configuration

View File

@ -50,9 +50,9 @@ pub use char::Char;
pub use container::{Container, Mutable, Map, MutableMap, Set, MutableSet};
pub use hash::Hash;
pub use iter::Times;
pub use iterator::Extendable;
pub use iterator::{Iterator, DoubleEndedIterator, ClonableIterator, OrdIterator};
pub use iterator::MutableDoubleEndedIterator;
pub use iterator::{FromIterator, Extendable};
pub use iterator::{Iterator, DoubleEndedIterator, RandomAccessIterator, ClonableIterator};
pub use iterator::{OrdIterator, MutableDoubleEndedIterator};
pub use num::{Num, NumCast, CheckedAdd, CheckedSub, CheckedMul};
pub use num::{Orderable, Signed, Unsigned, Round};
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};