Skip to content

Commit 5f3a637

Browse files
committed
enable tests for the container tutorial
1 parent 7727920 commit 5f3a637

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,7 @@ do
739739
make_dir $h/test/doc-tutorial-ffi
740740
make_dir $h/test/doc-tutorial-macros
741741
make_dir $h/test/doc-tutorial-borrowed-ptr
742+
make_dir $h/test/doc-tutorial-container
742743
make_dir $h/test/doc-tutorial-tasks
743744
make_dir $h/test/doc-tutorial-conditions
744745
make_dir $h/test/doc-rust

doc/tutorial-container.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ assert_eq!(sum, 57);
163163
The `for` keyword can be used as sugar for iterating through any iterator:
164164
165165
~~~
166-
let xs = [2, 3, 5, 7, 11, 13, 17];
166+
let xs = [2u, 3, 5, 7, 11, 13, 17];
167167

168168
// print out all the elements in the vector
169169
for x in xs.iter() {
@@ -219,7 +219,7 @@ Containers can provide conversion from iterators through `collect` by
219219
implementing the `FromIterator` trait. For example, the implementation for
220220
vectors is as follows:
221221
222-
~~~
222+
~~~ {.xfail-test}
223223
impl<A> FromIterator<A> for ~[A] {
224224
pub fn from_iterator<T: Iterator<A>>(iterator: &mut T) -> ~[A] {
225225
let (lower, _) = iterator.size_hint();
@@ -237,7 +237,7 @@ impl<A> FromIterator<A> for ~[A] {
237237
The `Iterator` trait provides a `size_hint` default method, returning a lower
238238
bound and optionally on upper bound on the length of the iterator:
239239

240-
~~~
240+
~~~ {.xfail-test}
241241
fn size_hint(&self) -> (uint, Option<uint>) { (0, None) }
242242
~~~
243243

mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2020

2121
# Markdown files under doc/ that should have their code extracted and run
2222
DOC_TEST_NAMES = tutorial tutorial-ffi tutorial-macros tutorial-borrowed-ptr \
23-
tutorial-tasks tutorial-conditions rust
23+
tutorial-tasks tutorial-conditions tutorial-container rust
2424

2525
######################################################################
2626
# Environment configuration

src/libstd/prelude.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ pub use char::Char;
5050
pub use container::{Container, Mutable, Map, MutableMap, Set, MutableSet};
5151
pub use hash::Hash;
5252
pub use iter::Times;
53-
pub use iterator::Extendable;
54-
pub use iterator::{Iterator, DoubleEndedIterator, ClonableIterator, OrdIterator};
55-
pub use iterator::MutableDoubleEndedIterator;
53+
pub use iterator::{FromIterator, Extendable};
54+
pub use iterator::{Iterator, DoubleEndedIterator, RandomAccessIterator, ClonableIterator};
55+
pub use iterator::{OrdIterator, MutableDoubleEndedIterator};
5656
pub use num::{Num, NumCast, CheckedAdd, CheckedSub, CheckedMul};
5757
pub use num::{Orderable, Signed, Unsigned, Round};
5858
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};

0 commit comments

Comments
 (0)