File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -406,8 +406,9 @@ impl EmbeddedThemeName {
406406 /// EmbeddedThemeName::Leet.as_name(),
407407 /// "1337",
408408 /// );
409+ /// // `.as_name()` is used for `Display` too!
409410 /// assert_eq!(
410- /// EmbeddedThemeName::SolarizedDark.as_name (),
411+ /// EmbeddedThemeName::SolarizedDark.to_string (),
411412 /// "Solarized (dark)",
412413 /// );
413414 /// ```
@@ -463,6 +464,19 @@ mod tests {
463464
464465 use strum:: IntoEnumIterator ;
465466
467+ #[ test]
468+ fn theme_set_roundtrip ( ) {
469+ let theme_set: ThemeSet = extra ( ) . into ( ) ;
470+ let lazy: LazyThemeSet = ( & theme_set) . into ( ) ;
471+ let theme_set_again: ThemeSet = lazy. into ( ) ;
472+ let eq = theme_set
473+ . themes
474+ . into_iter ( )
475+ . zip ( theme_set_again. themes . into_iter ( ) )
476+ . all ( |( pair1, pair2) | pair1 == pair2) ;
477+ assert ! ( eq) ;
478+ }
479+
466480 #[ test]
467481 fn embedded_theme_is_exhaustive ( ) {
468482 let theme_set = extra ( ) ;
You can’t perform that action at this time.
0 commit comments