Skip to content

Test case fixes #6115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
229ebf0
deleted two tests intended to test RUST_CC_ZEAL, an apparently defunc…
jbclements Apr 18, 2013
5d8db6f
remove (non-parsing) test related to impl d for d feature
jbclements Apr 18, 2013
78942a2
this issue is a dup of another one that has a correct test case
jbclements Apr 18, 2013
77da055
This test case is obsolete for two reasons
jbclements Apr 18, 2013
9455eaf
changed to impl trait for type stx
jbclements Apr 18, 2013
dd310d6
Got test cases to pass, after some major surgery
jbclements Apr 18, 2013
325263f
this test still doesn't pass, but at least it parses...
jbclements Apr 18, 2013
7e89a51
This test case now parses
jbclements Apr 18, 2013
add60bb
Test now passes
jbclements Apr 18, 2013
cc4e018
added test case for issue 5927
jbclements Apr 18, 2013
d6bb587
with syntax fixes, this test case now appears to pass
jbclements Apr 18, 2013
178305f
fixed up issue-2185, but now it has a trait failure
jbclements Apr 18, 2013
3a5361a
more commits on issue 2185
jbclements Apr 30, 2013
527f771
after syntax fixes, these tests appear to pass
jbclements Apr 18, 2013
3931ce4
fixed the test case, hope it's still testing something
jbclements Apr 19, 2013
d1921fb
fixed this test case too
jbclements Apr 19, 2013
89bb02a
typestate is not planned for upcoming versions of rust....
jbclements Apr 19, 2013
c75b763
renamed issue-2185 to issue-3429
jbclements Apr 30, 2013
fc66107
fixed up syntax
jbclements Apr 19, 2013
ab1d8ea
fixed pattern, moved test to compile-fail
jbclements Apr 30, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/test/auxiliary/issue-2196-a.rs

This file was deleted.

18 changes: 0 additions & 18 deletions src/test/auxiliary/issue-2196-b.rs

This file was deleted.

16 changes: 0 additions & 16 deletions src/test/auxiliary/issue-2196-c.rc

This file was deleted.

Empty file removed src/test/auxiliary/issue-2196-d.rs
Empty file.
11 changes: 7 additions & 4 deletions src/test/auxiliary/issue2378a.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[link (name = "issue2378a")];
#[crate_type = "lib"];

enum maybe<T> { just(T), nothing }

