From 869fe2f50d372b25f7ef8ccd9a10db22a8bc8de6 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 2 Sep 2023 16:42:53 -0700 Subject: [PATCH] Remove text_drection_from_lang_code The test above should cover this sufficiently. --- src/config.rs | 111 -------------------------------------------------- 1 file changed, 111 deletions(-) diff --git a/src/config.rs b/src/config.rs index a740475c..7f56e797 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1248,117 +1248,6 @@ mod tests { assert_eq!(cfg.realized_text_direction(), TextDirection::RightToLeft); } - #[test] - fn text_drection_from_lang_code() { - // test all right-to-left languages - assert_eq!( - TextDirection::from_lang_code("ar"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("ara"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("arc"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("ae"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("ave"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("egy"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("he"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("heb"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("nqo"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("pal"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("phn"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("sam"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("syc"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("syr"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("fa"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("per"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("fas"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("ku"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("kur"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("ur"), - TextDirection::RightToLeft - ); - assert_eq!( - TextDirection::from_lang_code("urd"), - TextDirection::RightToLeft - ); - - // test some left-to-right languages - assert_eq!( - TextDirection::from_lang_code("de"), - TextDirection::LeftToRight - ); - assert_eq!( - TextDirection::from_lang_code("en"), - TextDirection::LeftToRight - ); - assert_eq!( - TextDirection::from_lang_code("es"), - TextDirection::LeftToRight - ); - assert_eq!( - TextDirection::from_lang_code("ja"), - TextDirection::LeftToRight - ); - assert_eq!( - TextDirection::from_lang_code("sv"), - TextDirection::LeftToRight - ); - } - #[test] #[should_panic(expected = "Invalid configuration file")] fn invalid_language_type_error() {