Skip to content

Commit 04a93b1

Browse files
authored
Improve the WeekInformation test (#7350)
Feedback from #7335 Demonstrates that #4413 is fixed
1 parent 1fb518a commit 04a93b1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/calendar/src/week.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ define_preferences!(
2828
/// ```
2929
/// use icu::calendar::week::WeekInformation;
3030
/// use icu::calendar::types::Weekday;
31-
/// use icu::locale::locale;
31+
/// use icu::locale::{locale, Locale};
3232
///
3333
/// // For en-US
3434
/// let info = WeekInformation::try_new(locale!("en-US").into()).unwrap();
@@ -38,9 +38,13 @@ define_preferences!(
3838
/// let info = WeekInformation::try_new(locale!("de-DE").into()).unwrap();
3939
/// assert_eq!(info.first_weekday, Weekday::Monday);
4040
///
41-
/// // For en-US with a Germany preference override
41+
/// // For en-US with a Germany region preference override
4242
/// let info = WeekInformation::try_new(locale!("en-US-u-rg-dezzzz").into()).unwrap();
4343
/// assert_eq!(info.first_weekday, Weekday::Monday);
44+
///
45+
/// // As above but also with a First Weekday override
46+
/// let info = WeekInformation::try_new(Locale::try_from_str("en-US-u-rg-dezzzz-fw-wed").unwrap().into()).unwrap();
47+
/// assert_eq!(info.first_weekday, Weekday::Wednesday);
4448
/// ```
4549
#[derive(Clone, Copy, Debug)]
4650
#[non_exhaustive]

0 commit comments

Comments
 (0)