(layout1, layout2)
| 310 | |
| 311 | // Helper to check if layouts have same items at same positions |
| 312 | function layoutsMatch(layout1, layout2) { |
| 313 | if (layout1.length !== layout2.length) return false; |
| 314 | for (const item1 of layout1) { |
| 315 | const item2 = layout2.find(l => l.i === item1.i); |
| 316 | if (!item2) return false; |
| 317 | if (item1.x !== item2.x || item1.y !== item2.y) return false; |
| 318 | } |
| 319 | return true; |
| 320 | } |
| 321 | |
| 322 | it("produces same result as standard compactor for simple grid layouts", () => { |
| 323 | const layout = generateGridLayout(20, 12); |
no outgoing calls
no test coverage detected
searching dependent graphs…