Skip to content

Commit

Permalink
Add assertions to test
Browse files Browse the repository at this point in the history
  • Loading branch information
bytwise committed Aug 18, 2013
1 parent c4b4cb3 commit 29ab2da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/run-pass/tuple-struct-constructor-pointer.rs
Expand Up @@ -8,12 +8,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[deriving(Eq)]
struct Foo(int);
#[deriving(Eq)]
struct Bar(int, int);

fn main() {
let f: extern fn(int) -> Foo = Foo;
let g: extern fn(int, int) -> Bar = Bar;
f(42);
g(4, 7);
assert_eq!(f(42), Foo(42));
assert_eq!(g(4, 7), Bar(4, 7));
}

5 comments on commit 29ab2da

@bors
Copy link
Contributor

@bors bors commented on 29ab2da Aug 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at bytwise@29ab2da

@bors
Copy link
Contributor

@bors bors commented on 29ab2da Aug 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging bytewiseand/rust/tuple-struct-ctor-ptr = 29ab2da into auto

@bors
Copy link
Contributor

@bors bors commented on 29ab2da Aug 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bytewiseand/rust/tuple-struct-ctor-ptr = 29ab2da merged ok, testing candidate = 48dded9

@bors
Copy link
Contributor

@bors bors commented on 29ab2da Aug 21, 2013

@bors
Copy link
Contributor

@bors bors commented on 29ab2da Aug 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 48dded9

Please sign in to comment.