(a, b, gap = 0)
| 36 | // text b to indicate a call from a to b. Expect a gap of the specified |
| 37 | // number of rows. |
| 38 | function checkCalls(a, b, gap = 0) { |
| 39 | test.setContext("checkCalls", a, b, gap); |
| 40 | const ra = rect(a); |
| 41 | const rb = rect(b); |
| 42 | if (!ra || !rb) return; |
| 43 | |
| 44 | const pixelGap = gap * rb.height; |
| 45 | if (rb.top != ra.bottom + pixelGap) { |
| 46 | test.err("not above"); |
| 47 | } |
| 48 | // TODO: Allow checking boxes above pivots. |
| 49 | if (rb.left < ra.left || rb.right > ra.right) { |
| 50 | test.err("horizontal span of", a, "is not nested inside horizontal span of", b); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | // checkWidth checks that the width of the box with text t is approximately |
| 55 | // the specified fraction of the total width. |
no test coverage detected
searching dependent graphs…