Skip to content

pub fn main for run-pass tests that didn't have it #5001

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

Merged
merged 1 commit into from
Feb 19, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/test/run-pass/class-impl-very-parameterized-trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ priv impl<T> cat<T> {
}
}

fn main() {
pub fn main() {
let mut nyan: cat<~str> = cat::new(0, 2, ~"nyan");
for uint::range(1, 5) |_| { nyan.speak(); }
assert(*nyan.find(&1).unwrap() == ~"nyan");
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
enum E { V0, V1(int) }
const C: &static/E = &V0;

fn main() {
pub fn main() {
match *C {
V0 => (),
_ => fail!()
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum E { V16(u16), V32(u32) }
struct S { a: E, b: u16, c: u16 }
const C: S = S { a: V16(0xDEAD), b: 0x600D, c: 0xBAD };

fn main() {
pub fn main() {
let n = C.b;
assert n != 0xBAD;
assert n == 0x600D;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-struct2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum E { V0, V16(u16) }
struct S { a: E, b: u16, c: u16 }
const C: S = S { a: V0, b: 0x600D, c: 0xBAD };

fn main() {
pub fn main() {
let n = C.b;
assert n != 0xBAD;
assert n == 0x600D;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
enum E { V16(u16), V32(u32) }
const C: (E, u16, u16) = (V16(0xDEAD), 0x600D, 0xBAD);

fn main() {
pub fn main() {
let (_, n, _) = C;
assert n != 0xBAD;
assert n == 0x600D;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-tuple2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
enum E { V0, V16(u16) }
const C: (E, u16, u16) = (V0, 0x600D, 0xBAD);

fn main() {
pub fn main() {
let (_, n, _) = C;
assert n != 0xBAD;
assert n == 0x600D;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-tuplestruct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum E { V16(u16), V32(u32) }
struct S(E, u16, u16);
const C: S = S(V16(0xDEAD), 0x600D, 0xBAD);

fn main() {
pub fn main() {
let S(_, n, _) = C;
assert n != 0xBAD;
assert n == 0x600D;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-tuplestruct2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum E { V0, V16(u16) }
struct S(E, u16, u16);
const C: S = S(V0, 0x600D, 0xBAD);

fn main() {
pub fn main() {
let S(_, n, _) = C;
assert n != 0xBAD;
assert n == 0x600D;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-vec-index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const C: &[E] = &[V0, V1(0xDEADBEE)];
const C0: E = C[0];
const C1: E = C[1];

fn main() {
pub fn main() {
match C0 {
V0 => (),
_ => fail!()
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-vec-ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
enum E { V1(int), V0 }
const C: &static/[E] = &[V0, V1(0xDEADBEE), V0];

fn main() {
pub fn main() {
match C[1] {
V1(n) => assert(n == 0xDEADBEE),
_ => fail!()
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/const-enum-vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
enum E { V1(int), V0 }
const C: [E * 3] = [V0, V1(0xDEADBEE), V0];

fn main() {
pub fn main() {
match C[1] {
V1(n) => assert(n == 0xDEADBEE),
_ => fail!()
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/impl-privacy-xc-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

extern mod impl_privacy_xc_1;

fn main() {
pub fn main() {
let fish = impl_privacy_xc_1::Fish { x: 1 };
fish.swim();
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/impl-privacy-xc-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

extern mod impl_privacy_xc_2;

fn main() {
pub fn main() {
let fish1 = impl_privacy_xc_2::Fish { x: 1 };
let fish2 = impl_privacy_xc_2::Fish { x: 2 };
io::println(if fish1.eq(&fish2) { "yes" } else { "no " });
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-1257.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

fn main () {
pub fn main () {
let mut line = ~"";
let mut i = 0;
while line != ~"exit" {
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/newtype-struct-xc-2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fn f() -> Au {
Au(2)
}

fn main() {
pub fn main() {
let _ = f();
}

2 changes: 1 addition & 1 deletion src/test/run-pass/newtype-struct-xc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

extern mod newtype_struct_xc;

fn main() {
pub fn main() {
let _ = newtype_struct_xc::Au(2);
}

2 changes: 1 addition & 1 deletion src/test/run-pass/trait-default-method-bound-subst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ fn f<T, U, V: A<T>>(i: V, j: T, k: U) -> (T, U) {
i.g(j, k)
}

fn main () {
pub fn main () {
assert f(0, 1, 2) == (1, 2);
}
2 changes: 1 addition & 1 deletion src/test/run-pass/trait-default-method-bound-subst2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ fn f<T, V: A<T>>(i: V, j: T) -> T {
i.g(j)
}

fn main () {
pub fn main () {
assert f(0, 2) == 2;
}
2 changes: 1 addition & 1 deletion src/test/run-pass/trait-default-method-bound-subst3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn f<T, V: A>(i: V, j: T, k: T) -> (T, T) {
i.g(j, k)
}

fn main () {
pub fn main () {
assert f(0, 1, 2) == (1, 2);
assert f(0, 1u8, 2u8) == (1u8, 2u8);
}
2 changes: 1 addition & 1 deletion src/test/run-pass/trait-default-method-bound-subst4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn f<T, V: A<T>>(i: V, j: uint) -> uint {
i.g(j)
}

fn main () {
pub fn main () {
assert f::<float, int>(0, 2u) == 2u;
assert f::<uint, int>(0, 2u) == 2u;
}
2 changes: 1 addition & 1 deletion src/test/run-pass/trait-default-method-bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ fn f<T: A>(i: T) {
assert i.g() == 10;
}

fn main () {
pub fn main () {
f(0);
}