mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
Get rid of few warnings in tests
This commit is contained in:
committed by
Alex Crichton
parent
dfacef532d
commit
36e1f2db30
@@ -548,7 +548,7 @@ struct Edge {
|
||||
from: uint, to: uint, label: &'static str
|
||||
}
|
||||
|
||||
fn Edge(from: uint, to: uint, label: &'static str) -> Edge {
|
||||
fn edge(from: uint, to: uint, label: &'static str) -> Edge {
|
||||
Edge { from: from, to: to, label: label }
|
||||
}
|
||||
|
||||
@@ -723,7 +723,7 @@ fn single_node() {
|
||||
fn single_edge() {
|
||||
let labels : Trivial = UnlabelledNodes(2);
|
||||
let result = test_input(LabelledGraph::new("single_edge", labels,
|
||||
vec!(Edge(0, 1, "E"))));
|
||||
vec!(edge(0, 1, "E"))));
|
||||
assert_eq!(result.unwrap().as_slice(),
|
||||
r#"digraph single_edge {
|
||||
N0[label="N0"];
|
||||
@@ -737,7 +737,7 @@ fn single_edge() {
|
||||
fn single_cyclic_node() {
|
||||
let labels : Trivial = UnlabelledNodes(1);
|
||||
let r = test_input(LabelledGraph::new("single_cyclic_node", labels,
|
||||
vec!(Edge(0, 0, "E"))));
|
||||
vec!(edge(0, 0, "E"))));
|
||||
assert_eq!(r.unwrap().as_slice(),
|
||||
r#"digraph single_cyclic_node {
|
||||
N0[label="N0"];
|
||||
@@ -751,8 +751,8 @@ fn hasse_diagram() {
|
||||
let labels = AllNodesLabelled(vec!("{x,y}", "{x}", "{y}", "{}"));
|
||||
let r = test_input(LabelledGraph::new(
|
||||
"hasse_diagram", labels,
|
||||
vec!(Edge(0, 1, ""), Edge(0, 2, ""),
|
||||
Edge(1, 3, ""), Edge(2, 3, ""))));
|
||||
vec!(edge(0, 1, ""), edge(0, 2, ""),
|
||||
edge(1, 3, ""), edge(2, 3, ""))));
|
||||
assert_eq!(r.unwrap().as_slice(),
|
||||
r#"digraph hasse_diagram {
|
||||
N0[label="{x,y}"];
|
||||
@@ -785,8 +785,8 @@ fn left_aligned_text() {
|
||||
|
||||
let g = LabelledGraphWithEscStrs::new(
|
||||
"syntax_tree", labels,
|
||||
vec!(Edge(0, 1, "then"), Edge(0, 2, "else"),
|
||||
Edge(1, 3, ";"), Edge(2, 3, ";" )));
|
||||
vec!(edge(0, 1, "then"), edge(0, 2, "else"),
|
||||
edge(1, 3, ";"), edge(2, 3, ";" )));
|
||||
|
||||
render(&g, &mut writer).unwrap();
|
||||
let mut r = BufReader::new(writer.get_ref());
|
||||
|
||||
@@ -842,7 +842,6 @@ fn len_if_padded(t: &TestDescAndFn) -> uint {
|
||||
#[test]
|
||||
fn should_sort_failures_before_printing_them() {
|
||||
use std::io::MemWriter;
|
||||
use std::str;
|
||||
|
||||
let test_a = TestDesc {
|
||||
name: StaticTestName("a"),
|
||||
|
||||
@@ -520,7 +520,6 @@ mod test {
|
||||
use super::{Uuid, VariantMicrosoft, VariantNCS, VariantRFC4122,
|
||||
Version1Mac, Version2Dce, Version3Md5, Version4Random,
|
||||
Version5Sha1};
|
||||
use std::str;
|
||||
use std::io::MemWriter;
|
||||
use std::rand;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user