Update tests

This commit is contained in:
Olivier FAURE 2025-03-21 21:34:07 +01:00
parent e1f8a41484
commit 98b06edaa5
145 changed files with 49 additions and 49 deletions

View File

@ -78,7 +78,7 @@ That method gives our app a [`DriverCtx`] context, which we can use to access th
We create a `Driver` struct to store a very simple app's state, and we implement the `AppDriver` trait for it: We create a `Driver` struct to store a very simple app's state, and we implement the `AppDriver` trait for it:
```rust ```rust,ignore
use masonry::app::{AppDriver, DriverCtx}; use masonry::app::{AppDriver, DriverCtx};
use masonry::core::{Action, WidgetId}; use masonry::core::{Action, WidgetId};
use masonry::widgets::Label; use masonry::widgets::Label;
@ -171,7 +171,7 @@ The last step is to create our Winit window and start our main loop.
Our complete program therefore looks like this: Our complete program therefore looks like this:
```rust ```rust,ignore
fn main() { fn main() {
const VERTICAL_WIDGET_SPACING: f64 = 20.0; const VERTICAL_WIDGET_SPACING: f64 = 20.0;

View File

@ -70,14 +70,14 @@ use crate::testing::snapshot_utils::get_cargo_workspace;
/// ``` /// ```
/// use insta::assert_debug_snapshot; /// use insta::assert_debug_snapshot;
/// ///
/// use masonry::core::PointerButton; /// use masonry_core::core::PointerButton;
/// use masonry::widgets::Button; /// use masonry_core::widgets::Button;
/// use masonry::core::Action; /// use masonry_core::core::Action;
/// use masonry::assert_render_snapshot; /// use masonry_core::assert_render_snapshot;
/// use masonry::testing::widget_ids; /// use masonry_core::testing::widget_ids;
/// use masonry::testing::TestHarness; /// use masonry_core::testing::TestHarness;
/// use masonry::testing::TestWidgetExt; /// use masonry_core::testing::TestWidgetExt;
/// use masonry::theme::PRIMARY_LIGHT; /// use masonry_core::theme::PRIMARY_LIGHT;
/// ///
/// # /* /// # /*
/// #[test] /// #[test]

View File

@ -85,10 +85,10 @@ pub struct ReplaceChild {
/// Make one like this: /// Make one like this:
/// ///
/// ``` /// ```
/// # use masonry::widgets::Label; /// # use masonry_core::widgets::Label;
/// # use masonry::core::Update; /// # use masonry_core::core::Update;
/// use masonry::testing::{Recording, Record, TestWidgetExt}; /// use masonry_core::testing::{Recording, Record, TestWidgetExt};
/// use masonry::testing::TestHarness; /// use masonry_core::testing::TestHarness;
/// use assert_matches::assert_matches; /// use assert_matches::assert_matches;
/// let recording = Recording::default(); /// let recording = Recording::default();
/// let widget = Label::new("Hello").record(&recording); /// let widget = Label::new("Hello").record(&recording);

View File

@ -39,7 +39,7 @@ impl Button {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use masonry::widgets::Button; /// use masonry_core::widgets::Button;
/// ///
/// let button = Button::new("Increment"); /// let button = Button::new("Increment");
/// ``` /// ```
@ -52,8 +52,8 @@ impl Button {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use masonry::peniko::Color; /// use masonry_core::peniko::Color;
/// use masonry::widgets::{Button, Label}; /// use masonry_core::widgets::{Button, Label};
/// ///
/// let label = Label::new("Increment").with_brush(Color::new([0.5, 0.5, 0.5, 1.0])); /// let label = Label::new("Increment").with_brush(Color::new([0.5, 0.5, 0.5, 1.0]));
/// let button = Button::from_label(label); /// let button = Button::from_label(label);

Some files were not shown because too many files have changed in this diff Show More