From db7faffd1e7ff7b983d642d5bbf112412a43ef8e Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Mon, 22 Nov 2021 18:44:28 +0100 Subject: [PATCH] Replace deprecated `test-env-log` by `test-log` The CI doesn't pass otherwise. --- druid-shell/Cargo.toml | 2 +- druid-shell/src/backend/mac/menu.rs | 2 +- druid-shell/src/backend/mac/screen.rs | 2 +- druid-shell/src/backend/windows/keycodes.rs | 2 +- druid/Cargo.toml | 4 ++-- druid/src/bloom.rs | 2 +- druid/src/box_constraints.rs | 2 +- druid/src/command.rs | 2 +- druid/src/core.rs | 2 +- druid/src/data.rs | 2 +- druid/src/env.rs | 2 +- druid/src/localization.rs | 2 +- druid/src/tests/invalidation_tests.rs | 2 +- druid/src/tests/layout_tests.rs | 2 +- druid/src/text/attribute.rs | 2 +- druid/src/text/editable_text.rs | 2 +- druid/src/widget/clip_box.rs | 2 +- druid/src/widget/flex.rs | 2 +- druid/src/widget/image.rs | 2 +- druid/src/widget/sized_box.rs | 2 +- druid/src/widget/svg.rs | 2 +- druid/src/widget/widget_ext.rs | 2 +- 22 files changed, 23 insertions(+), 23 deletions(-) diff --git a/druid-shell/Cargo.toml b/druid-shell/Cargo.toml index 54bd44e9e0..d0cf2d0033 100755 --- a/druid-shell/Cargo.toml +++ b/druid-shell/Cargo.toml @@ -98,7 +98,7 @@ features = ["Window", "MouseEvent", "CssStyleDeclaration", "WheelEvent", "KeyEve [dev-dependencies] piet-common = { version = "=0.5.0", features = ["png"] } static_assertions = "1.1.0" -test-env-log = { version = "0.2.5", features = ["trace"], default-features = false } +test-log = { version = "0.2.8", features = ["trace"], default-features = false } tracing-subscriber = "0.2.15" unicode-segmentation = "1.7.0" diff --git a/druid-shell/src/backend/mac/menu.rs b/druid-shell/src/backend/mac/menu.rs index a764128251..7e49984e9c 100644 --- a/druid-shell/src/backend/mac/menu.rs +++ b/druid-shell/src/backend/mac/menu.rs @@ -180,7 +180,7 @@ impl HotKey { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] fn strip_access() { diff --git a/druid-shell/src/backend/mac/screen.rs b/druid-shell/src/backend/mac/screen.rs index 15405038e2..f6a3f2f134 100644 --- a/druid-shell/src/backend/mac/screen.rs +++ b/druid-shell/src/backend/mac/screen.rs @@ -74,7 +74,7 @@ mod test { use crate::backend::mac::screen::transform_coords; use crate::Monitor; use kurbo::Rect; - use test_env_log::test; + use test_log::test; fn pair(rect: Rect) -> (Rect, Rect) { (rect, rect) diff --git a/druid-shell/src/backend/windows/keycodes.rs b/druid-shell/src/backend/windows/keycodes.rs index fa4c3056f6..f14d620124 100644 --- a/druid-shell/src/backend/windows/keycodes.rs +++ b/druid-shell/src/backend/windows/keycodes.rs @@ -214,7 +214,7 @@ map_keys! { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] fn win_vk() { diff --git a/druid/Cargo.toml b/druid/Cargo.toml index b702450eac..5590ec56b3 100644 --- a/druid/Cargo.toml +++ b/druid/Cargo.toml @@ -82,8 +82,8 @@ float-cmp = { version = "0.8.0", features = ["std"], default-features = false } tempfile = "=3.1.0" piet-common = { version = "=0.5.0", features = ["png"] } pulldown-cmark = { version = "0.8", default-features = false } -test-env-log = { version = "0.2.5", features = ["trace"], default-features = false } -# test-env-log needs it +test-log = { version = "0.2.8", features = ["trace"], default-features = false } +# test-log needs it tracing-subscriber = { version = "0.2.15", features = ["env-filter"] } [target.'cfg(not(target_arch="wasm32"))'.dev-dependencies] diff --git a/druid/src/bloom.rs b/druid/src/bloom.rs index 948daed966..a8f51d30e1 100644 --- a/druid/src/bloom.rs +++ b/druid/src/bloom.rs @@ -130,7 +130,7 @@ impl Default for Bloom { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] fn very_good_test() { diff --git a/druid/src/box_constraints.rs b/druid/src/box_constraints.rs index cc564c9196..8cb1a53eff 100644 --- a/druid/src/box_constraints.rs +++ b/druid/src/box_constraints.rs @@ -275,7 +275,7 @@ impl BoxConstraints { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; fn bc(min_width: f64, min_height: f64, max_width: f64, max_height: f64) -> BoxConstraints { BoxConstraints::new( diff --git a/druid/src/command.rs b/druid/src/command.rs index 07c7027f7a..1b4050b523 100644 --- a/druid/src/command.rs +++ b/druid/src/command.rs @@ -659,7 +659,7 @@ impl std::fmt::Debug for Notification { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] fn get_payload() { diff --git a/druid/src/core.rs b/druid/src/core.rs index fe6c01eea9..411e8ae53d 100644 --- a/druid/src/core.rs +++ b/druid/src/core.rs @@ -1368,7 +1368,7 @@ mod tests { use crate::widget::{Button, Flex, Scroll, Split, TextBox}; use crate::{WidgetExt, WindowHandle, WindowId}; use std::collections::HashMap; - use test_env_log::test; + use test_log::test; const ID_1: WidgetId = WidgetId::reserved(0); const ID_2: WidgetId = WidgetId::reserved(1); diff --git a/druid/src/data.rs b/druid/src/data.rs index f04197adfc..6fe7b14cb7 100644 --- a/druid/src/data.rs +++ b/druid/src/data.rs @@ -620,7 +620,7 @@ impl Data for [T; N] { #[cfg(test)] mod test { use super::Data; - use test_env_log::test; + use test_log::test; #[test] fn array_data() { diff --git a/druid/src/env.rs b/druid/src/env.rs index 70e147e97f..926064a89a 100644 --- a/druid/src/env.rs +++ b/druid/src/env.rs @@ -679,7 +679,7 @@ impl From<(f64, f64, f64, f64)> for KeyOrValue { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] fn string_key_or_value() { diff --git a/druid/src/localization.rs b/druid/src/localization.rs index 1b01109943..57c61ad378 100644 --- a/druid/src/localization.rs +++ b/druid/src/localization.rs @@ -397,7 +397,7 @@ impl<'a, T: std::fmt::Display> std::fmt::Display for PrintLocales<'a, T> { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] fn resolve() { diff --git a/druid/src/tests/invalidation_tests.rs b/druid/src/tests/invalidation_tests.rs index 0a4a45b96c..659878c4af 100644 --- a/druid/src/tests/invalidation_tests.rs +++ b/druid/src/tests/invalidation_tests.rs @@ -15,7 +15,7 @@ //! Tests related to propagation of invalid rects. use float_cmp::approx_eq; -use test_env_log::test; +use test_log::test; use super::*; diff --git a/druid/src/tests/layout_tests.rs b/druid/src/tests/layout_tests.rs index 7034d40368..05c1da7927 100644 --- a/druid/src/tests/layout_tests.rs +++ b/druid/src/tests/layout_tests.rs @@ -15,7 +15,7 @@ //! Tests related to layout. use float_cmp::approx_eq; -use test_env_log::test; +use test_log::test; use super::*; diff --git a/druid/src/text/attribute.rs b/druid/src/text/attribute.rs index 2de29deb54..b9a2fef40d 100644 --- a/druid/src/text/attribute.rs +++ b/druid/src/text/attribute.rs @@ -376,7 +376,7 @@ impl Default for SpanSet { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] fn smoke_test_spans() { diff --git a/druid/src/text/editable_text.rs b/druid/src/text/editable_text.rs index 7d05d73db8..89c4b76c1d 100644 --- a/druid/src/text/editable_text.rs +++ b/druid/src/text/editable_text.rs @@ -369,7 +369,7 @@ pub fn len_utf8_from_first_byte(b: u8) -> usize { mod tests { use super::*; use crate::Data; - use test_env_log::test; + use test_log::test; #[test] fn replace() { diff --git a/druid/src/widget/clip_box.rs b/druid/src/widget/clip_box.rs index eb86285e30..683e83b4af 100644 --- a/druid/src/widget/clip_box.rs +++ b/druid/src/widget/clip_box.rs @@ -424,7 +424,7 @@ impl> Widget for ClipBox { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] fn pan_to_visible() { diff --git a/druid/src/widget/flex.rs b/druid/src/widget/flex.rs index 05303a244f..0b5bc3372a 100644 --- a/druid/src/widget/flex.rs +++ b/druid/src/widget/flex.rs @@ -1044,7 +1044,7 @@ impl Child { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] #[allow(clippy::cognitive_complexity)] diff --git a/druid/src/widget/image.rs b/druid/src/widget/image.rs index 733a3bbb74..6f0c17ba97 100644 --- a/druid/src/widget/image.rs +++ b/druid/src/widget/image.rs @@ -258,7 +258,7 @@ impl Widget for Image { mod tests { use super::*; use crate::piet::ImageFormat; - use test_env_log::test; + use test_log::test; /// Painting an empty image shouldn't crash druid. #[test] diff --git a/druid/src/widget/sized_box.rs b/druid/src/widget/sized_box.rs index 7800b0fc41..36d45b502d 100644 --- a/druid/src/widget/sized_box.rs +++ b/druid/src/widget/sized_box.rs @@ -210,7 +210,7 @@ impl Widget for SizedBox { mod tests { use super::*; use crate::widget::Label; - use test_env_log::test; + use test_log::test; #[test] fn expand() { diff --git a/druid/src/widget/svg.rs b/druid/src/widget/svg.rs index db05dfe758..cce0758fe0 100644 --- a/druid/src/widget/svg.rs +++ b/druid/src/widget/svg.rs @@ -435,7 +435,7 @@ fn color_from_svg(c: usvg::Color, opacity: usvg::Opacity) -> Color { #[cfg(test)] mod tests { use super::*; - use test_env_log::test; + use test_log::test; #[test] fn usvg_transform_vs_affine() { diff --git a/druid/src/widget/widget_ext.rs b/druid/src/widget/widget_ext.rs index 27dc7efe3b..4c5732d16b 100644 --- a/druid/src/widget/widget_ext.rs +++ b/druid/src/widget/widget_ext.rs @@ -329,7 +329,7 @@ mod tests { use super::*; use crate::widget::Slider; use crate::Color; - use test_env_log::test; + use test_log::test; #[test] fn container_reuse() {