Skip to content

Commit 77ad193

Browse files
committed
---
yaml --- r: 145763 b: refs/heads/try2 c: 787f20a h: refs/heads/master i: 145761: be3b148 145759: 302cae8 v: v3
1 parent 5ff68da commit 77ad193

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+580
-2030
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: a623fd339bf420adcaf18b393b5891803f3044e8
8+
refs/heads/try2: 787f20a2550318a65bff6d69599afde562949a8a
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/rust.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,6 @@ Supported traits for `deriving` are:
17751775
`obj.to_str()` has similar output as `fmt!("%?", obj)`, but it differs in that
17761776
each constituent field of the type must also implement `ToStr` and will have
17771777
`field.to_str()` invoked to build up the result.
1778-
* `FromPrimitive`, to create an instance from a numeric primitve.
17791778

17801779
### Stability
17811780
One can indicate the stability of an API using the following attributes:

branches/try2/doc/tutorial-rustpkg.md

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -206,54 +206,6 @@ note: Installed package github.com/YOUR_USERNAME/hello-0.1 to /home/yourusername
206206

207207
That's it!
208208

209-
# Testing your Package
210-
211-
Testing your package is simple as well. First, let's change `src/hello/lib.rs` to contain
212-
a function that can be sensibly tested:
213-
214-
~~~
215-
#[desc = "A Rust package for determining whether unsigned integers are even."];
216-
#[license = "MIT"];
217-
218-
pub fn is_even(i: uint) -> bool {
219-
i % 2 == 0
220-
}
221-
~~~
222-
223-
Once you've edited `lib.rs`, you can create a second crate file, `src/hello/test.rs`,
224-
to put tests in:
225-
226-
~~~
227-
#[license = "MIT"];
228-
extern mod hello;
229-
use hello::is_even;
230-
231-
#[test]
232-
fn test_is_even() {
233-
assert!(is_even(0));
234-
assert!(!is_even(1));
235-
assert!(is_even(2));
236-
}
237-
~~~
238-
239-
Note that you have to import the crate you just created in `lib.rs` with the
240-
`extern mod hello` directive. That's because you're putting the tests in a different
241-
crate from the main library that you created.
242-
243-
Now, you can use the `rustpkg test` command to build this test crate (and anything else
244-
it depends on) and run the tests, all in one step:
245-
246-
~~~ {.notrust}
247-
$ rustpkg test hello
248-
WARNING: The Rust package manager is experimental and may be unstable
249-
note: Installed package hello-0.1 to /Users/tjc/.rust
250-
251-
running 1 test
252-
test test_is_even ... ok
253-
254-
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
255-
~~~
256-
257209
# More resources
258210

259211
There's a lot more going on with `rustpkg`, this is just to get you started.

0 commit comments

Comments
 (0)