Skip to content

Get rid of few warnings in tests #15850

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

Closed
wants to merge 1 commit into from
Closed
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
14 changes: 7 additions & 7 deletions src/libgraphviz/lib.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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