mirror of https://github.com/rust-lang/rust.git
Fix misspelled comments for tests.
This commit is contained in:
parent
351cc4fc99
commit
2016742e07
|
@ -22,7 +22,7 @@ use std::uint;
|
|||
|
||||
// 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
|
||||
// cannonical message-passing benchmark as it heavily strains message
|
||||
// canonical message-passing benchmark as it heavily strains message
|
||||
// passing and almost nothing else.
|
||||
|
||||
fn ping_pong_bench(n: uint, m: uint) {
|
||||
|
|
|
@ -101,7 +101,7 @@ impl<'a, T> Iterator<&'a T> for ListIterator<'a, T> {
|
|||
// every possible transformations (the 6 rotations with their
|
||||
// corresponding mirrored piece), with, as minimum coordinates, (0,
|
||||
// 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)>> {
|
||||
let mut res: Vec<Vec<(int, int)>> =
|
||||
// rotations
|
||||
|
@ -124,9 +124,9 @@ fn transform(piece: Vec<(int, int)> , all: bool) -> Vec<Vec<(int, int)>> {
|
|||
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)
|
||||
// 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
|
||||
// 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),(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
|
||||
// here).
|
||||
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
|
||||
// stopped.
|
||||
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
|
||||
// reverse order, i.e. the board rotated by half a turn.
|
||||
data.nb += 2;
|
||||
|
@ -298,7 +298,7 @@ fn search(
|
|||
for id in range(0u, 10).filter(|id| board & (1 << (id + 50)) == 0) {
|
||||
// for each mask that fits on the board
|
||||
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;}
|
||||
search(masks, board | *m, i + 1, Cons(*m, &cur), data);
|
||||
}
|
||||
|
|
|
@ -36,8 +36,8 @@ fn dot(v: &[f64], u: &[f64]) -> f64 {
|
|||
|
||||
fn mult(v: Arc<RWLock<Vec<f64>>>, out: Arc<RWLock<Vec<f64>>>,
|
||||
f: fn(&Vec<f64>, uint) -> f64) {
|
||||
// We lanch in different tasks the work to be done. To finish
|
||||
// this fuction, we need to wait for the completion of every
|
||||
// We launch in different tasks the work to be done. To finish
|
||||
// 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
|
||||
// drop at the end of the work. At the end of this function, we
|
||||
// wait until the channel hang up.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// 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::cell::UnsafeCell;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// Verify that managed pointers scope is treated like ownoed pointers.
|
||||
// regresion test for #11586
|
||||
// Verify that managed pointers scope is treated like owned pointers.
|
||||
// regression test for #11586
|
||||
|
||||
|
||||
use std::gc::{GC, Gc};
|
||||
|
|
|
@ -72,7 +72,7 @@ static STATIC7: SafeStruct = SafeStruct{field1: Variant1, field2: Variant3(WithD
|
|||
//~^ ERROR static items are not allowed to have destructors
|
||||
|
||||
// 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.
|
||||
static STATIC8: SafeStruct = SafeStruct{field1: Variant1,
|
||||
..SafeStruct{field1: Variant1, field2: Variant1}};
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// 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
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
pub trait Sized {}
|
||||
|
||||
mod bar {
|
||||
// shouln't bring in too much
|
||||
// shouldn't bring in too much
|
||||
pub use self::glob::*;
|
||||
|
||||
// can't publicly re-export private items
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// 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
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
// 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.
|
||||
|
||||
#[rustc_variance]
|
||||
|
|
|
@ -13,7 +13,7 @@ use std::io::{File, Command};
|
|||
use std::rand::{task_rng, Rng};
|
||||
|
||||
// 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
|
||||
// about the ident being in the wrong place, with a span (and creating
|
||||
// this span used to upset the compiler).
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// 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,
|
||||
// the type can implement the trait anyway.
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
// option. this file may not be copied, modified, or distributed
|
||||
// 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;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// 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
|
||||
// overwrite the u16.
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ pub fn sleeper() -> Process {
|
|||
pub fn sleeper() -> Process {
|
||||
// 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
|
||||
// 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()
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// 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)]`
|
||||
|
||||
extern crate serialize;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
use std::hash::hash;
|
||||
|
||||
// testing mulptiple separate deriving attributes
|
||||
// testing multiple separate deriving attributes
|
||||
#[deriving(PartialEq)]
|
||||
#[deriving(Clone)]
|
||||
#[deriving(Hash)]
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// 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 {
|
||||
extern crate libc;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// Don't fail on blocks without results
|
||||
// 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.
|
||||
|
||||
struct S {x:()}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
// notes on this test case:
|
||||
// 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:
|
||||
//
|
||||
// Running /usr/local/bin/rustc:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#![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
|
||||
// from a vector to a slice. The drop glue was being invoked on
|
||||
// the temporary slice with a wrong type, triggering an LLVM assert.
|
||||
|
|
|
@ -28,7 +28,7 @@ fn main() {
|
|||
// 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
|
||||
// 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.
|
||||
other::bar();
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ pub fn main() {
|
|||
|
||||
for i in range(0u, 3) {
|
||||
// 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
|
||||
// naively borrowed &x for the lifetime
|
||||
// of the variable x, as we once did
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
//
|
||||
// The original issue causing the ICE: the LUB-computations during
|
||||
// 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.
|
||||
//
|
||||
// However, those encounters were occurring within the lexical scope
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue