-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AUTO : Forward from derives_refactoring_5 to alpha (#1397)
global error tools cleaning
- Loading branch information
1 parent
14e1bdf
commit f29b6d0
Showing
88 changed files
with
976 additions
and
1,098 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#![ allow( unused_imports ) ] | ||
use super::*; | ||
|
||
#[ test ] | ||
fn err_with() | ||
{ | ||
|
||
use the_module::ErrWith; | ||
let result : Result< (), std::io::Error > = Err( std::io::Error::new( std::io::ErrorKind::Other, "an error occurred" ) ); | ||
let got : Result< (), ( &str, std::io::Error ) > = result.err_with( || "additional context" ); | ||
let exp : Result< (), ( &str, std::io::Error ) > = Err( ( "additional context", std::io::Error::new( std::io::ErrorKind::Other, "an error occurred" ) ) ); | ||
assert_eq!( got.as_ref().unwrap_err().0, exp.as_ref().unwrap_err().0 ); | ||
assert!( got.is_err() ); | ||
|
||
} | ||
|
||
// | ||
|
||
#[ test ] | ||
fn err_with_report() | ||
{ | ||
|
||
use error_tools::ErrWith; | ||
let result : Result< (), std::io::Error > = Err( std::io::Error::new( std::io::ErrorKind::Other, "an error occurred" ) ); | ||
let report = "additional context"; | ||
let got : Result< (), ( &str, std::io::Error ) > = result.err_with_report( &report ); | ||
let exp : Result< (), ( &str, std::io::Error ) > = Err( ( "additional context", std::io::Error::new( std::io::ErrorKind::Other, "an error occurred" ) ) ); | ||
assert_eq!( got.as_ref().unwrap_err().0, exp.as_ref().unwrap_err().0 ); | ||
assert!( got.is_err() ); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#[ allow( unused_imports ) ] | ||
use super::*; | ||
|
||
mod basic_test; | ||
mod for_app_test; | ||
mod assert_test; | ||
mod basic_test; | ||
mod err_with_test; | ||
mod untyped_test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.