MCPcopy Create free account
hub / github.com/daisy/MathCAT / is_simple

Function is_simple

src/xpath_functions.rs:1271–1289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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>&#x2062;</mo><mi>y</mi></mrow>");
1278 test_is_simple("negative two vars",
1279 "<mrow><mrow><mo>-</mo><mi>x</mi></mrow><mo>&#x2062;</mo><mi>y</mi></mrow>");
1280 test_is_simple("-2 x y",
1281 "<mrow><mrow><mo>-</mo><mn>2</mn></mrow>
1282 <mo>&#x2062;</mo><mi>x</mi><mo>&#x2062;</mo><mi>z</mi></mrow>");
1283 test_is_simple("sin x", "<mrow><mi>sin</mi><mo>&#x2061;</mo><mi>x</mi></mrow>");
1284 test_is_simple("f(x)", "<mrow><mi>f</mi><mo>&#x2061;</mo><mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow></mrow>");
1285 test_is_simple("f(x+y)",
1286 "<mrow><mi>f</mi><mo>&#x2061;</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() {

Callers 3

is_trig_argMethod · 0.85
is_functionMethod · 0.85
evaluateMethod · 0.85

Calls 1

test_is_simpleFunction · 0.85

Tested by

no test coverage detected