change based on review
This commit is contained in:
parent
347ed001e8
commit
6e99cb3989
@ -169,7 +169,7 @@ pub fn write_time_failures(&mut self, state: &ConsoleTestState) -> io::Result<()
|
||||
|
||||
fn write_test_name(&mut self, desc: &TestDesc) -> io::Result<()> {
|
||||
let name = desc.padded_name(self.max_name_len, desc.name.padding());
|
||||
self.write_plain(&format!("test {} {} ... ", name, desc.test_mode_string()))?;
|
||||
self.write_plain(&format!("test {} - {} ... ", name, desc.test_mode_string()))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ pub fn write_failures(&mut self, state: &ConsoleTestState) -> io::Result<()> {
|
||||
|
||||
fn write_test_name(&mut self, desc: &TestDesc) -> io::Result<()> {
|
||||
let name = desc.padded_name(self.max_name_len, desc.name.padding());
|
||||
self.write_plain(&format!("test {} {} ... ", name, desc.test_mode_string()))?;
|
||||
self.write_plain(&format!("test {} - {} ... ", name, desc.test_mode_string()))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -143,26 +143,26 @@ pub fn padded_name(&self, column_count: usize, align: NamePadding) -> String {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn test_mode_string(&self) -> String {
|
||||
pub fn test_mode_string(&self) -> &'static str {
|
||||
if self.ignore {
|
||||
return "ignore".to_string();
|
||||
return &"ignore";
|
||||
}
|
||||
match self.should_panic {
|
||||
options::ShouldPanic::Yes | options::ShouldPanic::YesWithMessage(_) => {
|
||||
return "should panic".to_string();
|
||||
return &"should panic";
|
||||
}
|
||||
_ => {}
|
||||
options::ShouldPanic::No => {}
|
||||
}
|
||||
if self.allow_fail {
|
||||
return "allow fail".to_string();
|
||||
return &"allow fail";
|
||||
}
|
||||
if self.compile_fail {
|
||||
return "compile fail".to_string();
|
||||
return &"compile fail";
|
||||
}
|
||||
if self.no_run {
|
||||
return "compile".to_string();
|
||||
return &"compile";
|
||||
}
|
||||
"run".to_string()
|
||||
&"run"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
running 2 tests
|
||||
test $DIR/cfg-test.rs - Bar (line 27) run ... ok
|
||||
test $DIR/cfg-test.rs - Foo (line 19) run ... ok
|
||||
test $DIR/cfg-test.rs - Bar (line 27) - run ... ok
|
||||
test $DIR/cfg-test.rs - Foo (line 19) - run ... ok
|
||||
|
||||
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/doc-test-doctest-feature.rs - Foo (line 9) run ... ok
|
||||
test $DIR/doc-test-doctest-feature.rs - Foo (line 9) - run ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/doc-test-rustdoc-feature.rs - Foo (line 10) run ... ok
|
||||
test $DIR/doc-test-rustdoc-feature.rs - Foo (line 10) - run ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
running 3 tests
|
||||
test $DIR/doctest-output.rs - (line 8) run ... ok
|
||||
test $DIR/doctest-output.rs - ExpandedStruct (line 24) run ... ok
|
||||
test $DIR/doctest-output.rs - foo::bar (line 18) run ... ok
|
||||
test $DIR/doctest-output.rs - (line 8) - run ... ok
|
||||
test $DIR/doctest-output.rs - ExpandedStruct (line 24) - run ... ok
|
||||
test $DIR/doctest-output.rs - foo::bar (line 18) - run ... ok
|
||||
|
||||
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/failed-doctest-compile-fail.rs - Foo (line 9) compile fail ... FAILED
|
||||
test $DIR/failed-doctest-compile-fail.rs - Foo (line 9) - compile fail ... FAILED
|
||||
|
||||
failures:
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/failed-doctest-missing-codes.rs - Foo (line 9) compile fail ... FAILED
|
||||
test $DIR/failed-doctest-missing-codes.rs - Foo (line 9) - compile fail ... FAILED
|
||||
|
||||
failures:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
running 2 tests
|
||||
test $DIR/failed-doctest-output.rs - OtherStruct (line 22) run ... FAILED
|
||||
test $DIR/failed-doctest-output.rs - SomeStruct (line 12) run ... FAILED
|
||||
test $DIR/failed-doctest-output.rs - OtherStruct (line 22) - run ... FAILED
|
||||
test $DIR/failed-doctest-output.rs - SomeStruct (line 12) - run ... FAILED
|
||||
|
||||
failures:
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/failed-doctest-should-panic.rs - Foo (line 9) run ... FAILED
|
||||
test $DIR/failed-doctest-should-panic.rs - Foo (line 9) - run ... FAILED
|
||||
|
||||
failures:
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/issue-80992.rs - test (line 7) compile fail ... ok
|
||||
test $DIR/issue-80992.rs - test (line 7) - compile fail ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/issue-81662-shortness.rs - foo (line 6) run ... FAILED
|
||||
test $DIR/issue-81662-shortness.rs - foo (line 6) - run ... FAILED
|
||||
|
||||
failures:
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
|
||||
running 7 tests
|
||||
test $DIR/no-run-flag.rs - f (line 11) compile ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 14) ignore ... ignored
|
||||
test $DIR/no-run-flag.rs - f (line 17) compile ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 23) compile fail ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 28) compile ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 32) compile ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 8) compile ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 11) - compile ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 14) - ignore ... ignored
|
||||
test $DIR/no-run-flag.rs - f (line 17) - compile ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 23) - compile fail ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 28) - compile ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 32) - compile ... ok
|
||||
test $DIR/no-run-flag.rs - f (line 8) - compile ... ok
|
||||
|
||||
test result: ok. 6 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/run-directory.rs - foo (line 10) run ... ok
|
||||
test $DIR/run-directory.rs - foo (line 10) - run ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/run-directory.rs - foo (line 19) run ... ok
|
||||
test $DIR/run-directory.rs - foo (line 19) - run ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/test-no_std.rs - f (line 10) run ... ok
|
||||
test $DIR/test-no_std.rs - f (line 10) - run ... ok
|
||||
|
||||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
|
||||
running 5 tests
|
||||
test $DIR/test-type.rs - f (line 12) ignore ... ignored
|
||||
test $DIR/test-type.rs - f (line 15) compile ... ok
|
||||
test $DIR/test-type.rs - f (line 21) compile fail ... ok
|
||||
test $DIR/test-type.rs - f (line 6) run ... ok
|
||||
test $DIR/test-type.rs - f (line 9) run ... ok
|
||||
test $DIR/test-type.rs - f (line 12) - ignore ... ignored
|
||||
test $DIR/test-type.rs - f (line 15) - compile ... ok
|
||||
test $DIR/test-type.rs - f (line 21) - compile fail ... ok
|
||||
test $DIR/test-type.rs - f (line 6) - run ... ok
|
||||
test $DIR/test-type.rs - f (line 9) - run ... ok
|
||||
|
||||
test result: ok. 4 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
running 1 test
|
||||
test $DIR/unparseable-doc-test.rs - foo (line 7) run ... FAILED
|
||||
test $DIR/unparseable-doc-test.rs - foo (line 7) - run ... FAILED
|
||||
|
||||
failures:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
running 2 tests
|
||||
test test1 run ... ok
|
||||
test test2 run ... ok
|
||||
test test1 - run ... ok
|
||||
test test2 - run ... ok
|
||||
|
||||
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
running 3 tests
|
||||
test test_no_run ignore ... ignored
|
||||
test test_ok run ... ok
|
||||
test test_panic should panic ... ok
|
||||
test test_no_run - ignore ... ignored
|
||||
test test_ok - run ... ok
|
||||
test test_panic - should panic ... ok
|
||||
|
||||
test result: ok. 2 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
|
||||
running 4 tests
|
||||
test it_fails run ... about to fail
|
||||
test it_fails - run ... about to fail
|
||||
FAILED
|
||||
test it_panics should panic ... about to panic
|
||||
test it_panics - should panic ... about to panic
|
||||
ok
|
||||
test it_works run ... about to succeed
|
||||
test it_works - run ... about to succeed
|
||||
ok
|
||||
test it_writes_to_stdio run ... hello, world
|
||||
test it_writes_to_stdio - run ... hello, world
|
||||
testing123
|
||||
ok
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
|
||||
running 5 tests
|
||||
test it_exits run ... FAILED
|
||||
test it_fails run ... FAILED
|
||||
test it_panics should panic ... ok
|
||||
test it_works run ... ok
|
||||
test no_residual_environment run ... ok
|
||||
test it_exits - run ... FAILED
|
||||
test it_fails - run ... FAILED
|
||||
test it_panics - should panic ... ok
|
||||
test it_works - run ... ok
|
||||
test no_residual_environment - run ... ok
|
||||
|
||||
failures:
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
running 2 tests
|
||||
test it_works run ... ok
|
||||
test it_works_too run ... ok
|
||||
test it_works - run ... ok
|
||||
test it_works_too - run ... ok
|
||||
|
||||
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
running 2 tests
|
||||
test thready_fail run ... FAILED
|
||||
test thready_pass run ... ok
|
||||
test thready_fail - run ... FAILED
|
||||
test thready_pass - run ... ok
|
||||
|
||||
failures:
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
running 2 tests
|
||||
test thready_fail run ... fee
|
||||
test thready_fail - run ... fee
|
||||
fie
|
||||
foe
|
||||
fum
|
||||
FAILED
|
||||
test thready_pass run ... fee
|
||||
test thready_pass - run ... fee
|
||||
fie
|
||||
foe
|
||||
fum
|
||||
|
Loading…
Reference in New Issue
Block a user