Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated tests are inconsistent #2

Open
NickAcPT opened this issue Jun 4, 2022 · 0 comments
Open

Generated tests are inconsistent #2

NickAcPT opened this issue Jun 4, 2022 · 0 comments

Comments

@NickAcPT
Copy link
Member

NickAcPT commented Jun 4, 2022

Software used

Chrome is up to date
Version 102.0.5005.63 (Official Build) (64-bit)

A test that shows these kinds of inconsistencies is the min_height test.

Comparison of results in min_height

Root element

assert_eq!(sprawl.layout(node).unwrap().size.width, 100f32);
assert_eq!(sprawl.layout(node).unwrap().size.height, 100f32);
assert_eq!(sprawl.layout(node).unwrap().location.x, 0f32);
assert_eq!(sprawl.layout(node).unwrap().location.y, 0f32);

Root is 100x100 on Chrome
Clearly the root is 100x100 and at 0x0, this checks out.

Root's first child (node 0)

assert_eq!(sprawl.layout(node0).unwrap().size.width, 100f32);
assert_eq!(sprawl.layout(node0).unwrap().size.height, 80f32);
assert_eq!(sprawl.layout(node0).unwrap().location.x, 0f32);
assert_eq!(sprawl.layout(node0).unwrap().location.y, 0f32);

Node 0 is 100x60 and at 0x0
This is.. odd? Sprawl is giving the wrong value here, since the test passes, when compared to what Chrome returns.

Please someone help, I've spent 3 hours yesterday trying to debug this issue.

Originally posted by @NickAcPT in DioxusLabs/taffy#46 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant