diff options
| author | Graydon Hoare <[email protected]> | 2010-11-09 14:15:07 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-11-09 14:15:07 -0800 |
| commit | 89946609f2de815ea87df3b001fff0caf9efa0d5 (patch) | |
| tree | 0945861dddd480b822827d77205f90584d0c2586 /src/test/run-pass/alt-pattern-drop.rs | |
| parent | Add a check for binding an alias. Good thing, as we had two instances in our ... (diff) | |
| download | rust-89946609f2de815ea87df3b001fff0caf9efa0d5.tar.xz rust-89946609f2de815ea87df3b001fff0caf9efa0d5.zip | |
Support a special const-value refcount, use it for const strings.
Diffstat (limited to 'src/test/run-pass/alt-pattern-drop.rs')
| -rw-r--r-- | src/test/run-pass/alt-pattern-drop.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/run-pass/alt-pattern-drop.rs b/src/test/run-pass/alt-pattern-drop.rs index 1c9cc000..4ee2c12b 100644 --- a/src/test/run-pass/alt-pattern-drop.rs +++ b/src/test/run-pass/alt-pattern-drop.rs @@ -3,6 +3,10 @@ use std; import std._str; +// FIXME: import std.dbg.const_refcount. Currently +// cross-crate const references don't work. +const uint const_refcount = 0x7bad_face_u; + tag t { make_t(str); clam; @@ -17,12 +21,12 @@ fn foo(str s) { } log _str.refcount(s); - check (_str.refcount(s) == 3u); + check (_str.refcount(s) == const_refcount); } fn main() { let str s = "hi"; // ref up foo(s); // ref up then down log _str.refcount(s); - check (_str.refcount(s) == 1u); + check (_str.refcount(s) == const_refcount); } |