Assert the truncated polynomial matches an expected LaTeX expression * exactly (structural/symbolic equality of exact coefficients).
( fLatex: string, expectedLatex: string, x0Latex?: string, n?: number )
| 43 | /** Assert the truncated polynomial matches an expected LaTeX expression |
| 44 | * exactly (structural/symbolic equality of exact coefficients). */ |
| 45 | function expectPoly( |
| 46 | fLatex: string, |
| 47 | expectedLatex: string, |
| 48 | x0Latex?: string, |
| 49 | n?: number |
| 50 | ) { |
| 51 | const got = normal(fLatex, x0Latex, n); |
| 52 | const want = ce.parse(expectedLatex); |
| 53 | if (!got.isSame(want)) expect(got.latex).toBe(want.latex); |
| 54 | } |
| 55 | |
| 56 | // |
| 57 | // Exact-coefficient battery (§6) |
no test coverage detected