Skip to content

Commit

Permalink
Get rid of few warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sawyer47 authored and alexcrichton committed Jul 21, 2014
1 parent dfacef5 commit 36e1f2d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/libgraphviz/lib.rs
Expand Up @@ -548,7 +548,7 @@ mod tests {
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 }
}

Expand Down Expand Up @@ -723,7 +723,7 @@ r#"digraph 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"];
Expand All @@ -737,7 +737,7 @@ r#"digraph 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"];
Expand All @@ -751,8 +751,8 @@ r#"digraph single_cyclic_node {
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}"];
Expand Down Expand Up @@ -785,8 +785,8 @@ r#"digraph hasse_diagram {

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());
Expand Down
1 change: 0 additions & 1 deletion src/libtest/lib.rs
Expand Up @@ -842,7 +842,6 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn> ) -> io::IoR
#[test]
fn should_sort_failures_before_printing_them() {
use std::io::MemWriter;
use std::str;

let test_a = TestDesc {
name: StaticTestName("a"),
Expand Down
1 change: 0 additions & 1 deletion src/libuuid/lib.rs
Expand Up @@ -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;

Expand Down

0 comments on commit 36e1f2d

Please sign in to comment.