taffy icon indicating copy to clipboard operation
taffy copied to clipboard

Add unit tests to flexbox layout algorithm

Open alice-i-cecile opened this issue 3 years ago • 1 comments

Now that the algorithm has been broken down into chunks in #88; we can start unit testing each of the parts.

This is essential for #39, and helps us decide what we want to do about the generated tests in #65.

If possible, I'd like to fuzz these (or use property-based testing): edge cases are hard.

alice-i-cecile avatar Jun 08 '22 18:06 alice-i-cecile

Here are the specs for reference: https://www.w3.org/TR/css-flexbox-1/#layout-algorithm The individual functions also link to the specs.

TimJentzsch avatar Jun 16 '22 13:06 TimJentzsch

Based on the current state of taffy, it appears that unit-testing individual pieces of the algorithm is difficult and that we instead should rely on the current method of testing.

In which case this issue should be closed and then we can open more specific issues if we spot a part of the code that allows being unit-tested.

Weibye avatar Apr 08 '23 13:04 Weibye