Skip to content

Commit

Permalink
test: Remove @str from the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
pcwalton authored and huonw committed Feb 1, 2014
1 parent 17b0104 commit 7a80fa6
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 66 deletions.
11 changes: 0 additions & 11 deletions src/test/compile-fail/estr-subtyping.rs
Expand Up @@ -8,26 +8,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[feature(managed_boxes)];

fn wants_box(x: @str) { }
fn wants_uniq(x: ~str) { }
fn wants_slice(x: &str) { }

fn has_box(x: @str) {
wants_box(x);
wants_uniq(x); //~ ERROR str storage differs: expected `~` but found `@`
wants_slice(x);
}

fn has_uniq(x: ~str) {
wants_box(x); //~ ERROR str storage differs: expected `@` but found `~`
wants_uniq(x);
wants_slice(x);
}

fn has_slice(x: &str) {
wants_box(x); //~ ERROR str storage differs: expected `@` but found `&`
wants_uniq(x); //~ ERROR str storage differs: expected `~` but found `&`
wants_slice(x);
}
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/lint-heap-memory.rs
Expand Up @@ -25,7 +25,6 @@ fn main() {
@[1]; //~ ERROR type uses managed
//~^ ERROR type uses managed
fn f(_: @Clone) {} //~ ERROR type uses managed
@""; //~ ERROR type uses managed
//~^ ERROR type uses managed

~2; //~ ERROR type uses owned
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/auto-ref-slice-plus-ref.rs
Expand Up @@ -34,7 +34,6 @@ pub fn main() {
(&[1]).test_imm();
("test").test_imm();
(~"test").test_imm();
(@"test").test_imm();
(&"test").test_imm();

// FIXME: Other types of mutable vecs don't currently exist
Expand Down
3 changes: 1 addition & 2 deletions src/test/run-pass/borrowed-ptr-pattern-infallible.rs
Expand Up @@ -11,8 +11,7 @@
#[feature(managed_boxes)];

pub fn main() {
let (&x, &y, &z) = (&3, &'a', &@"No pets!");
let (&x, &y) = (&3, &'a');
assert_eq!(x, 3);
assert_eq!(y, 'a');
assert_eq!(z, @"No pets!");
}
1 change: 0 additions & 1 deletion src/test/run-pass/borrowed-ptr-pattern.rs
Expand Up @@ -17,5 +17,4 @@ fn foo<T:Clone>(x: &T) -> T{
pub fn main() {
assert_eq!(foo(&3), 3);
assert_eq!(foo(&'a'), 'a');
assert_eq!(foo(&@"Dogs rule, cats drool"), @"Dogs rule, cats drool");
}
15 changes: 0 additions & 15 deletions src/test/run-pass/estr-shared.rs

This file was deleted.

2 changes: 0 additions & 2 deletions src/test/run-pass/ifmt.rs
Expand Up @@ -58,7 +58,6 @@ pub fn main() {
t!(format!("{}", 1.0f64), "1");
t!(format!("{}", "a"), "a");
t!(format!("{}", ~"a"), "a");
t!(format!("{}", @"a"), "a");
t!(format!("{}", false), "false");
t!(format!("{}", 'a'), "a");

Expand All @@ -73,7 +72,6 @@ pub fn main() {
t!(format!("{:X}", 10u), "A");
t!(format!("{:s}", "foo"), "foo");
t!(format!("{:s}", ~"foo"), "foo");
t!(format!("{:s}", @"foo"), "foo");
t!(format!("{:p}", 0x1234 as *int), "0x1234");
t!(format!("{:p}", 0x1234 as *mut int), "0x1234");
t!(format!("{:d}", A), "aloha");
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/issue-3574.rs
Expand Up @@ -26,5 +26,4 @@ pub fn main()
{
assert!(compare("foo", "foo"));
assert!(compare(~"foo", ~"foo"));
assert!(compare(@"foo", @"foo"));
}
18 changes: 0 additions & 18 deletions src/test/run-pass/issue-4092.rs

This file was deleted.

4 changes: 0 additions & 4 deletions src/test/run-pass/match-borrowed_str.rs
Expand Up @@ -43,19 +43,15 @@ fn g2(ref_1: &str, ref_2: &str) -> ~str {
}

pub fn main() {
assert_eq!(f1(@"a"), ~"found a");
assert_eq!(f1(~"b"), ~"found b");
assert_eq!(f1(&"c"), ~"not found");
assert_eq!(f1("d"), ~"not found");
assert_eq!(f2(@"a"), ~"found a");
assert_eq!(f2(~"b"), ~"found b");
assert_eq!(f2(&"c"), ~"not found (c)");
assert_eq!(f2("d"), ~"not found (d)");
assert_eq!(g1(@"a", @"b"), ~"found a,b");
assert_eq!(g1(~"b", ~"c"), ~"found b,c");
assert_eq!(g1(&"c", &"d"), ~"not found");
assert_eq!(g1("d", "e"), ~"not found");
assert_eq!(g2(@"a", @"b"), ~"found a,b");
assert_eq!(g2(~"b", ~"c"), ~"found b,c");
assert_eq!(g2(&"c", &"d"), ~"not found (c, d)");
assert_eq!(g2("d", "e"), ~"not found (d, e)");
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/nullable-pointer-iotareduction.rs
Expand Up @@ -79,7 +79,6 @@ pub fn main() {
check_type!(~18: ~int);
check_type!(@19: @int);
check_type!(~"foo": ~str);
check_type!(@"bar": @str);
check_type!(~[20, 22]: ~[int]);
check_type!(@[]: @[int]);
check_type!(@[24, 26]: @[int]);
Expand Down
1 change: 0 additions & 1 deletion src/test/run-pass/nullable-pointer-size.rs
Expand Up @@ -41,7 +41,6 @@ pub fn main() {
check_type!(~int);
check_type!(@int);
check_type!(~str);
check_type!(@str);
check_type!(~[int]);
check_type!(@[int]);
check_type!(extern fn());
Expand Down
3 changes: 0 additions & 3 deletions src/test/run-pass/reflect-visit-data.rs
Expand Up @@ -180,9 +180,6 @@ impl<V:TyVisitor + movable_ptr> TyVisitor for ptr_visit_adaptor<V> {
}

fn visit_estr_box(&mut self) -> bool {
self.align_to::<@str>();
if ! self.inner().visit_estr_box() { return false; }
self.bump_past::<@str>();
true
}

Expand Down
5 changes: 0 additions & 5 deletions src/test/run-pass/send_str_hashmap.rs
Expand Up @@ -63,11 +63,6 @@ pub fn main() {
assert_eq!(map.find_equiv(&(~"cde")), Some(&c));
assert_eq!(map.find_equiv(&(~"def")), Some(&d));

assert_eq!(map.find_equiv(&(@"abc")), Some(&a));
assert_eq!(map.find_equiv(&(@"bcd")), Some(&b));
assert_eq!(map.find_equiv(&(@"cde")), Some(&c));
assert_eq!(map.find_equiv(&(@"def")), Some(&d));

assert_eq!(map.find_equiv(&SendStrStatic("abc")), Some(&a));
assert_eq!(map.find_equiv(&SendStrStatic("bcd")), Some(&b));
assert_eq!(map.find_equiv(&SendStrStatic("cde")), Some(&c));
Expand Down

0 comments on commit 7a80fa6

Please sign in to comment.