aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/vec-append.rs
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-05-02 16:24:09 -0700
committerGraydon Hoare <[email protected]>2011-05-02 17:35:33 -0700
commitd08b443fffb1181d8d45ae5d061412f202dd4118 (patch)
treead75b4e4fc9407aa1201f9068012f30664d17b64 /src/test/run-pass/vec-append.rs
parentAdd a regression test that exports can expose unexported items (diff)
downloadrust-d08b443fffb1181d8d45ae5d061412f202dd4118.tar.xz
rust-d08b443fffb1181d8d45ae5d061412f202dd4118.zip
Revert "Use different syntax for checks that matter to typestate"
This reverts commit aa25f22f197682de3b18fc4c8ba068d1feda220f. It broke stage2, not sure why yet.
Diffstat (limited to 'src/test/run-pass/vec-append.rs')
-rw-r--r--src/test/run-pass/vec-append.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/test/run-pass/vec-append.rs b/src/test/run-pass/vec-append.rs
index 69db4788..0f9f56dd 100644
--- a/src/test/run-pass/vec-append.rs
+++ b/src/test/run-pass/vec-append.rs
@@ -15,9 +15,9 @@ fn fast_growth() {
v += vec(6,7,8,9,0);
log v.(9);
- assert (v.(0) == 1);
- assert (v.(7) == 8);
- assert (v.(9) == 0);
+ check(v.(0) == 1);
+ check(v.(7) == 8);
+ check(v.(9) == 0);
}
fn slow_growth() {
@@ -26,7 +26,7 @@ fn slow_growth() {
v += vec(17);
log v.(0);
- assert (v.(0) == 17);
+ check (v.(0) == 17);
}
fn slow_growth2_helper(str s) { // ref up: s
@@ -52,7 +52,7 @@ fn slow_growth2_helper(str s) { // ref up: s
let acc a = acc(v); // ref up: a, v
log _vec.refcount[str](v);
- assert (_vec.refcount[str](v) == 2u);
+ check (_vec.refcount[str](v) == 2u);
a.add(s); // ref up: mumble, s. ref down: v
@@ -60,21 +60,21 @@ fn slow_growth2_helper(str s) { // ref up: s
log _str.refcount(s);
log _str.refcount(mumble);
- assert (_vec.refcount[str](v) == 1u);
- assert (_str.refcount(s) == const_refcount);
- assert (_str.refcount(mumble) == const_refcount);
+ check (_vec.refcount[str](v) == 1u);
+ check (_str.refcount(s) == const_refcount);
+ check (_str.refcount(mumble) == const_refcount);
log v.(0);
log _vec.len[str](v);
- assert (_str.eq(v.(0), mumble));
- assert (_vec.len[str](v) == 1u);
+ check (_str.eq(v.(0), mumble));
+ check (_vec.len[str](v) == 1u);
} // ref down: a, mumble, s, v
log _str.refcount(s);
log _str.refcount(mumble);
- assert (_str.refcount(s) == const_refcount);
- assert (_str.refcount(mumble) == const_refcount);
+ check (_str.refcount(s) == const_refcount);
+ check (_str.refcount(mumble) == const_refcount);
log mumble;
log ss;
@@ -84,7 +84,7 @@ fn slow_growth2() {
let str s = "hi"; // ref up: s
slow_growth2_helper(s);
log _str.refcount(s);
- assert (_str.refcount(s) == const_refcount);
+ check (_str.refcount(s) == const_refcount);
}
fn main() {