impl copy> for maybe<T> for methods<T {
fn ~[](idx: uint) -> T {
impl <T:Copy> Index<uint,T> for maybe<T> {
fn index(&self, idx: &uint) -> T {
match self {
just(t) { t }
nothing { fail!(); }
&just(ref t) => copy *t,
&nothing => { fail!(); }
}
}
}
14 changes: 8 additions & 6 deletions src/test/auxiliary/issue2378b.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use issue2378a;
#[link (name = "issue2378b")];
#[crate_type = "lib"];

extern mod issue2378a;

use issue2378a::maybe;
use issue2378a::methods;

type two_maybes<T> = {a: maybe<T>, b: maybe<T>};
struct two_maybes<T> {a: maybe<T>, b: maybe<T>}

impl copy> for two_maybes<T> for methods<T {
fn ~[](idx: uint) -> (T, T) {
(self.a[idx], self.b[idx])
impl <T:Copy> Index<uint,(T,T)> for two_maybes<T> {
fn index(&self, idx: &uint) -> (T, T) {
(self.a[*idx], self.b[*idx])
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -8,7 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use b::d;

type t = uint;

// error-pattern:unresolved enum variant

fn main() {
let z = match 3 {
x() => x
};
assert_eq!(z,3);
}
17 changes: 0 additions & 17 deletions src/test/run-pass/issue-1466.rs

This file was deleted.

33 changes: 0 additions & 33 deletions src/test/run-pass/issue-1989.rs

This file was deleted.

32 changes: 28 additions & 4 deletions src/test/run-pass/issue-2185.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,46 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-test FIXME #2263
// does the second one subsume the first?
// xfail-test
// xfail-fast

// notes on this test case:
// On Thu, Apr 18, 2013 at 6:30 PM, John Clements <[email protected]> wrote:
// the "issue-2185.rs" test was xfailed with a ref to #2263. Issue #2263 is now fixed, so I tried it again, and after adding some &self parameters, I got this error:
//
// Running /usr/local/bin/rustc:
// issue-2185.rs:24:0: 26:1 error: conflicting implementations for a trait
// issue-2185.rs:24 impl iterable<uint> for @fn(&fn(uint)) {
// issue-2185.rs:25 fn iter(&self, blk: &fn(v: uint)) { self( |i| blk(i) ) }
// issue-2185.rs:26 }
// issue-2185.rs:20:0: 22:1 note: note conflicting implementation here
// issue-2185.rs:20 impl<A> iterable<A> for @fn(&fn(A)) {
// issue-2185.rs:21 fn iter(&self, blk: &fn(A)) { self(blk); }
// issue-2185.rs:22 }
//
// … so it looks like it's just not possible to implement both the generic iterable<uint> and iterable<A> for the type iterable<uint>. Is it okay if I just remove this test?
//
// but Niko responded:
// think it's fine to remove this test, just because it's old and cruft and not hard to reproduce. *However* it should eventually be possible to implement the same interface for the same type multiple times with different type parameters, it's just that our current trait implementation has accidental limitations.

// so I'm leaving it in.
// actually, it looks like this is related to bug #3429. I'll rename this bug.

// This test had to do with an outdated version of the iterable trait.
// However, the condition it was testing seemed complex enough to
// warrant still having a test, so I inlined the old definitions.

trait iterable<A> {
fn iter(blk: &fn(A));
fn iter(&self, blk: &fn(A));
}

impl<A> iterable<A> for @fn(&fn(A)) {
fn iter(blk: &fn(A)) { self(blk); }
fn iter(&self, blk: &fn(A)) { self(blk); }
}

impl iterable<uint> for @fn(&fn(uint)) {
fn iter(blk: &fn(&&v: uint)) { self( |i| blk(i) ) }
fn iter(&self, blk: &fn(v: uint)) { self( |i| blk(i) ) }
}

fn filter<A,IA:iterable<A>>(self: IA, prd: @fn(A) -> bool, blk: &fn(A)) {
Expand Down
19 changes: 0 additions & 19 deletions src/test/run-pass/issue-2196.rs

This file was deleted.

24 changes: 0 additions & 24 deletions src/test/run-pass/issue-2869.rs

This file was deleted.

File renamed without changes.
26 changes: 0 additions & 26 deletions src/test/run-pass/issue-3480.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/run-pass/issue-3979-generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Positioned<int> for Point {
}
}

impl Point: Movable<int, int>;
impl Movable<int, int> for Point;

pub fn main() {
let p = Point{ x: 1, y: 2};
Expand Down
12 changes: 6 additions & 6 deletions src/test/run-pass/issue2378c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-test -- #2378 unfixed
// aux-build:issue2378a.rs
// aux-build:issue2378b.rs
// xfail-fast - check-fast doesn't understand aux-build

use issue2378a;
use issue2378b;
extern mod issue2378a;
extern mod issue2378b;

use issue2378a::{just, methods};
use issue2378b::{methods};
use issue2378a::{just};
use issue2378b::{two_maybes};

pub fn main() {
let x = {a: just(3), b: just(5)};
let x = two_maybes{a: just(3), b: just(5)};
assert!(x[0u] == (3, 5));
}
14 changes: 8 additions & 6 deletions src/test/run-pass/mlist-cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@

// xfail-test
// -*- rust -*-
extern mod std;
extern mod core;
use core::gc;
use core::gc::rustrt;

type cell = {c: @list};
struct cell {c: @list}

enum list { link(@mut cell), nil, }

pub fn main() {
let first: @cell = @mut {c: @nil()};
let second: @cell = @mut {c: @link(first)};
let first: @cell = @mut cell{c: @nil()};
let second: @cell = @mut cell{c: @link(first)};
first._0 = @link(second);
sys.rustrt.gc();
let third: @cell = @mut {c: @nil()};
rustrt::gc();
let third: @cell = @mut cell{c: @nil()};
}
8 changes: 5 additions & 3 deletions src/test/run-pass/preempt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

fn starve_main(alive: chan<int>) {
debug!("signalling main");
alive <| 1;
alive.recv(1);
debug!("starving main");
let i: int = 0;
loop { i += 1; }
Expand All @@ -22,10 +22,12 @@ fn starve_main(alive: chan<int>) {
pub fn main() {
let alive: port<int> = port();
debug!("main started");
let s: task = spawn starve_main(chan(alive));
let s: task = do task::spawn {
starve_main(chan(alive));
};
let i: int;
debug!("main waiting for alive signal");
alive |> i;
alive.send(i);
debug!("main got alive signal");
while i < 50 { debug!("main iterated"); i += 1; }
debug!("main completed");
Expand Down
6 changes: 2 additions & 4 deletions src/test/run-pass/regions-fn-subtyping-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-test

// Issue #2263.

// Here, `f` is a function that takes a pointer `x` and a function
// `g`, where `g` requires its argument `y` to be in the same region
// that `x` is in.
fn has_same_region(f: &fn(x: &a.int, g: &fn(y: &a.int))) {
fn has_same_region(f: &fn<'a>(x: &'a int, g: &fn(y: &'a int))) {
// `f` should be the type that `wants_same_region` wants, but
// right now the compiler complains that it isn't.
wants_same_region(f);
}

fn wants_same_region(_f: &fn(x: &b.int, g: &fn(y: &b.int))) {
fn wants_same_region(_f: &fn<'b>(x: &'b int, g: &fn(y: &'b int))) {
}

pub fn main() {
Expand Down
Loading