Skip to content

Commit

Permalink
Strengthened test_convert_from
Browse files Browse the repository at this point in the history
  • Loading branch information
bushrat011899 committed Aug 26, 2023
1 parent a50de4a commit 6c67796
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions crates/bevy_ui/src/layout/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ mod tests {
display: Display::Flex,
position_type: PositionType::Absolute,
left: Val::ZERO,
right: Val::ZERO,
top: Val::Auto,
right: Val::Percent(50.),
top: Val::Px(12.),
bottom: Val::Auto,
direction: crate::Direction::Inherit,
flex_direction: FlexDirection::ColumnReverse,
Expand All @@ -418,21 +418,21 @@ mod tests {
justify_content: JustifyContent::SpaceEvenly,
margin: UiRect {
left: Val::ZERO,
right: Val::ZERO,
top: Val::Auto,
right: Val::Px(10.),
top: Val::Percent(15.),
bottom: Val::Auto,
},
padding: UiRect {
left: Val::ZERO,
right: Val::ZERO,
top: Val::ZERO,
left: Val::Percent(13.),
right: Val::Px(21.),
top: Val::Auto,
bottom: Val::ZERO,
},
border: UiRect {
left: Val::ZERO,
left: Val::Px(14.),
right: Val::ZERO,
top: Val::Auto,
bottom: Val::ZERO,
bottom: Val::Percent(31.),
},
flex_grow: 1.,
flex_shrink: 0.,
Expand Down Expand Up @@ -477,11 +477,11 @@ mod tests {
);
assert_eq!(
taffy_style.inset.right,
taffy::style::LengthPercentageAuto::ZERO
taffy::style::LengthPercentageAuto::Percent(0.5)
);
assert_eq!(
taffy_style.inset.top,
taffy::style::LengthPercentageAuto::Auto
taffy::style::LengthPercentageAuto::Points(12.)
);
assert_eq!(
taffy_style.inset.bottom,
Expand Down Expand Up @@ -516,23 +516,23 @@ mod tests {
);
assert_eq!(
taffy_style.margin.right,
taffy::style::LengthPercentageAuto::ZERO
taffy::style::LengthPercentageAuto::Points(10.)
);
assert_eq!(
taffy_style.margin.top,
taffy::style::LengthPercentageAuto::Auto
taffy::style::LengthPercentageAuto::Percent(0.15)
);
assert_eq!(
taffy_style.margin.bottom,
taffy::style::LengthPercentageAuto::Auto
);
assert_eq!(
taffy_style.padding.left,
taffy::style::LengthPercentage::ZERO
taffy::style::LengthPercentage::Percent(0.13)
);
assert_eq!(
taffy_style.padding.right,
taffy::style::LengthPercentage::ZERO
taffy::style::LengthPercentage::Points(21.)
);
assert_eq!(
taffy_style.padding.top,
Expand All @@ -544,7 +544,7 @@ mod tests {
);
assert_eq!(
taffy_style.border.left,
taffy::style::LengthPercentage::ZERO
taffy::style::LengthPercentage::Points(14.)
);
assert_eq!(
taffy_style.border.right,
Expand All @@ -553,7 +553,7 @@ mod tests {
assert_eq!(taffy_style.border.top, taffy::style::LengthPercentage::ZERO);
assert_eq!(
taffy_style.border.bottom,
taffy::style::LengthPercentage::ZERO
taffy::style::LengthPercentage::Percent(0.31)
);
assert_eq!(taffy_style.flex_grow, 1.);
assert_eq!(taffy_style.flex_shrink, 0.);
Expand Down

0 comments on commit 6c67796

Please sign in to comment.