Change vec-ref-count to handle 1 or 2, so long as non-leaky and non-creeping. un-XFAIL.

This commit is contained in:
Graydon Hoare 2011-04-28 14:50:03 -07:00
parent c9e601b31d
commit f0e1bb75d1

View File

@ -1,11 +1,12 @@
// xfail-stage0
use std;
import std._vec;
fn main() {
auto v = vec(1, 2, 3);
check (_vec.refcount[int](v) == 1u);
check (_vec.refcount[int](v) == 1u);
log_err _vec.refcount[int](v);
log_err _vec.refcount[int](v);
log_err _vec.refcount[int](v);
check (_vec.refcount[int](v) == 1u || _vec.refcount[int](v) == 2u);
check (_vec.refcount[int](v) == 1u || _vec.refcount[int](v) == 2u);
}