()
| 1269 | } |
| 1270 | #[test] |
| 1271 | fn is_simple() { |
| 1272 | test_is_simple("single variable", "<mi>x</mi>"); |
| 1273 | test_is_simple("single number", "<mn>1.2</mn>"); |
| 1274 | test_is_simple("negative number", "<mrow><mo>-</mo><mn>10</mn></mrow>"); |
| 1275 | test_is_simple("negative variable", "<mrow><mo>-</mo><mi>x</mi></mrow>"); |
| 1276 | test_is_simple("ordinal fraction", "<mfrac><mn>3</mn><mn>4</mn></mfrac>"); |
| 1277 | test_is_simple("x y", "<mrow><mi>x</mi><mo>⁢</mo><mi>y</mi></mrow>"); |
| 1278 | test_is_simple("negative two vars", |
| 1279 | "<mrow><mrow><mo>-</mo><mi>x</mi></mrow><mo>⁢</mo><mi>y</mi></mrow>"); |
| 1280 | test_is_simple("-2 x y", |
| 1281 | "<mrow><mrow><mo>-</mo><mn>2</mn></mrow> |
| 1282 | <mo>⁢</mo><mi>x</mi><mo>⁢</mo><mi>z</mi></mrow>"); |
| 1283 | test_is_simple("sin x", "<mrow><mi>sin</mi><mo>⁡</mo><mi>x</mi></mrow>"); |
| 1284 | test_is_simple("f(x)", "<mrow><mi>f</mi><mo>⁡</mo><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>"); |
| 1285 | test_is_simple("f(x+y)", |
| 1286 | "<mrow><mi>f</mi><mo>⁡</mo>\ |
| 1287 | <mrow><mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi><mo>)</mo></mrow></mrow>"); |
| 1288 | |
| 1289 | } |
| 1290 | |
| 1291 | #[test] |
| 1292 | fn is_not_simple() { |
no test coverage detected