Skip to content

Commit

Permalink
Add i18n function.
Browse files Browse the repository at this point in the history
  • Loading branch information
gudaoxuri committed Jul 20, 2022
1 parent b9fa9f7 commit 16f0141
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_basic_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ async fn test_basic_error() -> TardisResult<()> {

let inst = TardisFuns::inst("m1".to_string(), Some("zh-CN".to_string()));

assert_eq!(inst.err().not_found("res", "add", "Not found RES1 resource in m1").message(), "在m1中找不到[RES1]资源");
assert_eq!(inst.err().not_found("res", "add", "Not found RES1 resource in m1", "").message(), "在m1中找不到[RES1]资源");

assert_eq!(
inst.err().not_found("xx", "add", "Not found RES1 resource in m1").message(),
inst.err().not_found("xx", "add", "Not found RES1 resource in m1", "").message(),
"Not found RES1 resource in m1"
);

assert_eq!(
inst.err().not_found("xx", "add", &inst.err().localized_message("404-m1-res-add", "Not found RES1 resource in m1")).message(),
inst.err().not_found("xx", "add", "Not found RES1 resource in m1", "404-m1-res-add").message(),
"在m1中找不到[RES1]资源"
);

Expand Down

0 comments on commit 16f0141

Please sign in to comment.