Skip to content

Commit 29ab2da

Browse files
committed
Add assertions to test
1 parent c4b4cb3 commit 29ab2da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/run-pass/tuple-struct-constructor-pointer.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#[deriving(Eq)]
1112
struct Foo(int);
13+
#[deriving(Eq)]
1214
struct Bar(int, int);
1315

1416
fn main() {
1517
let f: extern fn(int) -> Foo = Foo;
1618
let g: extern fn(int, int) -> Bar = Bar;
17-
f(42);
18-
g(4, 7);
19+
assert_eq!(f(42), Foo(42));
20+
assert_eq!(g(4, 7), Bar(4, 7));
1921
}

0 commit comments

Comments
 (0)