1
Fork 0

Fix misspelled comments for tests.

This commit is contained in:
Joseph Crail 2014-08-01 19:42:13 -04:00
parent 351cc4fc99
commit 2016742e07
25 changed files with 32 additions and 32 deletions

View file

@ -22,7 +22,7 @@ use std::uint;
// This is a simple bench that creates M pairs of tasks. These // This is a simple bench that creates M pairs of tasks. These
// tasks ping-pong back and forth over a pair of streams. This is a // tasks ping-pong back and forth over a pair of streams. This is a
// cannonical message-passing benchmark as it heavily strains message // canonical message-passing benchmark as it heavily strains message
// passing and almost nothing else. // passing and almost nothing else.
fn ping_pong_bench(n: uint, m: uint) { fn ping_pong_bench(n: uint, m: uint) {

View file

@ -101,7 +101,7 @@ impl<'a, T> Iterator<&'a T> for ListIterator<'a, T> {
// every possible transformations (the 6 rotations with their // every possible transformations (the 6 rotations with their
// corresponding mirrored piece), with, as minimum coordinates, (0, // corresponding mirrored piece), with, as minimum coordinates, (0,
// 0). If all is false, only generate half of the possibilities (used // 0). If all is false, only generate half of the possibilities (used
// to break the symetry of the board). // to break the symmetry of the board).
fn transform(piece: Vec<(int, int)> , all: bool) -> Vec<Vec<(int, int)>> { fn transform(piece: Vec<(int, int)> , all: bool) -> Vec<Vec<(int, int)>> {
let mut res: Vec<Vec<(int, int)>> = let mut res: Vec<Vec<(int, int)>> =
// rotations // rotations
@ -124,9 +124,9 @@ fn transform(piece: Vec<(int, int)> , all: bool) -> Vec<Vec<(int, int)>> {
res res
} }
// A mask is a piece somewere on the board. It is represented as a // A mask is a piece somewhere on the board. It is represented as a
// u64: for i in the first 50 bits, m[i] = 1 if the cell at (i/5, i%5) // u64: for i in the first 50 bits, m[i] = 1 if the cell at (i/5, i%5)
// is occuped. m[50 + id] = 1 if the identifier of the piece is id. // is occupied. m[50 + id] = 1 if the identifier of the piece is id.
// Takes a piece with minimum coordinate (0, 0) (as generated by // Takes a piece with minimum coordinate (0, 0) (as generated by
// transform). Returns the corresponding mask if p translated by (dy, // transform). Returns the corresponding mask if p translated by (dy,
@ -159,7 +159,7 @@ fn make_masks() -> Vec<Vec<Vec<u64> > > {
vec!((0i,0i),(0,1),(0,2),(1,2),(1,3)), vec!((0i,0i),(0,1),(0,2),(1,2),(1,3)),
vec!((0i,0i),(0,1),(0,2),(0,3),(1,2))); vec!((0i,0i),(0,1),(0,2),(0,3),(1,2)));
// To break the central symetry of the problem, every // To break the central symmetry of the problem, every
// transformation must be taken except for one piece (piece 3 // transformation must be taken except for one piece (piece 3
// here). // here).
let transforms: Vec<Vec<Vec<(int, int)>>> = let transforms: Vec<Vec<Vec<(int, int)>>> =
@ -263,7 +263,7 @@ impl Data {
// Records a new found solution. Returns false if the search must be // Records a new found solution. Returns false if the search must be
// stopped. // stopped.
fn handle_sol(raw_sol: &List<u64>, data: &mut Data) { fn handle_sol(raw_sol: &List<u64>, data: &mut Data) {
// because we break the symetry, 2 solutions correspond to a call // because we break the symmetry, 2 solutions correspond to a call
// to this method: the normal solution, and the same solution in // to this method: the normal solution, and the same solution in
// reverse order, i.e. the board rotated by half a turn. // reverse order, i.e. the board rotated by half a turn.
data.nb += 2; data.nb += 2;
@ -298,7 +298,7 @@ fn search(
for id in range(0u, 10).filter(|id| board & (1 << (id + 50)) == 0) { for id in range(0u, 10).filter(|id| board & (1 << (id + 50)) == 0) {
// for each mask that fits on the board // for each mask that fits on the board
for m in masks_at.get(id).iter().filter(|&m| board & *m == 0) { for m in masks_at.get(id).iter().filter(|&m| board & *m == 0) {
// This check is too costy. // This check is too costly.
//if is_board_unfeasible(board | m, masks) {continue;} //if is_board_unfeasible(board | m, masks) {continue;}
search(masks, board | *m, i + 1, Cons(*m, &cur), data); search(masks, board | *m, i + 1, Cons(*m, &cur), data);
} }

View file

@ -36,8 +36,8 @@ fn dot(v: &[f64], u: &[f64]) -> f64 {
fn mult(v: Arc<RWLock<Vec<f64>>>, out: Arc<RWLock<Vec<f64>>>, fn mult(v: Arc<RWLock<Vec<f64>>>, out: Arc<RWLock<Vec<f64>>>,
f: fn(&Vec<f64>, uint) -> f64) { f: fn(&Vec<f64>, uint) -> f64) {
// We lanch in different tasks the work to be done. To finish // We launch in different tasks the work to be done. To finish
// this fuction, we need to wait for the completion of every // this function, we need to wait for the completion of every
// tasks. To do that, we give to each tasks a wait_chan that we // tasks. To do that, we give to each tasks a wait_chan that we
// drop at the end of the work. At the end of this function, we // drop at the end of the work. At the end of this function, we
// wait until the channel hang up. // wait until the channel hang up.

View file

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
// Verify that it is not possible to take the address of // Verify that it is not possible to take the address of
// static items with usnafe interior. // static items with unsafe interior.
use std::kinds::marker; use std::kinds::marker;
use std::cell::UnsafeCell; use std::cell::UnsafeCell;

View file

@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// Verify that managed pointers scope is treated like ownoed pointers. // Verify that managed pointers scope is treated like owned pointers.
// regresion test for #11586 // regression test for #11586
use std::gc::{GC, Gc}; use std::gc::{GC, Gc};

View file

@ -72,7 +72,7 @@ static STATIC7: SafeStruct = SafeStruct{field1: Variant1, field2: Variant3(WithD
//~^ ERROR static items are not allowed to have destructors //~^ ERROR static items are not allowed to have destructors
// Test variadic constructor for structs. The base struct should be examined // Test variadic constructor for structs. The base struct should be examined
// as well as every field persent in the constructor. // as well as every field present in the constructor.
// This example shouldn't fail because all the fields are safe. // This example shouldn't fail because all the fields are safe.
static STATIC8: SafeStruct = SafeStruct{field1: Variant1, static STATIC8: SafeStruct = SafeStruct{field1: Variant1,
..SafeStruct{field1: Variant1, field2: Variant1}}; ..SafeStruct{field1: Variant1, field2: Variant1}};

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// opyright 2013 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 // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT. // http://rust-lang.org/COPYRIGHT.
// //

View file

@ -15,7 +15,7 @@
pub trait Sized {} pub trait Sized {}
mod bar { mod bar {
// shouln't bring in too much // shouldn't bring in too much
pub use self::glob::*; pub use self::glob::*;
// can't publicly re-export private items // can't publicly re-export private items

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// Verify that UnsafeCell is *always* sync regardles `T` is sync. // Verify that UnsafeCell is *always* sync regardless if `T` is sync.
// ignore-tidy-linelength // ignore-tidy-linelength

View file

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
// Test that we correctly infer variance for region parameters in // Test that we correctly infer variance for region parameters in
// case that involve multiple intracrate types. // case that involve multiple intricate types.
// Try enums too. // Try enums too.
#[rustc_variance] #[rustc_variance]

View file

@ -13,7 +13,7 @@ use std::io::{File, Command};
use std::rand::{task_rng, Rng}; use std::rand::{task_rng, Rng};
// creates unicode_input_multiple_files_{main,chars}.rs, where the // creates unicode_input_multiple_files_{main,chars}.rs, where the
// former imports the latter. `_chars` just contains an indentifier // former imports the latter. `_chars` just contains an identifier
// made up of random characters, because will emit an error message // made up of random characters, because will emit an error message
// about the ident being in the wrong place, with a span (and creating // about the ident being in the wrong place, with a span (and creating
// this span used to upset the compiler). // this span used to upset the compiler).

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// Tests that even when a type paramenter doesn't implement a required // Tests that even when a type parameter doesn't implement a required
// super-builtin-kind of a trait, if the type parameter is never used, // super-builtin-kind of a trait, if the type parameter is never used,
// the type can implement the trait anyway. // the type can implement the trait anyway.

View file

@ -18,7 +18,7 @@
// option. this file may not be copied, modified, or distributed // option. this file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// Test that cleanups for the RHS of shorcircuiting operators work. // Test that cleanups for the RHS of shortcircuiting operators work.
use std::os; use std::os;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// If we use GEPi rathern than GEP_tup_like when // If we use GEPi rather than GEP_tup_like when
// storing closure data (as we used to do), the u64 would // storing closure data (as we used to do), the u64 would
// overwrite the u16. // overwrite the u16.

View file

@ -76,7 +76,7 @@ pub fn sleeper() -> Process {
pub fn sleeper() -> Process { pub fn sleeper() -> Process {
// There's a `timeout` command on windows, but it doesn't like having // There's a `timeout` command on windows, but it doesn't like having
// its output piped, so instead just ping ourselves a few times with // its output piped, so instead just ping ourselves a few times with
// gaps inbetweeen so we're sure this process is alive for awhile // gaps in between so we're sure this process is alive for awhile
Command::new("ping").arg("127.0.0.1").arg("-n").arg("1000").spawn().unwrap() Command::new("ping").arg("127.0.0.1").arg("-n").arg("1000").spawn().unwrap()
} }

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// This briefuly tests the capability of `Cell` and `RefCell` to implement the // This briefly tests the capability of `Cell` and `RefCell` to implement the
// `Encodable` and `Decodable` traits via `#[deriving(Encodable, Decodable)]` // `Encodable` and `Decodable` traits via `#[deriving(Encodable, Decodable)]`
extern crate serialize; extern crate serialize;

View file

@ -11,7 +11,7 @@
use std::hash::hash; use std::hash::hash;
// testing mulptiple separate deriving attributes // testing multiple separate deriving attributes
#[deriving(PartialEq)] #[deriving(PartialEq)]
#[deriving(Clone)] #[deriving(Clone)]
#[deriving(Hash)] #[deriving(Hash)]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// calling pin_task and that's having wierd side-effects. // calling pin_task and that's having weird side-effects.
mod rustrt1 { mod rustrt1 {
extern crate libc; extern crate libc;

View file

@ -12,7 +12,7 @@
// Don't fail on blocks without results // Don't fail on blocks without results
// There are several tests in this run-pass that raised // There are several tests in this run-pass that raised
// when this bug was oppened. The cases where the compiler // when this bug was opened. The cases where the compiler
// failed before the fix have a comment. // failed before the fix have a comment.
struct S {x:()} struct S {x:()}

View file

@ -13,7 +13,7 @@
// notes on this test case: // notes on this test case:
// On Thu, Apr 18, 2013-2014 at 6:30 PM, John Clements <clements@brinckerhoff.org> wrote: // On Thu, Apr 18, 2013-2014 at 6:30 PM, John Clements <clements@brinckerhoff.org> wrote:
// the "issue-2185.rs" test was ignoreed with a ref to #2263. Issue #2263 is now fixed, // the "issue-2185.rs" test was ignored 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: // so I tried it again, and after adding some &self parameters, I got this error:
// //
// Running /usr/local/bin/rustc: // Running /usr/local/bin/rustc:

View file

@ -10,7 +10,7 @@
#![allow(unnecessary_allocation)] #![allow(unnecessary_allocation)]
// Tests for a previous bug that occured due to an interaction // Tests for a previous bug that occurred due to an interaction
// between struct field initialization and the auto-coercion // between struct field initialization and the auto-coercion
// from a vector to a slice. The drop glue was being invoked on // from a vector to a slice. The drop glue was being invoked on
// the temporary slice with a wrong type, triggering an LLVM assert. // the temporary slice with a wrong type, triggering an LLVM assert.

View file

@ -28,7 +28,7 @@ fn main() {
// It appears that the --as-needed flag to linkers will not pull in a dynamic // It appears that the --as-needed flag to linkers will not pull in a dynamic
// library unless it satisfies a non weak undefined symbol. The 'other' crate // library unless it satisfies a non weak undefined symbol. The 'other' crate
// is compiled as a dynamic library where it would only be used for a // is compiled as a dynamic library where it would only be used for a
// weak-symbol as part of an executable, so the dynamic library woudl be // weak-symbol as part of an executable, so the dynamic library would be
// discarded. By adding and calling `other::bar`, we get around this problem. // discarded. By adding and calling `other::bar`, we get around this problem.
other::bar(); other::bar();

View file

@ -15,7 +15,7 @@ pub fn main() {
for i in range(0u, 3) { for i in range(0u, 3) {
// ensure that the borrow in this alt // ensure that the borrow in this alt
// does not inferfere with the swap // does not interfere with the swap
// below. note that it would it you // below. note that it would it you
// naively borrowed &x for the lifetime // naively borrowed &x for the lifetime
// of the variable x, as we once did // of the variable x, as we once did

View file

@ -12,7 +12,7 @@
// //
// The original issue causing the ICE: the LUB-computations during // The original issue causing the ICE: the LUB-computations during
// type inference were encountering late-bound lifetimes, and // type inference were encountering late-bound lifetimes, and
// asserting that such lifetimes should have already been subsituted // asserting that such lifetimes should have already been substituted
// with a concrete lifetime. // with a concrete lifetime.
// //
// However, those encounters were occurring within the lexical scope // However, those encounters were occurring within the lexical scope

View file

@ -9,7 +9,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// ignore-pretty: `expand` addes some preludes before shebang // ignore-pretty: `expand` adds some preludes before shebang
// //
// ignore-lexer-test FIXME #15878 // ignore-lexer-test FIXME #15878