From b7cceed0559335c2482668550cf5398ccec0cf01 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Tue, 6 Dec 2022 14:37:34 +0100 Subject: [PATCH] more hex_color fixes --- crates/ecolor/src/hex_color.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/ecolor/src/hex_color.rs b/crates/ecolor/src/hex_color.rs index da521e31327..450e6a8692a 100644 --- a/crates/ecolor/src/hex_color.rs +++ b/crates/ecolor/src/hex_color.rs @@ -20,9 +20,12 @@ macro_rules! hex_color { #[test] fn test_from_rgb_hex() { - assert_eq!(Color32::from_rgb(0x20, 0x21, 0x22), hex_color!("#202122")); assert_eq!( - Color32::from_rgb_additive(0x20, 0x21, 0x22), + crate::Color32::from_rgb(0x20, 0x21, 0x22), + hex_color!("#202122") + ); + assert_eq!( + crate::Color32::from_rgb_additive(0x20, 0x21, 0x22), hex_color!("#202122").additive() ); } @@ -30,7 +33,7 @@ fn test_from_rgb_hex() { #[test] fn test_from_rgba_hex() { assert_eq!( - Color32::from_rgba_unmultiplied(0x20, 0x21, 0x22, 0x50), + crate::Color32::from_rgba_unmultiplied(0x20, 0x21, 0x22, 0x50), hex_color!("20212250") ); }