aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/vec-ref-count.rs
blob: 4534a86195a2a8b1a82b7c58f535a716818550a1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
use std;
import std.Vec;

fn main() {
    auto v = vec(1, 2, 3);
    log_err Vec.refcount[int](v);
    log_err Vec.refcount[int](v);
    log_err Vec.refcount[int](v);
    assert (Vec.refcount[int](v) == 1u || Vec.refcount[int](v) == 2u);
    assert (Vec.refcount[int](v) == 1u || Vec.refcount[int](v) == 2u);
}