From fb0e6a9deedd2135a4afabbd1abe50b69b4b1a6c Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Fri, 25 Mar 2016 21:29:11 -0400 Subject: [PATCH] tests/sort: simplify input to helper --- tests/sort.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/sort.rs b/tests/sort.rs index a12388378..5544290c8 100644 --- a/tests/sort.rs +++ b/tests/sort.rs @@ -8,45 +8,45 @@ static UTIL_NAME: &'static str = "sort"; #[test] fn test_numeric_floats_and_ints() { - test_helper("numeric_floats_and_ints", &String::from("-n")); + test_helper("numeric_floats_and_ints", "-n"); } #[test] fn test_numeric_floats() { - test_helper("numeric_floats", &String::from("-n")); + test_helper("numeric_floats", "-n"); } #[test] fn test_numeric_unfixed_floats() { - test_helper("numeric_unfixed_floats", &String::from("-n")); + test_helper("numeric_unfixed_floats", "-n"); } #[test] fn test_numeric_fixed_floats() { - test_helper("numeric_fixed_floats", &String::from("-n")); + test_helper("numeric_fixed_floats", "-n"); } #[test] fn test_numeric_unsorted_ints() { - test_helper("numeric_unsorted_ints", &String::from("-n")); + test_helper("numeric_unsorted_ints", "-n"); } #[test] fn test_human_block_sizes() { - test_helper("human_block_sizes", &String::from("-h")); + test_helper("human_block_sizes", "-h"); } #[test] fn test_month_default() { - test_helper("month_default", &String::from("-M")); + test_helper("month_default", "-M"); } #[test] fn test_default_unsorted_ints() { - test_helper("default_unsorted_ints", &String::from("")); + test_helper("default_unsorted_ints", ""); } -fn test_helper(file_name: &str, args: &String) { +fn test_helper(file_name: &str, args: &str) { let (at, mut ucmd) = testing(UTIL_NAME); ucmd.arg(args); let out = ucmd.arg(format!("{}{}", file_name, ".txt")).run().stdout;