OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Include test fixture. |
| 6 GEN_INCLUDE(['../testing/chromevox_unittest_base.js']); |
| 7 |
| 8 /** |
| 9 * Test fixture. |
| 10 * @constructor |
| 11 * @extends {ChromeVoxUnitTestBase} |
| 12 */ |
| 13 function CvoxSemanticTreeUnitTest() {} |
| 14 |
| 15 CvoxSemanticTreeUnitTest.prototype = { |
| 16 __proto__: ChromeVoxUnitTestBase.prototype, |
| 17 |
| 18 /** @override */ |
| 19 closureModuleDeps: [ |
| 20 'cvox.SemanticAttr', |
| 21 'cvox.SemanticTree', |
| 22 'cvox.SemanticUtil', |
| 23 'cvox.XpathUtil' |
| 24 ], |
| 25 |
| 26 /** @override */ |
| 27 setUp: function() { |
| 28 this.nodeCounter = 0; |
| 29 this.xpathBlacklist = []; |
| 30 this.brief = true; |
| 31 this.setupAttributes(); |
| 32 }, |
| 33 |
| 34 /** |
| 35 * Adds some unicode characters via hex code to the right category. |
| 36 * |
| 37 * This method is necessary as the test framework can not handle code |
| 38 * containing utf-8 encoded characters. |
| 39 */ |
| 40 setupAttributes: function() { |
| 41 var attr = cvox.SemanticAttr.getInstance(); |
| 42 attr.neutralFences.unshift(cvox.SemanticUtil.numberToUnicode(0x00A6)); |
| 43 attr.dashes.unshift(cvox.SemanticUtil.numberToUnicode(0x2015)); |
| 44 attr.neutralFences.unshift(cvox.SemanticUtil.numberToUnicode(0x2016)); |
| 45 attr.arrows.unshift(cvox.SemanticUtil.numberToUnicode(0x2192)); |
| 46 attr.sumOps.unshift(cvox.SemanticUtil.numberToUnicode(0x2211)); |
| 47 attr.additions.unshift(cvox.SemanticUtil.numberToUnicode(0x2213)); |
| 48 attr.multiplications.unshift(cvox.SemanticUtil.numberToUnicode(0x2218)); |
| 49 attr.intOps.unshift(cvox.SemanticUtil.numberToUnicode(0x222B)); |
| 50 attr.inequalities.unshift(cvox.SemanticUtil.numberToUnicode(0x2264)); |
| 51 attr.additions.unshift(cvox.SemanticUtil.numberToUnicode(0x2295)); |
| 52 var open = cvox.SemanticUtil.numberToUnicode(0x3008); |
| 53 var close = cvox.SemanticUtil.numberToUnicode(0x3009); |
| 54 attr.openClosePairs[open] = close; |
| 55 attr.leftFences.unshift(open); |
| 56 attr.rightFences.unshift(close); |
| 57 }, |
| 58 |
| 59 /** |
| 60 * Removes XML nodes according to the XPath elements in the blacklist. |
| 61 * @param {Node} xml Xml representation of the semantic node. |
| 62 */ |
| 63 customizeXml: function(xml) { |
| 64 this.xpathBlacklist.forEach( |
| 65 function(xpath) { |
| 66 var removes = cvox.XpathUtil.evalXPath(xpath, xml); |
| 67 removes.forEach( |
| 68 function(node) { |
| 69 node.parentNode.removeChild(node); |
| 70 }); |
| 71 }); |
| 72 }, |
| 73 |
| 74 /** |
| 75 * Tests if for a given mathml snippet results in a particular semantic tree. |
| 76 * @param {string} mml MathML expression. |
| 77 * @param {string} sml XML snippet for the semantic tree. |
| 78 */ |
| 79 executeTreeTest: function(mml, sml) { |
| 80 var mathMl = '<math id=' + this.nodeCounter + '>' + mml + ''; |
| 81 this.loadHtml(mathMl); |
| 82 var node = document.getElementById((this.nodeCounter++).toString()); |
| 83 var stree = new cvox.SemanticTree(/** @type {!Element} */(node)); |
| 84 var sxml = stree.xml(this.brief); |
| 85 this.customizeXml(sxml); |
| 86 var dp = new DOMParser(); |
| 87 var xml = dp.parseFromString('<stree>' + sml + '</stree>', 'text/xml'); |
| 88 var xmls = new XMLSerializer(); |
| 89 assertEquals(xmls.serializeToString(xml), |
| 90 xmls.serializeToString(sxml)); |
| 91 } |
| 92 }; |
| 93 |
| 94 TEST_F('CvoxSemanticTreeUnitTest', 'StreeRelations', function() { |
| 95 this.brief = true; |
| 96 this.executeTreeTest( |
| 97 '<mo>=</mo>', |
| 98 '<relation>=</relation>'); |
| 99 this.executeTreeTest( |
| 100 '<mi>a</mi><mo>=</mo><mi>b</mi>', |
| 101 '<relseq>=' + |
| 102 '<content><relation>=</relation></content>' + |
| 103 '<children>' + |
| 104 '<identifier>a</identifier>' + |
| 105 '<identifier>b</identifier>' + |
| 106 '</children>' + |
| 107 '</relseq>'); |
| 108 this.executeTreeTest( |
| 109 '<mi>a</mi><mo>=</mo><mi>b</mi><mo>=</mo><mi>c</mi>', |
| 110 '<relseq>=' + |
| 111 '<content><relation>=</relation><relation>=</relation></content>' + |
| 112 '<children>' + |
| 113 '<identifier>a</identifier>' + |
| 114 '<identifier>b</identifier>' + |
| 115 '<identifier>c</identifier>' + |
| 116 '</children>' + |
| 117 '</relseq>'); |
| 118 this.executeTreeTest( |
| 119 '<mi>a</mi><mo>=</mo><mi>b</mi><mo>=</mo><mi>c</mi>' + |
| 120 '<mo>\u2264</mo><mi>d</mi>', |
| 121 '<multirel>' + |
| 122 '<content><relation>=</relation><relation>=</relation>' + |
| 123 '<relation>\u2264</relation></content>' + |
| 124 '<children>' + |
| 125 '<identifier>a</identifier>' + |
| 126 '<identifier>b</identifier>' + |
| 127 '<identifier>c</identifier>' + |
| 128 '<identifier>d</identifier>' + |
| 129 '</children>' + |
| 130 '</multirel>'); |
| 131 }); |
| 132 |
| 133 |
| 134 // Operators. |
| 135 /** |
| 136 * Test operator trees with pre- and postfixes. |
| 137 */ |
| 138 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrePostfixOperators', function() { |
| 139 this.brief = true; |
| 140 // Pathological operator only case. |
| 141 this.executeTreeTest( |
| 142 '<mo>+</mo><mo>-</mo><mo>+</mo>', |
| 143 '<prefixop>+' + |
| 144 '<content><operator>+</operator></content>' + |
| 145 '<children>' + |
| 146 '<prefixop>-' + |
| 147 '<content><operator>-</operator></content>' + |
| 148 '<children>' + |
| 149 '<operator>+</operator>' + |
| 150 '</children>' + |
| 151 '</prefixop>' + |
| 152 '</children>' + |
| 153 '</prefixop>'); |
| 154 // Single identifier with prefixes. |
| 155 this.executeTreeTest( |
| 156 '<mo>+</mo><mo>+</mo><mi>a</mi>', |
| 157 '<prefixop>+ +' + |
| 158 '<content><operator>+</operator><operator>+</operator></content>' + |
| 159 '<children>' + |
| 160 '<identifier>a</identifier>' + |
| 161 '</children>' + |
| 162 '</prefixop>'); |
| 163 // Single identifier with prefix and negative. |
| 164 this.executeTreeTest( |
| 165 '<mo>+</mo><mo>-</mo><mi>a</mi>', |
| 166 '<prefixop>+' + |
| 167 '<content><operator>+</operator></content>' + |
| 168 '<children>' + |
| 169 '<prefixop>-' + |
| 170 '<content><operator>-</operator></content>' + |
| 171 '<children>' + |
| 172 '<identifier>a</identifier>' + |
| 173 '</children>' + |
| 174 '</prefixop>' + |
| 175 '</children>' + |
| 176 '</prefixop>'); |
| 177 // Single identifier with postfixes. |
| 178 this.executeTreeTest( |
| 179 '<mi>a</mi><mo>+</mo><mo>-</mo>', |
| 180 '<postfixop>+ -' + |
| 181 '<content><operator>+</operator><operator>-</operator></content>' + |
| 182 '<children>' + |
| 183 '<identifier>a</identifier>' + |
| 184 '</children>' + |
| 185 '</postfixop>'); |
| 186 // Single identifier with pre- and postfixes. |
| 187 this.executeTreeTest( |
| 188 '<mo>+</mo><mo>+</mo><mi>a</mi><mo>+</mo><mo>+</mo>', |
| 189 '<postfixop>+ +' + |
| 190 '<content><operator>+</operator><operator>+</operator></content>' + |
| 191 '<children>' + |
| 192 '<prefixop>+ +' + |
| 193 '<content><operator>+</operator><operator>+</operator></content>' + |
| 194 '<children>' + |
| 195 '<identifier>a</identifier>' + |
| 196 '</children>' + |
| 197 '</prefixop>' + |
| 198 '</children>' + |
| 199 '</postfixop>'); |
| 200 // Single identifier with mixed pre- and postfixes. |
| 201 this.executeTreeTest( |
| 202 '<mo>\u2213</mo><mo>+</mo><mi>a</mi><mo>\u2213</mo><mo>+</mo>', |
| 203 '<postfixop>\u2213 +' + |
| 204 '<content>' + |
| 205 '<operator>\u2213</operator><operator>+</operator>' + |
| 206 '</content>' + |
| 207 '<children>' + |
| 208 '<prefixop>\u2213 +' + |
| 209 '<content>' + |
| 210 '<operator>\u2213</operator><operator>+</operator>' + |
| 211 '</content>' + |
| 212 '<children>' + |
| 213 '<identifier>a</identifier>' + |
| 214 '</children>' + |
| 215 '</prefixop>' + |
| 216 '</children>' + |
| 217 '</postfixop>'); |
| 218 // Two identifiers with pre- and postfixes. |
| 219 this.executeTreeTest( |
| 220 '<mo>+</mo><mo>+</mo><mi>a</mi><mo>\u2213</mo><mo>+</mo>' + |
| 221 '<mi>b</mi><mo>+</mo>', |
| 222 '<infixop>\u2213' + |
| 223 '<content><operator>\u2213</operator></content>' + |
| 224 '<children>' + |
| 225 '<prefixop>+ +' + |
| 226 '<content><operator>+</operator><operator>+</operator></content>' + |
| 227 '<children>' + |
| 228 '<identifier>a</identifier>' + |
| 229 '</children>' + |
| 230 '</prefixop>' + |
| 231 '<postfixop>+' + |
| 232 '<content><operator>+</operator></content>' + |
| 233 '<children>' + |
| 234 '<prefixop>+' + |
| 235 '<content><operator>+</operator></content>' + |
| 236 '<children>' + |
| 237 '<identifier>b</identifier>' + |
| 238 '</children>' + |
| 239 '</prefixop>' + |
| 240 '</children>' + |
| 241 '</postfixop>' + |
| 242 '</children>' + |
| 243 '</infixop>'); |
| 244 // Three identifiers with pre- and postfixes. |
| 245 this.executeTreeTest( |
| 246 '<mo>+</mo><mo>+</mo><mi>a</mi><mo>\u2213</mo><mo>+</mo>' + |
| 247 '<mi>b</mi><mo>+</mo><mo>\u2213</mo><mi>c</mi><mo>+</mo>', |
| 248 '<infixop>+' + |
| 249 '<content><operator>+</operator></content>' + |
| 250 '<children>' + |
| 251 '<infixop>\u2213' + |
| 252 '<content><operator>\u2213</operator></content>' + |
| 253 '<children>' + |
| 254 '<prefixop>+ +' + |
| 255 '<content><operator>+</operator><operator>+</operator></content>' + |
| 256 '<children>' + |
| 257 '<identifier>a</identifier>' + |
| 258 '</children>' + |
| 259 '</prefixop>' + |
| 260 '<prefixop>+' + |
| 261 '<content><operator>+</operator></content>' + |
| 262 '<children>' + |
| 263 '<identifier>b</identifier>' + |
| 264 '</children>' + |
| 265 '</prefixop>' + |
| 266 '</children>' + |
| 267 '</infixop>' + |
| 268 '<postfixop>+' + |
| 269 '<content><operator>+</operator></content>' + |
| 270 '<children>' + |
| 271 '<prefixop>\u2213' + |
| 272 '<content><operator>\u2213</operator></content>' + |
| 273 '<children>' + |
| 274 '<identifier>c</identifier>' + |
| 275 '</children>' + |
| 276 '</prefixop>' + |
| 277 '</children>' + |
| 278 '</postfixop>' + |
| 279 '</children>' + |
| 280 '</infixop>'); |
| 281 }); |
| 282 |
| 283 |
| 284 /** |
| 285 * Test operator trees with single operator. |
| 286 */ |
| 287 TEST_F('CvoxSemanticTreeUnitTest', 'StreeSingleOperators', function() { |
| 288 this.brief = true; |
| 289 // Single identifier. |
| 290 this.executeTreeTest( |
| 291 '<mi>a</mi>', |
| 292 '<identifier>a</identifier>'); |
| 293 // Single implicit node. |
| 294 this.executeTreeTest( |
| 295 '<mi>a</mi><mi>b</mi>', |
| 296 '<infixop>\u2062' + |
| 297 '<content><operator>\u2062</operator></content>' + |
| 298 '<children>' + |
| 299 '<identifier>a</identifier>' + |
| 300 '<identifier>b</identifier>' + |
| 301 '</children>' + |
| 302 '</infixop>'); |
| 303 // Implicit multi node. |
| 304 this.executeTreeTest( |
| 305 '<mi>a</mi><mi>b</mi><mi>c</mi>', |
| 306 '<infixop>\u2062' + |
| 307 '<content><operator>\u2062</operator></content>' + |
| 308 '<children>' + |
| 309 '<identifier>a</identifier>' + |
| 310 '<identifier>b</identifier>' + |
| 311 '<identifier>c</identifier>' + |
| 312 '</children>' + |
| 313 '</infixop>'); |
| 314 // Single addition. |
| 315 this.executeTreeTest( |
| 316 '<mi>a</mi><mo>+</mo><mi>b</mi>', |
| 317 '<infixop>+' + |
| 318 '<content><operator>+</operator></content>' + |
| 319 '<children>' + |
| 320 '<identifier>a</identifier>' + |
| 321 '<identifier>b</identifier>' + |
| 322 '</children>' + |
| 323 '</infixop>'); |
| 324 // Multi addition. |
| 325 this.executeTreeTest( |
| 326 '<mi>a</mi><mo>+</mo><mi>b</mi><mo>+</mo><mi>c</mi>', |
| 327 '<infixop>+' + |
| 328 '<content><operator>+</operator><operator>+</operator></content>' + |
| 329 '<children>' + |
| 330 '<identifier>a</identifier>' + |
| 331 '<identifier>b</identifier>' + |
| 332 '<identifier>c</identifier>' + |
| 333 '</children>' + |
| 334 '</infixop>'); |
| 335 // Multi addition with implicit node. |
| 336 this.executeTreeTest( |
| 337 '<mi>a</mi><mo>+</mo><mi>b</mi><mi>c</mi><mo>+</mo><mi>d</mi>', |
| 338 '<infixop>+' + |
| 339 '<content><operator>+</operator><operator>+</operator></content>' + |
| 340 '<children>' + |
| 341 '<identifier>a</identifier>' + |
| 342 '<infixop>\u2062' + |
| 343 '<content><operator>\u2062</operator></content>' + |
| 344 '<children>' + |
| 345 '<identifier>b</identifier>' + |
| 346 '<identifier>c</identifier>' + |
| 347 '</children>' + |
| 348 '</infixop>' + |
| 349 '<identifier>d</identifier>' + |
| 350 '</children>' + |
| 351 '</infixop>'); |
| 352 }); |
| 353 |
| 354 |
| 355 /** |
| 356 * Test operator trees with multiple operators. |
| 357 */ |
| 358 TEST_F('CvoxSemanticTreeUnitTest', 'StreeMultipleOperators', function() { |
| 359 this.brief = true; |
| 360 // Addition and subtraction. |
| 361 this.executeTreeTest( |
| 362 '<mi>a</mi><mo>+</mo><mi>b</mi><mo>-</mo><mi>c</mi><mo>+</mo><mi>d</mi>', |
| 363 '<infixop>+' + |
| 364 '<content><operator>+</operator></content>' + |
| 365 '<children>' + |
| 366 '<infixop>-' + |
| 367 '<content><operator>-</operator></content>' + |
| 368 '<children>' + |
| 369 '<infixop>+' + |
| 370 '<content><operator>+</operator></content>' + |
| 371 '<children>' + |
| 372 '<identifier>a</identifier>' + |
| 373 '<identifier>b</identifier>' + |
| 374 '</children>' + |
| 375 '</infixop>' + |
| 376 '<identifier>c</identifier>' + |
| 377 '</children>' + |
| 378 '</infixop>' + |
| 379 '<identifier>d</identifier>' + |
| 380 '</children>' + |
| 381 '</infixop>'); |
| 382 // Addition and subtraction. |
| 383 this.executeTreeTest( |
| 384 '<mi>a</mi><mo>+</mo><mi>b</mi><mo>+</mo><mi>c</mi><mo>-</mo>' + |
| 385 '<mi>d</mi><mo>-</mo><mi>e</mi>', |
| 386 '<infixop>-' + |
| 387 '<content><operator>-</operator><operator>-</operator></content>' + |
| 388 '<children>' + |
| 389 '<infixop>+' + |
| 390 '<content><operator>+</operator><operator>+</operator></content>' + |
| 391 '<children>' + |
| 392 '<identifier>a</identifier>' + |
| 393 '<identifier>b</identifier>' + |
| 394 '<identifier>c</identifier>' + |
| 395 '</children>' + |
| 396 '</infixop>' + |
| 397 '<identifier>d</identifier>' + |
| 398 '<identifier>e</identifier>' + |
| 399 '</children>' + |
| 400 '</infixop>'); |
| 401 // Addition and explicit multiplication. |
| 402 this.executeTreeTest( |
| 403 '<mi>a</mi><mo>+</mo><mi>b</mi><mo>\u2218</mo><mi>c</mi><mo>+</mo>' + |
| 404 '<mi>d</mi>', |
| 405 '<infixop>+' + |
| 406 '<content><operator>+</operator><operator>+</operator></content>' + |
| 407 '<children>' + |
| 408 '<identifier>a</identifier>' + |
| 409 '<infixop>\u2218' + |
| 410 '<content><operator>\u2218</operator></content>' + |
| 411 '<children>' + |
| 412 '<identifier>b</identifier>' + |
| 413 '<identifier>c</identifier>' + |
| 414 '</children>' + |
| 415 '</infixop>' + |
| 416 '<identifier>d</identifier>' + |
| 417 '</children>' + |
| 418 '</infixop>'); |
| 419 // Addition with explicit and implicit multiplication. |
| 420 this.executeTreeTest( |
| 421 '<mi>a</mi><mo>+</mo><mi>b</mi><mo>\u2218</mo><mi>c</mi><mi>d</mi>' + |
| 422 '<mo>+</mo><mi>e</mi><mo>\u2218</mo><mi>f</mi>', |
| 423 '<infixop>+' + |
| 424 '<content><operator>+</operator><operator>+</operator></content>' + |
| 425 '<children>' + |
| 426 '<identifier>a</identifier>' + |
| 427 '<infixop>\u2218' + |
| 428 '<content><operator>\u2218</operator></content>' + |
| 429 '<children>' + |
| 430 '<identifier>b</identifier>' + |
| 431 '<infixop>\u2062' + |
| 432 '<content><operator>\u2062</operator></content>' + |
| 433 '<children>' + |
| 434 '<identifier>c</identifier>' + |
| 435 '<identifier>d</identifier>' + |
| 436 '</children>' + |
| 437 '</infixop>' + |
| 438 '</children>' + |
| 439 '</infixop>' + |
| 440 '<infixop>\u2218' + |
| 441 '<content><operator>\u2218</operator></content>' + |
| 442 '<children>' + |
| 443 '<identifier>e</identifier>' + |
| 444 '<identifier>f</identifier>' + |
| 445 '</children>' + |
| 446 '</infixop>' + |
| 447 '</children>' + |
| 448 '</infixop>'); |
| 449 // Two Additions, subtraction plus explicit and implicit multiplication, |
| 450 // one prefix and one postfix. |
| 451 this.executeTreeTest( |
| 452 '<mi>a</mi><mo>+</mo><mi>b</mi><mo>+</mo><mi>c</mi><mi>d</mi>' + |
| 453 '<mo>+</mo><mi>e</mi><mo>\u2218</mo><mi>f</mi><mo>-</mo><mi>g</mi>' + |
| 454 '<mo>+</mo><mo>+</mo><mi>h</mi><mo>\u2295</mo><mi>i</mi>' + |
| 455 '<mo>\u2295</mo><mi>j</mi><mo>+</mo><mo>+</mo>', |
| 456 '<infixop>\u2295' + |
| 457 '<content><operator>\u2295</operator>' + |
| 458 '<operator>\u2295</operator></content>' + |
| 459 '<children>' + |
| 460 '<infixop>+' + |
| 461 '<content><operator>+</operator></content>' + |
| 462 '<children>' + |
| 463 '<infixop>-' + |
| 464 '<content><operator>-</operator></content>' + |
| 465 '<children>' + |
| 466 '<infixop>+' + |
| 467 '<content><operator>+</operator>' + |
| 468 '<operator>+</operator><operator>+</operator></content>' + |
| 469 '<children>' + |
| 470 '<identifier>a</identifier>' + |
| 471 '<identifier>b</identifier>' + |
| 472 '<infixop>\u2062' + |
| 473 '<content><operator>\u2062</operator></content>' + |
| 474 '<children>' + |
| 475 '<identifier>c</identifier>' + |
| 476 '<identifier>d</identifier>' + |
| 477 '</children>' + |
| 478 '</infixop>' + |
| 479 '<infixop>\u2218' + |
| 480 '<content><operator>\u2218</operator></content>' + |
| 481 '<children>' + |
| 482 '<identifier>e</identifier>' + |
| 483 '<identifier>f</identifier>' + |
| 484 '</children>' + |
| 485 '</infixop>' + |
| 486 '</children>' + |
| 487 '</infixop>' + |
| 488 '<identifier>g</identifier>' + |
| 489 '</children>' + |
| 490 '</infixop>' + |
| 491 '<prefixop>+' + |
| 492 '<content><operator>+</operator></content>' + |
| 493 '<children>' + |
| 494 '<identifier>h</identifier>' + |
| 495 '</children>' + |
| 496 '</prefixop>' + |
| 497 '</children>' + |
| 498 '</infixop>' + |
| 499 '<identifier>i</identifier>' + |
| 500 '<postfixop>+ +' + |
| 501 '<content><operator>+</operator><operator>+</operator></content>' + |
| 502 '<children>' + |
| 503 '<identifier>j</identifier>' + |
| 504 '</children>' + |
| 505 '</postfixop>' + |
| 506 '</children>' + |
| 507 '</infixop>'); |
| 508 }); |
| 509 |
| 510 |
| 511 // Fences. |
| 512 /** |
| 513 * Test regular directed fences. |
| 514 */ |
| 515 TEST_F('CvoxSemanticTreeUnitTest', 'StreeRegularFences', function() { |
| 516 this.brief = true; |
| 517 // No fence. |
| 518 this.executeTreeTest( |
| 519 '<mrow><mi>a</mi><mo>+</mo><mi>b</mi></mrow>', |
| 520 '<infixop>+' + |
| 521 '<content>' + |
| 522 '<operator>+</operator>' + |
| 523 '</content>' + |
| 524 '<children>' + |
| 525 '<identifier>a</identifier>' + |
| 526 '<identifier>b</identifier>' + |
| 527 '</children>' + |
| 528 '</infixop>'); |
| 529 // Empty parentheses. |
| 530 this.executeTreeTest( |
| 531 '<mrow><mo>(</mo><mo>)</mo></mrow>', |
| 532 '<fenced>' + |
| 533 '<content>' + |
| 534 '<fence>(</fence>' + |
| 535 '<fence>)</fence>' + |
| 536 '</content>' + |
| 537 '<children>' + |
| 538 '<empty/>' + |
| 539 '</children>' + |
| 540 '</fenced>'); |
| 541 // Single Fenced Expression. |
| 542 this.executeTreeTest( |
| 543 '<mrow><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo></mrow>', |
| 544 '<fenced>' + |
| 545 '<content>' + |
| 546 '<fence>(</fence>' + |
| 547 '<fence>)</fence>' + |
| 548 '</content>' + |
| 549 '<children>' + |
| 550 '<infixop>+' + |
| 551 '<content>' + |
| 552 '<operator>+</operator>' + |
| 553 '</content>' + |
| 554 '<children>' + |
| 555 '<identifier>a</identifier>' + |
| 556 '<identifier>b</identifier>' + |
| 557 '</children>' + |
| 558 '</infixop>' + |
| 559 '</children>' + |
| 560 '</fenced>'); |
| 561 // Single Fenced Expression and operators. |
| 562 this.executeTreeTest( |
| 563 '<mrow><mi>a</mi><mo>+</mo><mo>(</mo><mi>b</mi><mo>+</mo><mi>c</mi>' + |
| 564 '<mo>)</mo><mo>+</mo><mi>d</mi></mrow>', |
| 565 '<infixop>+' + |
| 566 '<content>' + |
| 567 '<operator>+</operator>' + |
| 568 '<operator>+</operator>' + |
| 569 '</content>' + |
| 570 '<children>' + |
| 571 '<identifier>a</identifier>' + |
| 572 '<fenced>' + |
| 573 '<content>' + |
| 574 '<fence>(</fence>' + |
| 575 '<fence>)</fence>' + |
| 576 '</content>' + |
| 577 '<children>' + |
| 578 '<infixop>+' + |
| 579 '<content>' + |
| 580 '<operator>+</operator>' + |
| 581 '</content>' + |
| 582 '<children>' + |
| 583 '<identifier>b</identifier>' + |
| 584 '<identifier>c</identifier>' + |
| 585 '</children>' + |
| 586 '</infixop>' + |
| 587 '</children>' + |
| 588 '</fenced>' + |
| 589 '<identifier>d</identifier>' + |
| 590 '</children>' + |
| 591 '</infixop>'); |
| 592 // Parallel Parenthesis. |
| 593 this.executeTreeTest( |
| 594 '<mrow><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo><mo>(</mo>' + |
| 595 '<mi>c</mi><mo>+</mo><mi>d</mi><mo>)</mo></mrow>', |
| 596 '<infixop>\u2062' + |
| 597 '<content>' + |
| 598 '<operator>\u2062</operator>' + |
| 599 '</content>' + |
| 600 '<children>' + |
| 601 '<fenced>' + |
| 602 '<content>' + |
| 603 '<fence>(</fence>' + |
| 604 '<fence>)</fence>' + |
| 605 '</content>' + |
| 606 '<children>' + |
| 607 '<infixop>+' + |
| 608 '<content>' + |
| 609 '<operator>+</operator>' + |
| 610 '</content>' + |
| 611 '<children>' + |
| 612 '<identifier>a</identifier>' + |
| 613 '<identifier>b</identifier>' + |
| 614 '</children>' + |
| 615 '</infixop>' + |
| 616 '</children>' + |
| 617 '</fenced>' + |
| 618 '<fenced>' + |
| 619 '<content>' + |
| 620 '<fence>(</fence>' + |
| 621 '<fence>)</fence>' + |
| 622 '</content>' + |
| 623 '<children>' + |
| 624 '<infixop>+' + |
| 625 '<content>' + |
| 626 '<operator>+</operator>' + |
| 627 '</content>' + |
| 628 '<children>' + |
| 629 '<identifier>c</identifier>' + |
| 630 '<identifier>d</identifier>' + |
| 631 '</children>' + |
| 632 '</infixop>' + |
| 633 '</children>' + |
| 634 '</fenced>' + |
| 635 '</children>' + |
| 636 '</infixop>'); |
| 637 // Nested Parenthesis. |
| 638 this.executeTreeTest( |
| 639 '<mrow><mo>(</mo><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo>' + |
| 640 '<mo>(</mo><mi>c</mi><mo>+</mo><mi>d</mi><mo>)</mo><mo>)</mo></mrow>', |
| 641 '<fenced>' + |
| 642 '<content>' + |
| 643 '<fence>(</fence>' + |
| 644 '<fence>)</fence>' + |
| 645 '</content>' + |
| 646 '<children>' + |
| 647 '<infixop>\u2062' + |
| 648 '<content>' + |
| 649 '<operator>\u2062</operator>' + |
| 650 '</content>' + |
| 651 '<children>' + |
| 652 '<fenced>' + |
| 653 '<content>' + |
| 654 '<fence>(</fence>' + |
| 655 '<fence>)</fence>' + |
| 656 '</content>' + |
| 657 '<children>' + |
| 658 '<infixop>+' + |
| 659 '<content>' + |
| 660 '<operator>+</operator>' + |
| 661 '</content>' + |
| 662 '<children>' + |
| 663 '<identifier>a</identifier>' + |
| 664 '<identifier>b</identifier>' + |
| 665 '</children>' + |
| 666 '</infixop>' + |
| 667 '</children>' + |
| 668 '</fenced>' + |
| 669 '<fenced>' + |
| 670 '<content>' + |
| 671 '<fence>(</fence>' + |
| 672 '<fence>)</fence>' + |
| 673 '</content>' + |
| 674 '<children>' + |
| 675 '<infixop>+' + |
| 676 '<content>' + |
| 677 '<operator>+</operator>' + |
| 678 '</content>' + |
| 679 '<children>' + |
| 680 '<identifier>c</identifier>' + |
| 681 '<identifier>d</identifier>' + |
| 682 '</children>' + |
| 683 '</infixop>' + |
| 684 '</children>' + |
| 685 '</fenced>' + |
| 686 '</children>' + |
| 687 '</infixop>' + |
| 688 '</children>' + |
| 689 '</fenced>'); |
| 690 // Nested parenthesis and brackets. |
| 691 this.executeTreeTest( |
| 692 '<mrow><mo>(</mo><mo>[</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>+</mo>' + |
| 693 '<mi>c</mi><mo>]</mo><mo>+</mo><mi>d</mi><mo>)</mo></mrow>', |
| 694 '<fenced>' + |
| 695 '<content>' + |
| 696 '<fence>(</fence>' + |
| 697 '<fence>)</fence>' + |
| 698 '</content>' + |
| 699 '<children>' + |
| 700 '<infixop>+' + |
| 701 '<content>' + |
| 702 '<operator>+</operator>' + |
| 703 '</content>' + |
| 704 '<children>' + |
| 705 '<fenced>' + |
| 706 '<content>' + |
| 707 '<fence>[</fence>' + |
| 708 '<fence>]</fence>' + |
| 709 '</content>' + |
| 710 '<children>' + |
| 711 '<infixop>+' + |
| 712 '<content>' + |
| 713 '<operator>+</operator>' + |
| 714 '<operator>+</operator>' + |
| 715 '</content>' + |
| 716 '<children>' + |
| 717 '<identifier>a</identifier>' + |
| 718 '<identifier>b</identifier>' + |
| 719 '<identifier>c</identifier>' + |
| 720 '</children>' + |
| 721 '</infixop>' + |
| 722 '</children>' + |
| 723 '</fenced>' + |
| 724 '<identifier>d</identifier>' + |
| 725 '</children>' + |
| 726 '</infixop>' + |
| 727 '</children>' + |
| 728 '</fenced>'); |
| 729 // Nested parenthesis, brackets, braces and superscript operator. |
| 730 this.executeTreeTest( |
| 731 '<mrow><mo>(</mo><msup><mi>a</mi><mrow><mn>2</mn><mo>[</mo><mi>i</mi>' + |
| 732 '<mo>+</mo><mi>n</mi><mo>]</mo></mrow></msup><mo>+</mo><mi>b</mi>' + |
| 733 '<mo>)</mo><mo>+</mo><mo>{</mo><mi>c</mi><mi>d</mi><mo>-</mo><mo>[</mo>' + |
| 734 '<mi>e</mi><mo>+</mo><mi>f</mi><mo>]</mo><mo>}</mo></mrow>', |
| 735 '<infixop>+' + |
| 736 '<content>' + |
| 737 '<operator>+</operator>' + |
| 738 '</content>' + |
| 739 '<children>' + |
| 740 '<fenced>' + |
| 741 '<content>' + |
| 742 '<fence>(</fence>' + |
| 743 '<fence>)</fence>' + |
| 744 '</content>' + |
| 745 '<children>' + |
| 746 '<infixop>+' + |
| 747 '<content>' + |
| 748 '<operator>+</operator>' + |
| 749 '</content>' + |
| 750 '<children>' + |
| 751 '<superscript>' + |
| 752 '<children>' + |
| 753 '<identifier>a</identifier>' + |
| 754 '<infixop>\u2062' + |
| 755 '<content>' + |
| 756 '<operator>\u2062</operator>' + |
| 757 '</content>' + |
| 758 '<children>' + |
| 759 '<number>2</number>' + |
| 760 '<fenced>' + |
| 761 '<content>' + |
| 762 '<fence>[</fence>' + |
| 763 '<fence>]</fence>' + |
| 764 '</content>' + |
| 765 '<children>' + |
| 766 '<infixop>+' + |
| 767 '<content>' + |
| 768 '<operator>+</operator>' + |
| 769 '</content>' + |
| 770 '<children>' + |
| 771 '<identifier>i</identifier>' + |
| 772 '<identifier>n</identifier>' + |
| 773 '</children>' + |
| 774 '</infixop>' + |
| 775 '</children>' + |
| 776 '</fenced>' + |
| 777 '</children>' + |
| 778 '</infixop>' + |
| 779 '</children>' + |
| 780 '</superscript>' + |
| 781 '<identifier>b</identifier>' + |
| 782 '</children>' + |
| 783 '</infixop>' + |
| 784 '</children>' + |
| 785 '</fenced>' + |
| 786 '<fenced>' + |
| 787 '<content>' + |
| 788 '<fence>{</fence>' + |
| 789 '<fence>}</fence>' + |
| 790 '</content>' + |
| 791 '<children>' + |
| 792 '<infixop>-' + |
| 793 '<content>' + |
| 794 '<operator>-</operator>' + |
| 795 '</content>' + |
| 796 '<children>' + |
| 797 '<infixop>\u2062' + |
| 798 '<content>' + |
| 799 '<operator>\u2062</operator>' + |
| 800 '</content>' + |
| 801 '<children>' + |
| 802 '<identifier>c</identifier>' + |
| 803 '<identifier>d</identifier>' + |
| 804 '</children>' + |
| 805 '</infixop>' + |
| 806 '<fenced>' + |
| 807 '<content>' + |
| 808 '<fence>[</fence>' + |
| 809 '<fence>]</fence>' + |
| 810 '</content>' + |
| 811 '<children>' + |
| 812 '<infixop>+' + |
| 813 '<content>' + |
| 814 '<operator>+</operator>' + |
| 815 '</content>' + |
| 816 '<children>' + |
| 817 '<identifier>e</identifier>' + |
| 818 '<identifier>f</identifier>' + |
| 819 '</children>' + |
| 820 '</infixop>' + |
| 821 '</children>' + |
| 822 '</fenced>' + |
| 823 '</children>' + |
| 824 '</infixop>' + |
| 825 '</children>' + |
| 826 '</fenced>' + |
| 827 '</children>' + |
| 828 '</infixop>'); |
| 829 }); |
| 830 |
| 831 |
| 832 /** |
| 833 * Test neutral fences. |
| 834 */ |
| 835 TEST_F('CvoxSemanticTreeUnitTest', 'StreeNeutralFences', function() { |
| 836 this.brief = true; |
| 837 // Empty bars. |
| 838 this.executeTreeTest( |
| 839 '<mrow><mo>|</mo><mo>|</mo></mrow>', |
| 840 '<fenced>' + |
| 841 '<content>' + |
| 842 '<fence>|</fence>' + |
| 843 '<fence>|</fence>' + |
| 844 '</content>' + |
| 845 '<children>' + |
| 846 '<empty/>' + |
| 847 '</children>' + |
| 848 '</fenced>'); |
| 849 // Simple bar fence. |
| 850 this.executeTreeTest( |
| 851 '<mrow><mo>|</mo><mi>a</mi><mo>|</mo></mrow>', |
| 852 '<fenced>' + |
| 853 '<content>' + |
| 854 '<fence>|</fence>' + |
| 855 '<fence>|</fence>' + |
| 856 '</content>' + |
| 857 '<children>' + |
| 858 '<identifier>a</identifier>' + |
| 859 '</children>' + |
| 860 '</fenced>'); |
| 861 // Parallel bar fences. |
| 862 this.executeTreeTest( |
| 863 '<mrow><mo>|</mo><mi>a</mi><mo>|</mo><mi>b</mi><mo>+</mo>' + |
| 864 '<mo>\u00A6</mo><mi>c</mi><mo>\u00A6</mo></mrow>', |
| 865 '<infixop>+' + |
| 866 '<content>' + |
| 867 '<operator>+</operator>' + |
| 868 '</content>' + |
| 869 '<children>' + |
| 870 '<infixop>\u2062' + |
| 871 '<content>' + |
| 872 '<operator>\u2062</operator>' + |
| 873 '</content>' + |
| 874 '<children>' + |
| 875 '<fenced>' + |
| 876 '<content>' + |
| 877 '<fence>|</fence>' + |
| 878 '<fence>|</fence>' + |
| 879 '</content>' + |
| 880 '<children>' + |
| 881 '<identifier>a</identifier>' + |
| 882 '</children>' + |
| 883 '</fenced>' + |
| 884 '<identifier>b</identifier>' + |
| 885 '</children>' + |
| 886 '</infixop>' + |
| 887 '<fenced>' + |
| 888 '<content>' + |
| 889 '<fence>\u00A6</fence>' + |
| 890 '<fence>\u00A6</fence>' + |
| 891 '</content>' + |
| 892 '<children>' + |
| 893 '<identifier>c</identifier>' + |
| 894 '</children>' + |
| 895 '</fenced>' + |
| 896 '</children>' + |
| 897 '</infixop>'); |
| 898 // Nested bar fences. |
| 899 this.executeTreeTest( |
| 900 '<mrow><mo>\u00A6</mo><mo>|</mo><mi>a</mi><mo>|</mo><mi>b</mi>' + |
| 901 '<mo>+</mo><mi>c</mi><mo>\u00A6</mo></mrow>', |
| 902 '<fenced>' + |
| 903 '<content>' + |
| 904 '<fence>\u00A6</fence>' + |
| 905 '<fence>\u00A6</fence>' + |
| 906 '</content>' + |
| 907 '<children>' + |
| 908 '<infixop>+' + |
| 909 '<content>' + |
| 910 '<operator>+</operator>' + |
| 911 '</content>' + |
| 912 '<children>' + |
| 913 '<infixop>\u2062' + |
| 914 '<content>' + |
| 915 '<operator>\u2062</operator>' + |
| 916 '</content>' + |
| 917 '<children>' + |
| 918 '<fenced>' + |
| 919 '<content>' + |
| 920 '<fence>|</fence>' + |
| 921 '<fence>|</fence>' + |
| 922 '</content>' + |
| 923 '<children>' + |
| 924 '<identifier>a</identifier>' + |
| 925 '</children>' + |
| 926 '</fenced>' + |
| 927 '<identifier>b</identifier>' + |
| 928 '</children>' + |
| 929 '</infixop>' + |
| 930 '<identifier>c</identifier>' + |
| 931 '</children>' + |
| 932 '</infixop>' + |
| 933 '</children>' + |
| 934 '</fenced>'); |
| 935 }); |
| 936 |
| 937 |
| 938 /** |
| 939 * Mixed neutral and regular fences. |
| 940 */ |
| 941 TEST_F('CvoxSemanticTreeUnitTest', 'StreeMixedFences', function() { |
| 942 this.brief = true; |
| 943 // Empty parenthsis inside bars. |
| 944 this.executeTreeTest( |
| 945 '<mrow><mo>|</mo><mo>(</mo><mo>)</mo><mo>|</mo></mrow>', |
| 946 '<fenced>' + |
| 947 '<content>' + |
| 948 '<fence>|</fence>' + |
| 949 '<fence>|</fence>' + |
| 950 '</content>' + |
| 951 '<children>' + |
| 952 '<fenced>' + |
| 953 '<content>' + |
| 954 '<fence>(</fence>' + |
| 955 '<fence>)</fence>' + |
| 956 '</content>' + |
| 957 '<children>' + |
| 958 '<empty/>' + |
| 959 '</children>' + |
| 960 '</fenced>' + |
| 961 '</children>' + |
| 962 '</fenced>'); |
| 963 // Bars inside parentheses. |
| 964 this.executeTreeTest( |
| 965 '<mrow><mo>(</mo><mo>|</mo><mi>a</mi><mo>|</mo><mi>b</mi>' + |
| 966 '<mo>¦</mo><mi>c</mi><mo>¦</mo><mi>d</mi>' + |
| 967 '<mo>)</mo></mrow>', |
| 968 '<fenced>' + |
| 969 '<content>' + |
| 970 '<fence>(</fence>' + |
| 971 '<fence>)</fence>' + |
| 972 '</content>' + |
| 973 '<children>' + |
| 974 '<infixop>\u2062' + |
| 975 '<content>' + |
| 976 '<operator>\u2062</operator>' + |
| 977 '</content>' + |
| 978 '<children>' + |
| 979 '<fenced>' + |
| 980 '<content>' + |
| 981 '<fence>|</fence>' + |
| 982 '<fence>|</fence>' + |
| 983 '</content>' + |
| 984 '<children>' + |
| 985 '<identifier>a</identifier>' + |
| 986 '</children>' + |
| 987 '</fenced>' + |
| 988 '<identifier>b</identifier>' + |
| 989 '<fenced>' + |
| 990 '<content>' + |
| 991 '<fence>\u00A6</fence>' + |
| 992 '<fence>\u00A6</fence>' + |
| 993 '</content>' + |
| 994 '<children>' + |
| 995 '<identifier>c</identifier>' + |
| 996 '</children>' + |
| 997 '</fenced>' + |
| 998 '<identifier>d</identifier>' + |
| 999 '</children>' + |
| 1000 '</infixop>' + |
| 1001 '</children>' + |
| 1002 '</fenced>'); |
| 1003 // Parentheses inside bards. |
| 1004 this.executeTreeTest( |
| 1005 '<mrow><mo>|</mo><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo>' + |
| 1006 '<mo>¦</mo><mi>c</mi><mo>¦</mo><mi>d</mi><mo>|</mo></mrow>', |
| 1007 '<fenced>' + |
| 1008 '<content>' + |
| 1009 '<fence>|</fence>' + |
| 1010 '<fence>|</fence>' + |
| 1011 '</content>' + |
| 1012 '<children>' + |
| 1013 '<infixop>\u2062' + |
| 1014 '<content>' + |
| 1015 '<operator>\u2062</operator>' + |
| 1016 '</content>' + |
| 1017 '<children>' + |
| 1018 '<fenced>' + |
| 1019 '<content>' + |
| 1020 '<fence>(</fence>' + |
| 1021 '<fence>)</fence>' + |
| 1022 '</content>' + |
| 1023 '<children>' + |
| 1024 '<infixop>+' + |
| 1025 '<content>' + |
| 1026 '<operator>+</operator>' + |
| 1027 '</content>' + |
| 1028 '<children>' + |
| 1029 '<identifier>a</identifier>' + |
| 1030 '<identifier>b</identifier>' + |
| 1031 '</children>' + |
| 1032 '</infixop>' + |
| 1033 '</children>' + |
| 1034 '</fenced>' + |
| 1035 '<fenced>' + |
| 1036 '<content>' + |
| 1037 '<fence>\u00A6</fence>' + |
| 1038 '<fence>\u00A6</fence>' + |
| 1039 '</content>' + |
| 1040 '<children>' + |
| 1041 '<identifier>c</identifier>' + |
| 1042 '</children>' + |
| 1043 '</fenced>' + |
| 1044 '<identifier>d</identifier>' + |
| 1045 '</children>' + |
| 1046 '</infixop>' + |
| 1047 '</children>' + |
| 1048 '</fenced>'); |
| 1049 // Parentheses inside bards. |
| 1050 this.executeTreeTest( |
| 1051 '<mrow><mo>[</mo><mo>|</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>|</mo>' + |
| 1052 '<mo>+</mo><mi>c</mi><mo>]</mo><mo>+</mo><mo>\u00A6</mo><mi>d</mi>' + |
| 1053 '<mo>+</mo><mo>(</mo><mi>e</mi><mo>+</mo><mi>f</mi><mo>)</mo>' + |
| 1054 '<mo>\u00A6</mo></mrow>', |
| 1055 '<infixop>+' + |
| 1056 '<content>' + |
| 1057 '<operator>+</operator>' + |
| 1058 '</content>' + |
| 1059 '<children>' + |
| 1060 '<fenced>' + |
| 1061 '<content>' + |
| 1062 '<fence>[</fence>' + |
| 1063 '<fence>]</fence>' + |
| 1064 '</content>' + |
| 1065 '<children>' + |
| 1066 '<infixop>+' + |
| 1067 '<content>' + |
| 1068 '<operator>+</operator>' + |
| 1069 '</content>' + |
| 1070 '<children>' + |
| 1071 '<fenced>' + |
| 1072 '<content>' + |
| 1073 '<fence>|</fence>' + |
| 1074 '<fence>|</fence>' + |
| 1075 '</content>' + |
| 1076 '<children>' + |
| 1077 '<infixop>+' + |
| 1078 '<content>' + |
| 1079 '<operator>+</operator>' + |
| 1080 '</content>' + |
| 1081 '<children>' + |
| 1082 '<identifier>a</identifier>' + |
| 1083 '<identifier>b</identifier>' + |
| 1084 '</children>' + |
| 1085 '</infixop>' + |
| 1086 '</children>' + |
| 1087 '</fenced>' + |
| 1088 '<identifier>c</identifier>' + |
| 1089 '</children>' + |
| 1090 '</infixop>' + |
| 1091 '</children>' + |
| 1092 '</fenced>' + |
| 1093 '<fenced>' + |
| 1094 '<content>' + |
| 1095 '<fence>\u00A6</fence>' + |
| 1096 '<fence>\u00A6</fence>' + |
| 1097 '</content>' + |
| 1098 '<children>' + |
| 1099 '<infixop>+' + |
| 1100 '<content>' + |
| 1101 '<operator>+</operator>' + |
| 1102 '</content>' + |
| 1103 '<children>' + |
| 1104 '<identifier>d</identifier>' + |
| 1105 '<fenced>' + |
| 1106 '<content>' + |
| 1107 '<fence>(</fence>' + |
| 1108 '<fence>)</fence>' + |
| 1109 '</content>' + |
| 1110 '<children>' + |
| 1111 '<infixop>+' + |
| 1112 '<content>' + |
| 1113 '<operator>+</operator>' + |
| 1114 '</content>' + |
| 1115 '<children>' + |
| 1116 '<identifier>e</identifier>' + |
| 1117 '<identifier>f</identifier>' + |
| 1118 '</children>' + |
| 1119 '</infixop>' + |
| 1120 '</children>' + |
| 1121 '</fenced>' + |
| 1122 '</children>' + |
| 1123 '</infixop>' + |
| 1124 '</children>' + |
| 1125 '</fenced>' + |
| 1126 '</children>' + |
| 1127 '</infixop>'); |
| 1128 }); |
| 1129 |
| 1130 |
| 1131 /** |
| 1132 * Mixed with isolated bars. |
| 1133 */ |
| 1134 TEST_F('CvoxSemanticTreeUnitTest', 'StreeMixedFencesWithBars', function() { |
| 1135 this.brief = true; |
| 1136 this.xpathBlacklist = ['descendant::punctuated/content']; |
| 1137 // Set notation. |
| 1138 this.executeTreeTest( |
| 1139 '<mrow><mo>{</mo><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi><mo>,</mo>' + |
| 1140 '<mi>z</mi><mo>)</mo><mo>|</mo><mi>x</mi><mi>y</mi><mo>=</mo>' + |
| 1141 '<mo>z</mo><mo>}</mo></mrow>', |
| 1142 '<fenced>' + |
| 1143 '<content>' + |
| 1144 '<fence>{</fence>' + |
| 1145 '<fence>}</fence>' + |
| 1146 '</content>' + |
| 1147 '<children>' + |
| 1148 '<punctuated>' + |
| 1149 '<children>' + |
| 1150 '<fenced>' + |
| 1151 '<content>' + |
| 1152 '<fence>(</fence>' + |
| 1153 '<fence>)</fence>' + |
| 1154 '</content>' + |
| 1155 '<children>' + |
| 1156 '<punctuated>' + |
| 1157 '<children>' + |
| 1158 '<identifier>x</identifier>' + |
| 1159 '<punctuation>,</punctuation>' + |
| 1160 '<identifier>y</identifier>' + |
| 1161 '<punctuation>,</punctuation>' + |
| 1162 '<identifier>z</identifier>' + |
| 1163 '</children>' + |
| 1164 '</punctuated>' + |
| 1165 '</children>' + |
| 1166 '</fenced>' + |
| 1167 '<punctuation>|</punctuation>' + |
| 1168 '<relseq>=' + |
| 1169 '<content>' + |
| 1170 '<relation>=</relation>' + |
| 1171 '</content>' + |
| 1172 '<children>' + |
| 1173 '<infixop>\u2062' + |
| 1174 '<content>' + |
| 1175 '<operator>\u2062</operator>' + |
| 1176 '</content>' + |
| 1177 '<children>' + |
| 1178 '<identifier>x</identifier>' + |
| 1179 '<identifier>y</identifier>' + |
| 1180 '</children>' + |
| 1181 '</infixop>' + |
| 1182 '<identifier>z</identifier>' + |
| 1183 '</children>' + |
| 1184 '</relseq>' + |
| 1185 '</children>' + |
| 1186 '</punctuated>' + |
| 1187 '</children>' + |
| 1188 '</fenced>'); |
| 1189 // Disjunction of bracketed parallel statements. |
| 1190 this.executeTreeTest( |
| 1191 '<mrow><mo>[</mo><mi>a</mi><mo>‖</mo><mi>b</mi><mo>]</mo>' + |
| 1192 '<mo>|</mo><mo>[</mo><mi>x</mi><mo>‖</mo><mi>y</mi><mo>]</mo>' + |
| 1193 '</mrow>', |
| 1194 '<punctuated>' + |
| 1195 '<children>' + |
| 1196 '<fenced>' + |
| 1197 '<content>' + |
| 1198 '<fence>[</fence>' + |
| 1199 '<fence>]</fence>' + |
| 1200 '</content>' + |
| 1201 '<children>' + |
| 1202 '<punctuated>' + |
| 1203 '<children>' + |
| 1204 '<identifier>a</identifier>' + |
| 1205 '<punctuation>\u2016</punctuation>' + |
| 1206 '<identifier>b</identifier>' + |
| 1207 '</children>' + |
| 1208 '</punctuated>' + |
| 1209 '</children>' + |
| 1210 '</fenced>' + |
| 1211 '<punctuation>|</punctuation>' + |
| 1212 '<fenced>' + |
| 1213 '<content>' + |
| 1214 '<fence>[</fence>' + |
| 1215 '<fence>]</fence>' + |
| 1216 '</content>' + |
| 1217 '<children>' + |
| 1218 '<punctuated>' + |
| 1219 '<children>' + |
| 1220 '<identifier>x</identifier>' + |
| 1221 '<punctuation>\u2016</punctuation>' + |
| 1222 '<identifier>y</identifier>' + |
| 1223 '</children>' + |
| 1224 '</punctuated>' + |
| 1225 '</children>' + |
| 1226 '</fenced>' + |
| 1227 '</children>' + |
| 1228 '</punctuated>' |
| 1229 ); |
| 1230 // Metric over the above. |
| 1231 this.executeTreeTest( |
| 1232 '<mrow><mo>‖</mo><mo>[</mo><mi>a</mi><mo>‖</mo>' + |
| 1233 '<mi>b</mi><mo>]</mo><mo>|</mo><mo>[</mo><mi>x</mi><mo>‖</mo>' + |
| 1234 '<mi>y</mi><mo>]</mo><mo>‖</mo></mrow>', |
| 1235 '<fenced>' + |
| 1236 '<content>' + |
| 1237 '<fence>\u2016</fence>' + |
| 1238 '<fence>\u2016</fence>' + |
| 1239 '</content>' + |
| 1240 '<children>' + |
| 1241 '<punctuated>' + |
| 1242 '<children>' + |
| 1243 '<fenced>' + |
| 1244 '<content>' + |
| 1245 '<fence>[</fence>' + |
| 1246 '<fence>]</fence>' + |
| 1247 '</content>' + |
| 1248 '<children>' + |
| 1249 '<punctuated>' + |
| 1250 '<children>' + |
| 1251 '<identifier>a</identifier>' + |
| 1252 '<punctuation>\u2016</punctuation>' + |
| 1253 '<identifier>b</identifier>' + |
| 1254 '</children>' + |
| 1255 '</punctuated>' + |
| 1256 '</children>' + |
| 1257 '</fenced>' + |
| 1258 '<punctuation>|</punctuation>' + |
| 1259 '<fenced>' + |
| 1260 '<content>' + |
| 1261 '<fence>[</fence>' + |
| 1262 '<fence>]</fence>' + |
| 1263 '</content>' + |
| 1264 '<children>' + |
| 1265 '<punctuated>' + |
| 1266 '<children>' + |
| 1267 '<identifier>x</identifier>' + |
| 1268 '<punctuation>\u2016</punctuation>' + |
| 1269 '<identifier>y</identifier>' + |
| 1270 '</children>' + |
| 1271 '</punctuated>' + |
| 1272 '</children>' + |
| 1273 '</fenced>' + |
| 1274 '</children>' + |
| 1275 '</punctuated>' + |
| 1276 '</children>' + |
| 1277 '</fenced>'); |
| 1278 // Mix of metrics and bracketed expression and single bars. |
| 1279 this.executeTreeTest( |
| 1280 '<mrow><mo>‖</mo><mo>[</mo><mi>a</mi><mo>‖</mo><mi>b</mi>' + |
| 1281 '<mo>]</mo><mo>|</mo><mo>[</mo><mi>c</mi><mo>‖</mo>' + |
| 1282 '<mo>¦</mo><mi>d</mi><mo>]</mo><mo>‖</mo><mo>[</mo>' + |
| 1283 '<mi>u</mi><mo>‖</mo><mi>v</mi><mo>]</mo><mo>|</mo><mi>x</mi>' + |
| 1284 '<mo>‖</mo><mi>y</mi><mo>¦</mo><mi>z</mi></mrow>', |
| 1285 '<punctuated>' + |
| 1286 '<children>' + |
| 1287 '<infixop>\u2062' + |
| 1288 '<content>' + |
| 1289 '<operator>\u2062</operator>' + |
| 1290 '</content>' + |
| 1291 '<children>' + |
| 1292 '<fenced>' + |
| 1293 '<content>' + |
| 1294 '<fence>\u2016</fence>' + |
| 1295 '<fence>\u2016</fence>' + |
| 1296 '</content>' + |
| 1297 '<children>' + |
| 1298 '<punctuated>' + |
| 1299 '<children>' + |
| 1300 '<fenced>' + |
| 1301 '<content>' + |
| 1302 '<fence>[</fence>' + |
| 1303 '<fence>]</fence>' + |
| 1304 '</content>' + |
| 1305 '<children>' + |
| 1306 '<punctuated>' + |
| 1307 '<children>' + |
| 1308 '<identifier>a</identifier>' + |
| 1309 '<punctuation>\u2016</punctuation>' + |
| 1310 '<identifier>b</identifier>' + |
| 1311 '</children>' + |
| 1312 '</punctuated>' + |
| 1313 '</children>' + |
| 1314 '</fenced>' + |
| 1315 '<punctuation>|</punctuation>' + |
| 1316 '<fenced>' + |
| 1317 '<content>' + |
| 1318 '<fence>[</fence>' + |
| 1319 '<fence>]</fence>' + |
| 1320 '</content>' + |
| 1321 '<children>' + |
| 1322 '<punctuated>' + |
| 1323 '<children>' + |
| 1324 '<identifier>c</identifier>' + |
| 1325 '<punctuation>\u2016</punctuation>' + |
| 1326 '<punctuation>\u00A6</punctuation>' + |
| 1327 '<identifier>d</identifier>' + |
| 1328 '</children>' + |
| 1329 '</punctuated>' + |
| 1330 '</children>' + |
| 1331 '</fenced>' + |
| 1332 '</children>' + |
| 1333 '</punctuated>' + |
| 1334 '</children>' + |
| 1335 '</fenced>' + |
| 1336 '<fenced>' + |
| 1337 '<content>' + |
| 1338 '<fence>[</fence>' + |
| 1339 '<fence>]</fence>' + |
| 1340 '</content>' + |
| 1341 '<children>' + |
| 1342 '<punctuated>' + |
| 1343 '<children>' + |
| 1344 '<identifier>u</identifier>' + |
| 1345 '<punctuation>\u2016</punctuation>' + |
| 1346 '<identifier>v</identifier>' + |
| 1347 '</children>' + |
| 1348 '</punctuated>' + |
| 1349 '</children>' + |
| 1350 '</fenced>' + |
| 1351 '</children>' + |
| 1352 '</infixop>' + |
| 1353 '<punctuation>|</punctuation>' + |
| 1354 '<identifier>x</identifier>' + |
| 1355 '<punctuation>\u2016</punctuation>' + |
| 1356 '<identifier>y</identifier>' + |
| 1357 '<punctuation>\u00A6</punctuation>' + |
| 1358 '<identifier>z</identifier>' + |
| 1359 '</children>' + |
| 1360 '</punctuated>'); |
| 1361 this.xpathBlacklist = []; |
| 1362 }); |
| 1363 |
| 1364 |
| 1365 /** |
| 1366 * Pathological cases with only opening fences. |
| 1367 */ |
| 1368 TEST_F('CvoxSemanticTreeUnitTest', 'StreeOpeningFencesOnly', function() { |
| 1369 this.brief = true; |
| 1370 this.xpathBlacklist = ['descendant::punctuated/content']; |
| 1371 // Single. |
| 1372 this.executeTreeTest( |
| 1373 '<mrow><mo>[</mo></mrow>', |
| 1374 '<fence>[</fence>'); |
| 1375 // Single right. |
| 1376 this.executeTreeTest( |
| 1377 '<mrow><mi>a</mi><mo>[</mo></mrow>', |
| 1378 '<punctuated>' + |
| 1379 '<children>' + |
| 1380 '<identifier>a</identifier>' + |
| 1381 '<punctuation>[</punctuation>' + |
| 1382 '</children>' + |
| 1383 '</punctuated>'); |
| 1384 // Single middle. |
| 1385 this.executeTreeTest( |
| 1386 '<mrow><mi>a</mi><mo>[</mo><mi>b</mi></mrow>', |
| 1387 '<punctuated>' + |
| 1388 '<children>' + |
| 1389 '<identifier>a</identifier>' + |
| 1390 '<punctuation>[</punctuation>' + |
| 1391 '<identifier>b</identifier>' + |
| 1392 '</children>' + |
| 1393 '</punctuated>'); |
| 1394 // Single left. |
| 1395 this.executeTreeTest( |
| 1396 '<mrow><mo>[</mo><mi>b</mi></mrow>', |
| 1397 '<punctuated>' + |
| 1398 '<children>' + |
| 1399 '<punctuation>[</punctuation>' + |
| 1400 '<identifier>b</identifier>' + |
| 1401 '</children>' + |
| 1402 '</punctuated>'); |
| 1403 // Multiple. |
| 1404 this.executeTreeTest( |
| 1405 '<mrow><mi>a</mi><mo>[</mo><mi>b</mi><mi>c</mi><mo>(</mo><mi>d</mi>' + |
| 1406 '<mo>{</mo><mi>e</mi><mo>〈</mo><mi>f</mi></mrow>', |
| 1407 '<punctuated>' + |
| 1408 '<children>' + |
| 1409 '<identifier>a</identifier>' + |
| 1410 '<punctuation>[</punctuation>' + |
| 1411 '<infixop>\u2062' + |
| 1412 '<content>' + |
| 1413 '<operator>\u2062</operator>' + |
| 1414 '</content>' + |
| 1415 '<children>' + |
| 1416 '<identifier>b</identifier>' + |
| 1417 '<identifier>c</identifier>' + |
| 1418 '</children>' + |
| 1419 '</infixop>' + |
| 1420 '<punctuation>(</punctuation>' + |
| 1421 '<identifier>d</identifier>' + |
| 1422 '<punctuation>{</punctuation>' + |
| 1423 '<identifier>e</identifier>' + |
| 1424 '<punctuation>\u3008</punctuation>' + |
| 1425 '<identifier>f</identifier>' + |
| 1426 '</children>' + |
| 1427 '</punctuated>'); |
| 1428 // Multiple plus inner fenced. |
| 1429 this.executeTreeTest( |
| 1430 '<mrow><mi>a</mi><mo>[</mo><mi>b</mi><mo>[</mo><mo>(</mo><mo>(</mo>' + |
| 1431 '<mi>c</mi><mo>)</mo><mi>d</mi><mo>{</mo><mi>e</mi><mo>〈</mo>' + |
| 1432 '<mi>f</mi></mrow>', |
| 1433 '<punctuated>' + |
| 1434 '<children>' + |
| 1435 '<identifier>a</identifier>' + |
| 1436 '<punctuation>[</punctuation>' + |
| 1437 '<identifier>b</identifier>' + |
| 1438 '<punctuation>[</punctuation>' + |
| 1439 '<punctuation>(</punctuation>' + |
| 1440 '<infixop>\u2062' + |
| 1441 '<content>' + |
| 1442 '<operator>\u2062</operator>' + |
| 1443 '</content>' + |
| 1444 '<children>' + |
| 1445 '<fenced>' + |
| 1446 '<content>' + |
| 1447 '<fence>(</fence>' + |
| 1448 '<fence>)</fence>' + |
| 1449 '</content>' + |
| 1450 '<children>' + |
| 1451 '<identifier>c</identifier>' + |
| 1452 '</children>' + |
| 1453 '</fenced>' + |
| 1454 '<identifier>d</identifier>' + |
| 1455 '</children>' + |
| 1456 '</infixop>' + |
| 1457 '<punctuation>{</punctuation>' + |
| 1458 '<identifier>e</identifier>' + |
| 1459 '<punctuation>\u3008</punctuation>' + |
| 1460 '<identifier>f</identifier>' + |
| 1461 '</children>' + |
| 1462 '</punctuated>'); |
| 1463 this.xpathBlacklist = []; |
| 1464 }); |
| 1465 |
| 1466 |
| 1467 /** |
| 1468 * Pathological cases with only closing fences. |
| 1469 */ |
| 1470 TEST_F('CvoxSemanticTreeUnitTest', 'StreeClosingFencesOnly', function() { |
| 1471 this.brief = true; |
| 1472 this.xpathBlacklist = ['descendant::punctuated/content']; |
| 1473 // Single. |
| 1474 this.executeTreeTest( |
| 1475 '<mrow><mo>]</mo></mrow>', |
| 1476 '<fence>]</fence>'); |
| 1477 // Single right. |
| 1478 this.executeTreeTest( |
| 1479 '<mrow><mi>a</mi><mo>]</mo></mrow>', |
| 1480 '<punctuated>' + |
| 1481 '<children>' + |
| 1482 '<identifier>a</identifier>' + |
| 1483 '<punctuation>]</punctuation>' + |
| 1484 '</children>' + |
| 1485 '</punctuated>'); |
| 1486 // Single middle. |
| 1487 this.executeTreeTest( |
| 1488 '<mrow><mi>a</mi><mo>]</mo><mi>b</mi></mrow>', |
| 1489 '<punctuated>' + |
| 1490 '<children>' + |
| 1491 '<identifier>a</identifier>' + |
| 1492 '<punctuation>]</punctuation>' + |
| 1493 '<identifier>b</identifier>' + |
| 1494 '</children>' + |
| 1495 '</punctuated>'); |
| 1496 // Single left. |
| 1497 this.executeTreeTest( |
| 1498 '<mrow><mo>]</mo><mi>b</mi></mrow>', |
| 1499 '<punctuated>' + |
| 1500 '<children>' + |
| 1501 '<punctuation>]</punctuation>' + |
| 1502 '<identifier>b</identifier>' + |
| 1503 '</children>' + |
| 1504 '</punctuated>'); |
| 1505 // Multiple. |
| 1506 this.executeTreeTest( |
| 1507 '<mrow><mi>a</mi><mo>]</mo><mi>b</mi><mi>c</mi><mo>)</mo><mi>d</mi>' + |
| 1508 '<mo>}</mo><mi>e</mi><mo>〉</mo><mi>f</mi></mrow>', |
| 1509 '<punctuated>' + |
| 1510 '<children>' + |
| 1511 '<identifier>a</identifier>' + |
| 1512 '<punctuation>]</punctuation>' + |
| 1513 '<infixop>\u2062' + |
| 1514 '<content>' + |
| 1515 '<operator>\u2062</operator>' + |
| 1516 '</content>' + |
| 1517 '<children>' + |
| 1518 '<identifier>b</identifier>' + |
| 1519 '<identifier>c</identifier>' + |
| 1520 '</children>' + |
| 1521 '</infixop>' + |
| 1522 '<punctuation>)</punctuation>' + |
| 1523 '<identifier>d</identifier>' + |
| 1524 '<punctuation>}</punctuation>' + |
| 1525 '<identifier>e</identifier>' + |
| 1526 '<punctuation>\u3009</punctuation>' + |
| 1527 '<identifier>f</identifier>' + |
| 1528 '</children>' + |
| 1529 '</punctuated>'); |
| 1530 // Multiple plus inner fenced. |
| 1531 this.executeTreeTest( |
| 1532 '<mrow><mi>a</mi><mo>]</mo><mi>b</mi><mo>]</mo><mo>(</mo><mi>c</mi>' + |
| 1533 '<mo>)</mo><mo>)</mo><mi>d</mi><mo>}</mo><mi>e</mi><mo>〉</mo>' + |
| 1534 '<mi>f</mi></mrow>', |
| 1535 '<punctuated>' + |
| 1536 '<children>' + |
| 1537 '<identifier>a</identifier>' + |
| 1538 '<punctuation>]</punctuation>' + |
| 1539 '<identifier>b</identifier>' + |
| 1540 '<punctuation>]</punctuation>' + |
| 1541 '<fenced>' + |
| 1542 '<content>' + |
| 1543 '<fence>(</fence>' + |
| 1544 '<fence>)</fence>' + |
| 1545 '</content>' + |
| 1546 '<children>' + |
| 1547 '<identifier>c</identifier>' + |
| 1548 '</children>' + |
| 1549 '</fenced>' + |
| 1550 '<punctuation>)</punctuation>' + |
| 1551 '<identifier>d</identifier>' + |
| 1552 '<punctuation>}</punctuation>' + |
| 1553 '<identifier>e</identifier>' + |
| 1554 '<punctuation>\u3009</punctuation>' + |
| 1555 '<identifier>f</identifier>' + |
| 1556 '</children>' + |
| 1557 '</punctuated>'); |
| 1558 this.xpathBlacklist = []; |
| 1559 }); |
| 1560 |
| 1561 |
| 1562 /** |
| 1563 * Pathological cases with only neutral fences. |
| 1564 */ |
| 1565 TEST_F('CvoxSemanticTreeUnitTest', 'StreeNeutralFencesOnly', function() { |
| 1566 this.brief = true; |
| 1567 this.xpathBlacklist = ['descendant::punctuated/content']; |
| 1568 // Single. |
| 1569 this.executeTreeTest( |
| 1570 '<mrow><mo>|</mo></mrow>', |
| 1571 '<fence>|</fence>'); |
| 1572 // Single right. |
| 1573 this.executeTreeTest( |
| 1574 '<mrow><mi>a</mi><mo>|</mo></mrow>', |
| 1575 '<punctuated>' + |
| 1576 '<children>' + |
| 1577 '<identifier>a</identifier>' + |
| 1578 '<punctuation>|</punctuation>' + |
| 1579 '</children>' + |
| 1580 '</punctuated>'); |
| 1581 // Single middle. |
| 1582 this.executeTreeTest( |
| 1583 '<mrow><mi>a</mi><mo>|</mo><mi>b</mi></mrow>', |
| 1584 '<punctuated>' + |
| 1585 '<children>' + |
| 1586 '<identifier>a</identifier>' + |
| 1587 '<punctuation>|</punctuation>' + |
| 1588 '<identifier>b</identifier>' + |
| 1589 '</children>' + |
| 1590 '</punctuated>'); |
| 1591 // Single left. |
| 1592 this.executeTreeTest( |
| 1593 '<mrow><mo>|</mo><mi>b</mi></mrow>', |
| 1594 '<punctuated>' + |
| 1595 '<children>' + |
| 1596 '<punctuation>|</punctuation>' + |
| 1597 '<identifier>b</identifier>' + |
| 1598 '</children>' + |
| 1599 '</punctuated>'); |
| 1600 // Two different bars. |
| 1601 this.executeTreeTest( |
| 1602 '<mrow><mi>a</mi><mo>|</mo><mi>b</mi><mo>¦</mo><mi>c</mi></mrow>', |
| 1603 '<punctuated>' + |
| 1604 '<children>' + |
| 1605 '<identifier>a</identifier>' + |
| 1606 '<punctuation>|</punctuation>' + |
| 1607 '<identifier>b</identifier>' + |
| 1608 '<punctuation>\u00A6</punctuation>' + |
| 1609 '<identifier>c</identifier>' + |
| 1610 '</children>' + |
| 1611 '</punctuated>'); |
| 1612 // Three different bars. |
| 1613 this.executeTreeTest( |
| 1614 '<mrow><mi>a</mi><mo>‖</mo><mi>b</mi><mo>|</mo><mi>c</mi>' + |
| 1615 '<mo>¦</mo><mi>d</mi></mrow>', |
| 1616 '<punctuated>' + |
| 1617 '<children>' + |
| 1618 '<identifier>a</identifier>' + |
| 1619 '<punctuation>\u2016</punctuation>' + |
| 1620 '<identifier>b</identifier>' + |
| 1621 '<punctuation>|</punctuation>' + |
| 1622 '<identifier>c</identifier>' + |
| 1623 '<punctuation>\u00A6</punctuation>' + |
| 1624 '<identifier>d</identifier>' + |
| 1625 '</children>' + |
| 1626 '</punctuated>'); |
| 1627 // Multiple plus inner fenced. |
| 1628 this.executeTreeTest( |
| 1629 '<mrow><mo>‖</mo><mo>[</mo><mi>a</mi><mo>‖</mo><mi>b</mi>' + |
| 1630 '<mo>]</mo><mo>‖</mo><mo>|</mo><mi>x</mi><mo>‖</mo>' + |
| 1631 '<mi>y</mi><mo>¦</mo><mi>z</mi></mrow>', |
| 1632 '<punctuated>' + |
| 1633 '<children>' + |
| 1634 '<fenced>' + |
| 1635 '<content>' + |
| 1636 '<fence>\u2016</fence>' + |
| 1637 '<fence>\u2016</fence>' + |
| 1638 '</content>' + |
| 1639 '<children>' + |
| 1640 '<fenced>' + |
| 1641 '<content>' + |
| 1642 '<fence>[</fence>' + |
| 1643 '<fence>]</fence>' + |
| 1644 '</content>' + |
| 1645 '<children>' + |
| 1646 '<punctuated>' + |
| 1647 '<children>' + |
| 1648 '<identifier>a</identifier>' + |
| 1649 '<punctuation>\u2016</punctuation>' + |
| 1650 '<identifier>b</identifier>' + |
| 1651 '</children>' + |
| 1652 '</punctuated>' + |
| 1653 '</children>' + |
| 1654 '</fenced>' + |
| 1655 '</children>' + |
| 1656 '</fenced>' + |
| 1657 '<punctuation>|</punctuation>' + |
| 1658 '<identifier>x</identifier>' + |
| 1659 '<punctuation>\u2016</punctuation>' + |
| 1660 '<identifier>y</identifier>' + |
| 1661 '<punctuation>\u00A6</punctuation>' + |
| 1662 '<identifier>z</identifier>' + |
| 1663 '</children>' + |
| 1664 '</punctuated>'); |
| 1665 this.xpathBlacklist = []; |
| 1666 }); |
| 1667 |
| 1668 |
| 1669 /** |
| 1670 * Pathological cases with mixed fences. |
| 1671 */ |
| 1672 TEST_F('CvoxSemanticTreeUnitTest', 'StreeMixedUnmatchedFences', function() { |
| 1673 this.brief = true; |
| 1674 this.xpathBlacklist = ['descendant::punctuated/content']; |
| 1675 // Close, neutral, open. |
| 1676 this.executeTreeTest( |
| 1677 '<mrow><mo>]</mo><mo>‖</mo><mi>b</mi><mo>|</mo><mi>c</mi>' + |
| 1678 '<mo>(</mo></mrow>', |
| 1679 '<punctuated>' + |
| 1680 '<children>' + |
| 1681 '<punctuation>]</punctuation>' + |
| 1682 '<punctuation>\u2016</punctuation>' + |
| 1683 '<identifier>b</identifier>' + |
| 1684 '<punctuation>|</punctuation>' + |
| 1685 '<identifier>c</identifier>' + |
| 1686 '<punctuation>(</punctuation>' + |
| 1687 '</children>' + |
| 1688 '</punctuated>'); |
| 1689 // Neutrals and close. |
| 1690 this.executeTreeTest( |
| 1691 '<mrow><mi>a</mi><mo>‖</mo><mi>b</mi><mo>|</mo><mi>c</mi>' + |
| 1692 '<mo>¦</mo><mi>d</mi><mo>]</mo><mi>e</mi></mrow>', |
| 1693 '<punctuated>' + |
| 1694 '<children>' + |
| 1695 '<identifier>a</identifier>' + |
| 1696 '<punctuation>\u2016</punctuation>' + |
| 1697 '<identifier>b</identifier>' + |
| 1698 '<punctuation>|</punctuation>' + |
| 1699 '<identifier>c</identifier>' + |
| 1700 '<punctuation>\u00A6</punctuation>' + |
| 1701 '<identifier>d</identifier>' + |
| 1702 '<punctuation>]</punctuation>' + |
| 1703 '<identifier>e</identifier>' + |
| 1704 '</children>' + |
| 1705 '</punctuated>'); |
| 1706 // Neutrals and open. |
| 1707 this.executeTreeTest( |
| 1708 '<mrow><mo>[</mo><mi>a</mi><mo>‖</mo><mi>b</mi><mo>|</mo>' + |
| 1709 '<mi>c</mi><mo>¦</mo><mi>d</mi></mrow>', |
| 1710 '<punctuated>' + |
| 1711 '<children>' + |
| 1712 '<punctuation>[</punctuation>' + |
| 1713 '<identifier>a</identifier>' + |
| 1714 '<punctuation>\u2016</punctuation>' + |
| 1715 '<identifier>b</identifier>' + |
| 1716 '<punctuation>|</punctuation>' + |
| 1717 '<identifier>c</identifier>' + |
| 1718 '<punctuation>\u00A6</punctuation>' + |
| 1719 '<identifier>d</identifier>' + |
| 1720 '</children>' + |
| 1721 '</punctuated>'); |
| 1722 // Multiple fences, fenced and operations |
| 1723 this.executeTreeTest( |
| 1724 '<mrow><mo>‖</mo><mo>[</mo><mi>a</mi><mo>‖</mo><mi>b</mi>' + |
| 1725 '<mo>]</mo><mo>|</mo><mo>[</mo><mi>c</mi><mo>‖</mo>' + |
| 1726 '<mo>¦</mo><mi>d</mi><mo>]</mo><mo>‖</mo><mo>|</mo>' + |
| 1727 '<mi>x</mi><mo>‖</mo><mi>y</mi><mo>¦</mo><mi>z</mi>' + |
| 1728 '<mo>]</mo></mrow>', |
| 1729 '<punctuated>' + |
| 1730 '<children>' + |
| 1731 '<fenced>' + |
| 1732 '<content>' + |
| 1733 '<fence>\u2016</fence>' + |
| 1734 '<fence>\u2016</fence>' + |
| 1735 '</content>' + |
| 1736 '<children>' + |
| 1737 '<punctuated>' + |
| 1738 '<children>' + |
| 1739 '<fenced>' + |
| 1740 '<content>' + |
| 1741 '<fence>[</fence>' + |
| 1742 '<fence>]</fence>' + |
| 1743 '</content>' + |
| 1744 '<children>' + |
| 1745 '<punctuated>' + |
| 1746 '<children>' + |
| 1747 '<identifier>a</identifier>' + |
| 1748 '<punctuation>\u2016</punctuation>' + |
| 1749 '<identifier>b</identifier>' + |
| 1750 '</children>' + |
| 1751 '</punctuated>' + |
| 1752 '</children>' + |
| 1753 '</fenced>' + |
| 1754 '<punctuation>|</punctuation>' + |
| 1755 '<fenced>' + |
| 1756 '<content>' + |
| 1757 '<fence>[</fence>' + |
| 1758 '<fence>]</fence>' + |
| 1759 '</content>' + |
| 1760 '<children>' + |
| 1761 '<punctuated>' + |
| 1762 '<children>' + |
| 1763 '<identifier>c</identifier>' + |
| 1764 '<punctuation>\u2016</punctuation>' + |
| 1765 '<punctuation>\u00A6</punctuation>' + |
| 1766 '<identifier>d</identifier>' + |
| 1767 '</children>' + |
| 1768 '</punctuated>' + |
| 1769 '</children>' + |
| 1770 '</fenced>' + |
| 1771 '</children>' + |
| 1772 '</punctuated>' + |
| 1773 '</children>' + |
| 1774 '</fenced>' + |
| 1775 '<punctuation>|</punctuation>' + |
| 1776 '<identifier>x</identifier>' + |
| 1777 '<punctuation>\u2016</punctuation>' + |
| 1778 '<identifier>y</identifier>' + |
| 1779 '<punctuation>\u00A6</punctuation>' + |
| 1780 '<identifier>z</identifier>' + |
| 1781 '<punctuation>]</punctuation>' + |
| 1782 '</children>' + |
| 1783 '</punctuated>'); |
| 1784 // Multiple fences, fenced and operations |
| 1785 this.executeTreeTest( |
| 1786 '<mrow><mo>‖</mo><mo>]</mo><mo>¦</mo><mo>‖</mo>' + |
| 1787 '<mo>[</mo><mo>|</mo><mo>[</mo><mi>a</mi><mo>‖</mo><mi>b</mi>' + |
| 1788 '<mo>]</mo><mo>‖</mo><mo>|</mo><mi>[</mi><mo>‖</mo>' + |
| 1789 '<mi>y</mi><mo>¦</mo><mi>z</mi></mrow>', |
| 1790 '<punctuated>' + |
| 1791 '<children>' + |
| 1792 '<fenced>' + |
| 1793 '<content>' + |
| 1794 '<fence>\u2016</fence>' + |
| 1795 '<fence>\u2016</fence>' + |
| 1796 '</content>' + |
| 1797 '<children>' + |
| 1798 '<punctuated>' + |
| 1799 '<children>' + |
| 1800 '<punctuation>]</punctuation>' + |
| 1801 '<punctuation>\u00A6</punctuation>' + |
| 1802 '</children>' + |
| 1803 '</punctuated>' + |
| 1804 '</children>' + |
| 1805 '</fenced>' + |
| 1806 '<punctuation>[</punctuation>' + |
| 1807 '<fenced>' + |
| 1808 '<content>' + |
| 1809 '<fence>|</fence>' + |
| 1810 '<fence>|</fence>' + |
| 1811 '</content>' + |
| 1812 '<children>' + |
| 1813 '<punctuated>' + |
| 1814 '<children>' + |
| 1815 '<fenced>' + |
| 1816 '<content>' + |
| 1817 '<fence>[</fence>' + |
| 1818 '<fence>]</fence>' + |
| 1819 '</content>' + |
| 1820 '<children>' + |
| 1821 '<punctuated>' + |
| 1822 '<children>' + |
| 1823 '<identifier>a</identifier>' + |
| 1824 '<punctuation>\u2016</punctuation>' + |
| 1825 '<identifier>b</identifier>' + |
| 1826 '</children>' + |
| 1827 '</punctuated>' + |
| 1828 '</children>' + |
| 1829 '</fenced>' + |
| 1830 '<punctuation>\u2016</punctuation>' + |
| 1831 '</children>' + |
| 1832 '</punctuated>' + |
| 1833 '</children>' + |
| 1834 '</fenced>' + |
| 1835 '<punctuation>[</punctuation>' + |
| 1836 '<punctuation>\u2016</punctuation>' + |
| 1837 '<identifier>y</identifier>' + |
| 1838 '<punctuation>\u00A6</punctuation>' + |
| 1839 '<identifier>z</identifier>' + |
| 1840 '</children>' + |
| 1841 '</punctuated>'); |
| 1842 // Multiple fences, fenced and operations |
| 1843 this.executeTreeTest( |
| 1844 '<mrow><mo>‖</mo><mo>[</mo><mi>a</mi><mo>¦</mo>' + |
| 1845 '<mo>‖</mo><mo>[</mo><mo>+</mo><mo>[</mo><mi>b</mi>' + |
| 1846 '<mo>‖</mo><mi>c</mi><mo>]</mo><mo>+</mo><mo>‖</mo>' + |
| 1847 '<mo>|</mo><mi>d</mi><mo>+</mo><mi>e</mi><mi>[</mi><mo>‖</mo>' + |
| 1848 '<mi>y</mi><mo>¦</mo><mo>+</mo><mi>z</mi></mrow>', |
| 1849 '<punctuated>' + |
| 1850 '<children>' + |
| 1851 '<punctuation>\u2016</punctuation>' + |
| 1852 '<punctuation>[</punctuation>' + |
| 1853 '<identifier>a</identifier>' + |
| 1854 '<punctuation>\u00A6</punctuation>' + |
| 1855 '<punctuation>\u2016</punctuation>' + |
| 1856 '<punctuation>[</punctuation>' + |
| 1857 '<postfixop>+' + |
| 1858 '<content>' + |
| 1859 '<operator>+</operator>' + |
| 1860 '</content>' + |
| 1861 '<children>' + |
| 1862 '<prefixop>+' + |
| 1863 '<content>' + |
| 1864 '<operator>+</operator>' + |
| 1865 '</content>' + |
| 1866 '<children>' + |
| 1867 '<fenced>' + |
| 1868 '<content>' + |
| 1869 '<fence>[</fence>' + |
| 1870 '<fence>]</fence>' + |
| 1871 '</content>' + |
| 1872 '<children>' + |
| 1873 '<punctuated>' + |
| 1874 '<children>' + |
| 1875 '<identifier>b</identifier>' + |
| 1876 '<punctuation>\u2016</punctuation>' + |
| 1877 '<identifier>c</identifier>' + |
| 1878 '</children>' + |
| 1879 '</punctuated>' + |
| 1880 '</children>' + |
| 1881 '</fenced>' + |
| 1882 '</children>' + |
| 1883 '</prefixop>' + |
| 1884 '</children>' + |
| 1885 '</postfixop>' + |
| 1886 '<punctuation>\u2016</punctuation>' + |
| 1887 '<punctuation>|</punctuation>' + |
| 1888 '<infixop>+' + |
| 1889 '<content>' + |
| 1890 '<operator>+</operator>' + |
| 1891 '</content>' + |
| 1892 '<children>' + |
| 1893 '<identifier>d</identifier>' + |
| 1894 '<identifier>e</identifier>' + |
| 1895 '</children>' + |
| 1896 '</infixop>' + |
| 1897 '<punctuation>[</punctuation>' + |
| 1898 '<punctuation>\u2016</punctuation>' + |
| 1899 '<identifier>y</identifier>' + |
| 1900 '<punctuation>\u00A6</punctuation>' + |
| 1901 '<prefixop>+' + |
| 1902 '<content>' + |
| 1903 '<operator>+</operator>' + |
| 1904 '</content>' + |
| 1905 '<children>' + |
| 1906 '<identifier>z</identifier>' + |
| 1907 '</children>' + |
| 1908 '</prefixop>' + |
| 1909 '</children>' + |
| 1910 '</punctuated>'); |
| 1911 this.xpathBlacklist = []; |
| 1912 }); |
| 1913 |
| 1914 |
| 1915 /** |
| 1916 * Simple function applications |
| 1917 */ |
| 1918 TEST_F('CvoxSemanticTreeUnitTest', 'StreeSimpleFuncsSingle', function() { |
| 1919 this.brief = true; |
| 1920 this.executeTreeTest( |
| 1921 '<mrow><mi>f</mi></mrow>', |
| 1922 '<identifier>f</identifier>'); |
| 1923 |
| 1924 this.executeTreeTest( |
| 1925 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow>', |
| 1926 '<appl>' + |
| 1927 '<content>' + |
| 1928 '<punctuation>\u2061</punctuation>' + |
| 1929 '</content>' + |
| 1930 '<children>' + |
| 1931 '<identifier>f</identifier>' + |
| 1932 '<fenced>' + |
| 1933 '<content>' + |
| 1934 '<fence>(</fence>' + |
| 1935 '<fence>)</fence>' + |
| 1936 '</content>' + |
| 1937 '<children>' + |
| 1938 '<identifier>x</identifier>' + |
| 1939 '</children>' + |
| 1940 '</fenced>' + |
| 1941 '</children>' + |
| 1942 '</appl>'); |
| 1943 |
| 1944 this.executeTreeTest( |
| 1945 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mi>y</mi><mo>)</mo></mrow>', |
| 1946 '<appl>' + |
| 1947 '<content>' + |
| 1948 '<punctuation>\u2061</punctuation>' + |
| 1949 '</content>' + |
| 1950 '<children>' + |
| 1951 '<identifier>f</identifier>' + |
| 1952 '<fenced>' + |
| 1953 '<content>' + |
| 1954 '<fence>(</fence>' + |
| 1955 '<fence>)</fence>' + |
| 1956 '</content>' + |
| 1957 '<children>' + |
| 1958 '<infixop>\u2062' + |
| 1959 '<content>' + |
| 1960 '<operator>\u2062</operator>' + |
| 1961 '</content>' + |
| 1962 '<children>' + |
| 1963 '<identifier>x</identifier>' + |
| 1964 '<identifier>y</identifier>' + |
| 1965 '</children>' + |
| 1966 '</infixop>' + |
| 1967 '</children>' + |
| 1968 '</fenced>' + |
| 1969 '</children>' + |
| 1970 '</appl>'); |
| 1971 |
| 1972 this.executeTreeTest( |
| 1973 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>,</mo><mi>y</mi>' + |
| 1974 '<mo>,</mo><mi>z</mi><mo>)</mo></mrow>', |
| 1975 '<appl>' + |
| 1976 '<content>' + |
| 1977 '<punctuation>\u2061</punctuation>' + |
| 1978 '</content>' + |
| 1979 '<children>' + |
| 1980 '<identifier>f</identifier>' + |
| 1981 '<fenced>' + |
| 1982 '<content>' + |
| 1983 '<fence>(</fence>' + |
| 1984 '<fence>)</fence>' + |
| 1985 '</content>' + |
| 1986 '<children>' + |
| 1987 '<punctuated>' + |
| 1988 '<content>' + |
| 1989 '<punctuation>,</punctuation>' + |
| 1990 '<punctuation>,</punctuation>' + |
| 1991 '</content>' + |
| 1992 '<children>' + |
| 1993 '<identifier>x</identifier>' + |
| 1994 '<punctuation>,</punctuation>' + |
| 1995 '<identifier>y</identifier>' + |
| 1996 '<punctuation>,</punctuation>' + |
| 1997 '<identifier>z</identifier>' + |
| 1998 '</children>' + |
| 1999 '</punctuated>' + |
| 2000 '</children>' + |
| 2001 '</fenced>' + |
| 2002 '</children>' + |
| 2003 '</appl>'); |
| 2004 |
| 2005 this.executeTreeTest( |
| 2006 '<mrow><mi>f</mi><mo>(</mo><msup><mi>x</mi><mn>2</mn></msup>' + |
| 2007 '<mo>)</mo></mrow>', |
| 2008 '<appl>' + |
| 2009 '<content>' + |
| 2010 '<punctuation>\u2061</punctuation>' + |
| 2011 '</content>' + |
| 2012 '<children>' + |
| 2013 '<identifier>f</identifier>' + |
| 2014 '<fenced>' + |
| 2015 '<content>' + |
| 2016 '<fence>(</fence>' + |
| 2017 '<fence>)</fence>' + |
| 2018 '</content>' + |
| 2019 '<children>' + |
| 2020 '<superscript>' + |
| 2021 '<children>' + |
| 2022 '<identifier>x</identifier>' + |
| 2023 '<number>2</number>' + |
| 2024 '</children>' + |
| 2025 '</superscript>' + |
| 2026 '</children>' + |
| 2027 '</fenced>' + |
| 2028 '</children>' + |
| 2029 '</appl>'); |
| 2030 |
| 2031 this.executeTreeTest( |
| 2032 '<mrow><mi>f</mi><mo>(</mo><msub><mi>x</mi><mn>2</mn></msub>' + |
| 2033 '<mo>)</mo></mrow>', |
| 2034 '<appl>' + |
| 2035 '<content>' + |
| 2036 '<punctuation>\u2061</punctuation>' + |
| 2037 '</content>' + |
| 2038 '<children>' + |
| 2039 '<identifier>f</identifier>' + |
| 2040 '<fenced>' + |
| 2041 '<content>' + |
| 2042 '<fence>(</fence>' + |
| 2043 '<fence>)</fence>' + |
| 2044 '</content>' + |
| 2045 '<children>' + |
| 2046 '<subscript>' + |
| 2047 '<children>' + |
| 2048 '<identifier>x</identifier>' + |
| 2049 '<number>2</number>' + |
| 2050 '</children>' + |
| 2051 '</subscript>' + |
| 2052 '</children>' + |
| 2053 '</fenced>' + |
| 2054 '</children>' + |
| 2055 '</appl>'); |
| 2056 |
| 2057 this.executeTreeTest( |
| 2058 '<mrow><mi>f</mi><mo>(</mo><msubsup><mi>x</mi><mn>2</mn>' + |
| 2059 '<mn>1</mn></msubsup><mo>)</mo></mrow>', |
| 2060 '<appl>' + |
| 2061 '<content>' + |
| 2062 '<punctuation>\u2061</punctuation>' + |
| 2063 '</content>' + |
| 2064 '<children>' + |
| 2065 '<identifier>f</identifier>' + |
| 2066 '<fenced>' + |
| 2067 '<content>' + |
| 2068 '<fence>(</fence>' + |
| 2069 '<fence>)</fence>' + |
| 2070 '</content>' + |
| 2071 '<children>' + |
| 2072 '<superscript>' + |
| 2073 '<children>' + |
| 2074 '<subscript>' + |
| 2075 '<children>' + |
| 2076 '<identifier>x</identifier>' + |
| 2077 '<number>2</number>' + |
| 2078 '</children>' + |
| 2079 '</subscript>' + |
| 2080 '<number>1</number>' + |
| 2081 '</children>' + |
| 2082 '</superscript>' + |
| 2083 '</children>' + |
| 2084 '</fenced>' + |
| 2085 '</children>' + |
| 2086 '</appl>'); |
| 2087 |
| 2088 this.executeTreeTest( |
| 2089 '<mrow><mi>f</mi><mo>(</mo><mover><mi>x</mi><mn>2</mn></mover>' + |
| 2090 '<mo>)</mo></mrow>', |
| 2091 '<appl>' + |
| 2092 '<content>' + |
| 2093 '<punctuation>\u2061</punctuation>' + |
| 2094 '</content>' + |
| 2095 '<children>' + |
| 2096 '<identifier>f</identifier>' + |
| 2097 '<fenced>' + |
| 2098 '<content>' + |
| 2099 '<fence>(</fence>' + |
| 2100 '<fence>)</fence>' + |
| 2101 '</content>' + |
| 2102 '<children>' + |
| 2103 '<overscore>' + |
| 2104 '<children>' + |
| 2105 '<identifier>x</identifier>' + |
| 2106 '<number>2</number>' + |
| 2107 '</children>' + |
| 2108 '</overscore>' + |
| 2109 '</children>' + |
| 2110 '</fenced>' + |
| 2111 '</children>' + |
| 2112 '</appl>'); |
| 2113 |
| 2114 this.executeTreeTest( |
| 2115 '<mrow><mi>f</mi><mo>(</mo><munder><mi>x</mi><mn>2</mn></munder>' + |
| 2116 '<mo>)</mo></mrow>', |
| 2117 '<appl>' + |
| 2118 '<content>' + |
| 2119 '<punctuation>\u2061</punctuation>' + |
| 2120 '</content>' + |
| 2121 '<children>' + |
| 2122 '<identifier>f</identifier>' + |
| 2123 '<fenced>' + |
| 2124 '<content>' + |
| 2125 '<fence>(</fence>' + |
| 2126 '<fence>)</fence>' + |
| 2127 '</content>' + |
| 2128 '<children>' + |
| 2129 '<underscore>' + |
| 2130 '<children>' + |
| 2131 '<identifier>x</identifier>' + |
| 2132 '<number>2</number>' + |
| 2133 '</children>' + |
| 2134 '</underscore>' + |
| 2135 '</children>' + |
| 2136 '</fenced>' + |
| 2137 '</children>' + |
| 2138 '</appl>'); |
| 2139 |
| 2140 this.executeTreeTest( |
| 2141 '<mrow><mi>f</mi><mo>(</mo><munderover><mi>x</mi><mn>2</mn>' + |
| 2142 '<mn>1</mn></munderover><mo>)</mo></mrow>', |
| 2143 '<appl>' + |
| 2144 '<content>' + |
| 2145 '<punctuation>\u2061</punctuation>' + |
| 2146 '</content>' + |
| 2147 '<children>' + |
| 2148 '<identifier>f</identifier>' + |
| 2149 '<fenced>' + |
| 2150 '<content>' + |
| 2151 '<fence>(</fence>' + |
| 2152 '<fence>)</fence>' + |
| 2153 '</content>' + |
| 2154 '<children>' + |
| 2155 '<overscore>' + |
| 2156 '<children>' + |
| 2157 '<underscore>' + |
| 2158 '<children>' + |
| 2159 '<identifier>x</identifier>' + |
| 2160 '<number>2</number>' + |
| 2161 '</children>' + |
| 2162 '</underscore>' + |
| 2163 '<number>1</number>' + |
| 2164 '</children>' + |
| 2165 '</overscore>' + |
| 2166 '</children>' + |
| 2167 '</fenced>' + |
| 2168 '</children>' + |
| 2169 '</appl>'); |
| 2170 |
| 2171 this.executeTreeTest( |
| 2172 '<mrow><mi>f</mi><mo>(</mo><mfrac><mn>1</mn><mn>2</mn></mfrac>' + |
| 2173 '<mo>)</mo></mrow>', |
| 2174 '<appl>' + |
| 2175 '<content>' + |
| 2176 '<punctuation>\u2061</punctuation>' + |
| 2177 '</content>' + |
| 2178 '<children>' + |
| 2179 '<identifier>f</identifier>' + |
| 2180 '<fenced>' + |
| 2181 '<content>' + |
| 2182 '<fence>(</fence>' + |
| 2183 '<fence>)</fence>' + |
| 2184 '</content>' + |
| 2185 '<children>' + |
| 2186 '<fraction>' + |
| 2187 '<children>' + |
| 2188 '<number>1</number>' + |
| 2189 '<number>2</number>' + |
| 2190 '</children>' + |
| 2191 '</fraction>' + |
| 2192 '</children>' + |
| 2193 '</fenced>' + |
| 2194 '</children>' + |
| 2195 '</appl>'); |
| 2196 |
| 2197 this.executeTreeTest( |
| 2198 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi>' + |
| 2199 '<mo>)</mo></mrow>', |
| 2200 '<infixop>\u2062' + |
| 2201 '<content>' + |
| 2202 '<operator>\u2062</operator>' + |
| 2203 '</content>' + |
| 2204 '<children>' + |
| 2205 '<identifier>f</identifier>' + |
| 2206 '<fenced>' + |
| 2207 '<content>' + |
| 2208 '<fence>(</fence>' + |
| 2209 '<fence>)</fence>' + |
| 2210 '</content>' + |
| 2211 '<children>' + |
| 2212 '<infixop>+' + |
| 2213 '<content>' + |
| 2214 '<operator>+</operator>' + |
| 2215 '</content>' + |
| 2216 '<children>' + |
| 2217 '<identifier>x</identifier>' + |
| 2218 '<identifier>y</identifier>' + |
| 2219 '</children>' + |
| 2220 '</infixop>' + |
| 2221 '</children>' + |
| 2222 '</fenced>' + |
| 2223 '</children>' + |
| 2224 '</infixop>'); |
| 2225 }); |
| 2226 |
| 2227 |
| 2228 /** |
| 2229 * Simple functions with surrounding operators. |
| 2230 */ |
| 2231 TEST_F('CvoxSemanticTreeUnitTest', 'StreeSimpleFuncsWithOps', function() { |
| 2232 this.brief = true; |
| 2233 this.executeTreeTest( |
| 2234 '<mrow><mn>1</mn><mo>+</mo><mi>f</mi><mo>(</mo><mi>x</mi>' + |
| 2235 '<mo>)</mo></mrow>', |
| 2236 '<infixop>+' + |
| 2237 '<content>' + |
| 2238 '<operator>+</operator>' + |
| 2239 '</content>' + |
| 2240 '<children>' + |
| 2241 '<number>1</number>' + |
| 2242 '<appl>' + |
| 2243 '<content>' + |
| 2244 '<punctuation>\u2061</punctuation>' + |
| 2245 '</content>' + |
| 2246 '<children>' + |
| 2247 '<identifier>f</identifier>' + |
| 2248 '<fenced>' + |
| 2249 '<content>' + |
| 2250 '<fence>(</fence>' + |
| 2251 '<fence>)</fence>' + |
| 2252 '</content>' + |
| 2253 '<children>' + |
| 2254 '<identifier>x</identifier>' + |
| 2255 '</children>' + |
| 2256 '</fenced>' + |
| 2257 '</children>' + |
| 2258 '</appl>' + |
| 2259 '</children>' + |
| 2260 '</infixop>'); |
| 2261 |
| 2262 this.executeTreeTest( |
| 2263 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo>' + |
| 2264 '<mn>2</mn></mrow>', |
| 2265 '<infixop>+' + |
| 2266 '<content>' + |
| 2267 '<operator>+</operator>' + |
| 2268 '</content>' + |
| 2269 '<children>' + |
| 2270 '<appl>' + |
| 2271 '<content>' + |
| 2272 '<punctuation>\u2061</punctuation>' + |
| 2273 '</content>' + |
| 2274 '<children>' + |
| 2275 '<identifier>f</identifier>' + |
| 2276 '<fenced>' + |
| 2277 '<content>' + |
| 2278 '<fence>(</fence>' + |
| 2279 '<fence>)</fence>' + |
| 2280 '</content>' + |
| 2281 '<children>' + |
| 2282 '<identifier>x</identifier>' + |
| 2283 '</children>' + |
| 2284 '</fenced>' + |
| 2285 '</children>' + |
| 2286 '</appl>' + |
| 2287 '<number>2</number>' + |
| 2288 '</children>' + |
| 2289 '</infixop>'); |
| 2290 |
| 2291 this.executeTreeTest( |
| 2292 '<mrow><mn>1</mn><mo>+</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>' + |
| 2293 '<mo>+</mo><mn>2</mn></mrow>', |
| 2294 '<infixop>+' + |
| 2295 '<content>' + |
| 2296 '<operator>+</operator>' + |
| 2297 '<operator>+</operator>' + |
| 2298 '</content>' + |
| 2299 '<children>' + |
| 2300 '<number>1</number>' + |
| 2301 '<appl>' + |
| 2302 '<content>' + |
| 2303 '<punctuation>\u2061</punctuation>' + |
| 2304 '</content>' + |
| 2305 '<children>' + |
| 2306 '<identifier>f</identifier>' + |
| 2307 '<fenced>' + |
| 2308 '<content>' + |
| 2309 '<fence>(</fence>' + |
| 2310 '<fence>)</fence>' + |
| 2311 '</content>' + |
| 2312 '<children>' + |
| 2313 '<identifier>x</identifier>' + |
| 2314 '</children>' + |
| 2315 '</fenced>' + |
| 2316 '</children>' + |
| 2317 '</appl>' + |
| 2318 '<number>2</number>' + |
| 2319 '</children>' + |
| 2320 '</infixop>'); |
| 2321 |
| 2322 this.executeTreeTest( |
| 2323 '<mrow><mo>a</mo><mo>+</mo><mi>f</mi><mo>(</mo><mi>x</mi>' + |
| 2324 '<mo>)</mo></mrow>', |
| 2325 '<infixop>+' + |
| 2326 '<content>' + |
| 2327 '<operator>+</operator>' + |
| 2328 '</content>' + |
| 2329 '<children>' + |
| 2330 '<identifier>a</identifier>' + |
| 2331 '<appl>' + |
| 2332 '<content>' + |
| 2333 '<punctuation>\u2061</punctuation>' + |
| 2334 '</content>' + |
| 2335 '<children>' + |
| 2336 '<identifier>f</identifier>' + |
| 2337 '<fenced>' + |
| 2338 '<content>' + |
| 2339 '<fence>(</fence>' + |
| 2340 '<fence>)</fence>' + |
| 2341 '</content>' + |
| 2342 '<children>' + |
| 2343 '<identifier>x</identifier>' + |
| 2344 '</children>' + |
| 2345 '</fenced>' + |
| 2346 '</children>' + |
| 2347 '</appl>' + |
| 2348 '</children>' + |
| 2349 '</infixop>'); |
| 2350 |
| 2351 this.executeTreeTest( |
| 2352 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo>' + |
| 2353 '<mo>b</mo></mrow>', |
| 2354 '<infixop>+' + |
| 2355 '<content>' + |
| 2356 '<operator>+</operator>' + |
| 2357 '</content>' + |
| 2358 '<children>' + |
| 2359 '<appl>' + |
| 2360 '<content>' + |
| 2361 '<punctuation>\u2061</punctuation>' + |
| 2362 '</content>' + |
| 2363 '<children>' + |
| 2364 '<identifier>f</identifier>' + |
| 2365 '<fenced>' + |
| 2366 '<content>' + |
| 2367 '<fence>(</fence>' + |
| 2368 '<fence>)</fence>' + |
| 2369 '</content>' + |
| 2370 '<children>' + |
| 2371 '<identifier>x</identifier>' + |
| 2372 '</children>' + |
| 2373 '</fenced>' + |
| 2374 '</children>' + |
| 2375 '</appl>' + |
| 2376 '<identifier>b</identifier>' + |
| 2377 '</children>' + |
| 2378 '</infixop>'); |
| 2379 |
| 2380 this.executeTreeTest( |
| 2381 '<mrow><mo>a</mo><mo>+</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>' + |
| 2382 '<mo>+</mo><mo>b</mo></mrow>', |
| 2383 '<infixop>+' + |
| 2384 '<content>' + |
| 2385 '<operator>+</operator>' + |
| 2386 '<operator>+</operator>' + |
| 2387 '</content>' + |
| 2388 '<children>' + |
| 2389 '<identifier>a</identifier>' + |
| 2390 '<appl>' + |
| 2391 '<content>' + |
| 2392 '<punctuation>\u2061</punctuation>' + |
| 2393 '</content>' + |
| 2394 '<children>' + |
| 2395 '<identifier>f</identifier>' + |
| 2396 '<fenced>' + |
| 2397 '<content>' + |
| 2398 '<fence>(</fence>' + |
| 2399 '<fence>)</fence>' + |
| 2400 '</content>' + |
| 2401 '<children>' + |
| 2402 '<identifier>x</identifier>' + |
| 2403 '</children>' + |
| 2404 '</fenced>' + |
| 2405 '</children>' + |
| 2406 '</appl>' + |
| 2407 '<identifier>b</identifier>' + |
| 2408 '</children>' + |
| 2409 '</infixop>'); |
| 2410 |
| 2411 this.executeTreeTest( |
| 2412 '<mrow><mo>a</mo><mo>=</mo><mi>f</mi><mo>(</mo><mi>x</mi>' + |
| 2413 '<mo>)</mo></mrow>', |
| 2414 '<relseq>=' + |
| 2415 '<content>' + |
| 2416 '<relation>=</relation>' + |
| 2417 '</content>' + |
| 2418 '<children>' + |
| 2419 '<identifier>a</identifier>' + |
| 2420 '<appl>' + |
| 2421 '<content>' + |
| 2422 '<punctuation>\u2061</punctuation>' + |
| 2423 '</content>' + |
| 2424 '<children>' + |
| 2425 '<identifier>f</identifier>' + |
| 2426 '<fenced>' + |
| 2427 '<content>' + |
| 2428 '<fence>(</fence>' + |
| 2429 '<fence>)</fence>' + |
| 2430 '</content>' + |
| 2431 '<children>' + |
| 2432 '<identifier>x</identifier>' + |
| 2433 '</children>' + |
| 2434 '</fenced>' + |
| 2435 '</children>' + |
| 2436 '</appl>' + |
| 2437 '</children>' + |
| 2438 '</relseq>'); |
| 2439 |
| 2440 this.executeTreeTest( |
| 2441 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo>' + |
| 2442 '<mo>b</mo></mrow>', |
| 2443 '<relseq>=' + |
| 2444 '<content>' + |
| 2445 '<relation>=</relation>' + |
| 2446 '</content>' + |
| 2447 '<children>' + |
| 2448 '<appl>' + |
| 2449 '<content>' + |
| 2450 '<punctuation>\u2061</punctuation>' + |
| 2451 '</content>' + |
| 2452 '<children>' + |
| 2453 '<identifier>f</identifier>' + |
| 2454 '<fenced>' + |
| 2455 '<content>' + |
| 2456 '<fence>(</fence>' + |
| 2457 '<fence>)</fence>' + |
| 2458 '</content>' + |
| 2459 '<children>' + |
| 2460 '<identifier>x</identifier>' + |
| 2461 '</children>' + |
| 2462 '</fenced>' + |
| 2463 '</children>' + |
| 2464 '</appl>' + |
| 2465 '<identifier>b</identifier>' + |
| 2466 '</children>' + |
| 2467 '</relseq>'); |
| 2468 |
| 2469 this.executeTreeTest( |
| 2470 '<mrow><mo>a</mo><mo>=</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>' + |
| 2471 '<mo>=</mo><mo>b</mo></mrow>', |
| 2472 '<relseq>=' + |
| 2473 '<content>' + |
| 2474 '<relation>=</relation>' + |
| 2475 '<relation>=</relation>' + |
| 2476 '</content>' + |
| 2477 '<children>' + |
| 2478 '<identifier>a</identifier>' + |
| 2479 '<appl>' + |
| 2480 '<content>' + |
| 2481 '<punctuation>\u2061</punctuation>' + |
| 2482 '</content>' + |
| 2483 '<children>' + |
| 2484 '<identifier>f</identifier>' + |
| 2485 '<fenced>' + |
| 2486 '<content>' + |
| 2487 '<fence>(</fence>' + |
| 2488 '<fence>)</fence>' + |
| 2489 '</content>' + |
| 2490 '<children>' + |
| 2491 '<identifier>x</identifier>' + |
| 2492 '</children>' + |
| 2493 '</fenced>' + |
| 2494 '</children>' + |
| 2495 '</appl>' + |
| 2496 '<identifier>b</identifier>' + |
| 2497 '</children>' + |
| 2498 '</relseq>'); |
| 2499 }); |
| 2500 |
| 2501 |
| 2502 /** |
| 2503 * Multiple simple functions. |
| 2504 */ |
| 2505 TEST_F('CvoxSemanticTreeUnitTest', 'StreeSimpleFuncsMulti', function() { |
| 2506 this.brief = true; |
| 2507 this.executeTreeTest( |
| 2508 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo><mi>g</mi>' + |
| 2509 '<mo>(</mo><mi>x</mi><mo>)</mo></mrow>', |
| 2510 '<infixop>+' + |
| 2511 '<content>' + |
| 2512 '<operator>+</operator>' + |
| 2513 '</content>' + |
| 2514 '<children>' + |
| 2515 '<appl>' + |
| 2516 '<content>' + |
| 2517 '<punctuation>\u2061</punctuation>' + |
| 2518 '</content>' + |
| 2519 '<children>' + |
| 2520 '<identifier>f</identifier>' + |
| 2521 '<fenced>' + |
| 2522 '<content>' + |
| 2523 '<fence>(</fence>' + |
| 2524 '<fence>)</fence>' + |
| 2525 '</content>' + |
| 2526 '<children>' + |
| 2527 '<identifier>x</identifier>' + |
| 2528 '</children>' + |
| 2529 '</fenced>' + |
| 2530 '</children>' + |
| 2531 '</appl>' + |
| 2532 '<appl>' + |
| 2533 '<content>' + |
| 2534 '<punctuation>\u2061</punctuation>' + |
| 2535 '</content>' + |
| 2536 '<children>' + |
| 2537 '<identifier>g</identifier>' + |
| 2538 '<fenced>' + |
| 2539 '<content>' + |
| 2540 '<fence>(</fence>' + |
| 2541 '<fence>)</fence>' + |
| 2542 '</content>' + |
| 2543 '<children>' + |
| 2544 '<identifier>x</identifier>' + |
| 2545 '</children>' + |
| 2546 '</fenced>' + |
| 2547 '</children>' + |
| 2548 '</appl>' + |
| 2549 '</children>' + |
| 2550 '</infixop>'); |
| 2551 |
| 2552 this.executeTreeTest( |
| 2553 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo><mi>g</mi>' + |
| 2554 '<mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><mi>h</mi><mo>(</mo>' + |
| 2555 '<mi>x</mi><mo>)</mo></mrow>', |
| 2556 '<relseq>=' + |
| 2557 '<content>' + |
| 2558 '<relation>=</relation>' + |
| 2559 '</content>' + |
| 2560 '<children>' + |
| 2561 '<infixop>+' + |
| 2562 '<content>' + |
| 2563 '<operator>+</operator>' + |
| 2564 '</content>' + |
| 2565 '<children>' + |
| 2566 '<appl>' + |
| 2567 '<content>' + |
| 2568 '<punctuation>\u2061</punctuation>' + |
| 2569 '</content>' + |
| 2570 '<children>' + |
| 2571 '<identifier>f</identifier>' + |
| 2572 '<fenced>' + |
| 2573 '<content>' + |
| 2574 '<fence>(</fence>' + |
| 2575 '<fence>)</fence>' + |
| 2576 '</content>' + |
| 2577 '<children>' + |
| 2578 '<identifier>x</identifier>' + |
| 2579 '</children>' + |
| 2580 '</fenced>' + |
| 2581 '</children>' + |
| 2582 '</appl>' + |
| 2583 '<appl>' + |
| 2584 '<content>' + |
| 2585 '<punctuation>\u2061</punctuation>' + |
| 2586 '</content>' + |
| 2587 '<children>' + |
| 2588 '<identifier>g</identifier>' + |
| 2589 '<fenced>' + |
| 2590 '<content>' + |
| 2591 '<fence>(</fence>' + |
| 2592 '<fence>)</fence>' + |
| 2593 '</content>' + |
| 2594 '<children>' + |
| 2595 '<identifier>x</identifier>' + |
| 2596 '</children>' + |
| 2597 '</fenced>' + |
| 2598 '</children>' + |
| 2599 '</appl>' + |
| 2600 '</children>' + |
| 2601 '</infixop>' + |
| 2602 '<appl>' + |
| 2603 '<content>' + |
| 2604 '<punctuation>\u2061</punctuation>' + |
| 2605 '</content>' + |
| 2606 '<children>' + |
| 2607 '<identifier>h</identifier>' + |
| 2608 '<fenced>' + |
| 2609 '<content>' + |
| 2610 '<fence>(</fence>' + |
| 2611 '<fence>)</fence>' + |
| 2612 '</content>' + |
| 2613 '<children>' + |
| 2614 '<identifier>x</identifier>' + |
| 2615 '</children>' + |
| 2616 '</fenced>' + |
| 2617 '</children>' + |
| 2618 '</appl>' + |
| 2619 '</children>' + |
| 2620 '</relseq>'); |
| 2621 |
| 2622 this.executeTreeTest( |
| 2623 '<mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo><mi>g</mi>' + |
| 2624 '<mo>(</mo><mi>y</mi><mo>)</mo><mo>=</mo><mi>h</mi><mo>(</mo>' + |
| 2625 '<mi>x</mi><mi>y</mi><mo>)</mo></mrow>', |
| 2626 '<relseq>=' + |
| 2627 '<content>' + |
| 2628 '<relation>=</relation>' + |
| 2629 '</content>' + |
| 2630 '<children>' + |
| 2631 '<infixop>+' + |
| 2632 '<content>' + |
| 2633 '<operator>+</operator>' + |
| 2634 '</content>' + |
| 2635 '<children>' + |
| 2636 '<appl>' + |
| 2637 '<content>' + |
| 2638 '<punctuation>\u2061</punctuation>' + |
| 2639 '</content>' + |
| 2640 '<children>' + |
| 2641 '<identifier>f</identifier>' + |
| 2642 '<fenced>' + |
| 2643 '<content>' + |
| 2644 '<fence>(</fence>' + |
| 2645 '<fence>)</fence>' + |
| 2646 '</content>' + |
| 2647 '<children>' + |
| 2648 '<identifier>x</identifier>' + |
| 2649 '</children>' + |
| 2650 '</fenced>' + |
| 2651 '</children>' + |
| 2652 '</appl>' + |
| 2653 '<appl>' + |
| 2654 '<content>' + |
| 2655 '<punctuation>\u2061</punctuation>' + |
| 2656 '</content>' + |
| 2657 '<children>' + |
| 2658 '<identifier>g</identifier>' + |
| 2659 '<fenced>' + |
| 2660 '<content>' + |
| 2661 '<fence>(</fence>' + |
| 2662 '<fence>)</fence>' + |
| 2663 '</content>' + |
| 2664 '<children>' + |
| 2665 '<identifier>y</identifier>' + |
| 2666 '</children>' + |
| 2667 '</fenced>' + |
| 2668 '</children>' + |
| 2669 '</appl>' + |
| 2670 '</children>' + |
| 2671 '</infixop>' + |
| 2672 '<appl>' + |
| 2673 '<content>' + |
| 2674 '<punctuation>\u2061</punctuation>' + |
| 2675 '</content>' + |
| 2676 '<children>' + |
| 2677 '<identifier>h</identifier>' + |
| 2678 '<fenced>' + |
| 2679 '<content>' + |
| 2680 '<fence>(</fence>' + |
| 2681 '<fence>)</fence>' + |
| 2682 '</content>' + |
| 2683 '<children>' + |
| 2684 '<infixop>\u2062' + |
| 2685 '<content>' + |
| 2686 '<operator>\u2062</operator>' + |
| 2687 '</content>' + |
| 2688 '<children>' + |
| 2689 '<identifier>x</identifier>' + |
| 2690 '<identifier>y</identifier>' + |
| 2691 '</children>' + |
| 2692 '</infixop>' + |
| 2693 '</children>' + |
| 2694 '</fenced>' + |
| 2695 '</children>' + |
| 2696 '</appl>' + |
| 2697 '</children>' + |
| 2698 '</relseq>'); |
| 2699 }); |
| 2700 |
| 2701 |
| 2702 /** |
| 2703 * Nested simple functions. |
| 2704 */ |
| 2705 TEST_F('CvoxSemanticTreeUnitTest', 'StreeSimpleFuncsNested', function() { |
| 2706 this.brief = true; |
| 2707 this.executeTreeTest( |
| 2708 '<mrow><mi>g</mi><mo>(</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>' + |
| 2709 '<mo>)</mo></mrow>', |
| 2710 '<appl>' + |
| 2711 '<content>' + |
| 2712 '<punctuation>\u2061</punctuation>' + |
| 2713 '</content>' + |
| 2714 '<children>' + |
| 2715 '<identifier>g</identifier>' + |
| 2716 '<fenced>' + |
| 2717 '<content>' + |
| 2718 '<fence>(</fence>' + |
| 2719 '<fence>)</fence>' + |
| 2720 '</content>' + |
| 2721 '<children>' + |
| 2722 '<appl>' + |
| 2723 '<content>' + |
| 2724 '<punctuation>\u2061</punctuation>' + |
| 2725 '</content>' + |
| 2726 '<children>' + |
| 2727 '<identifier>f</identifier>' + |
| 2728 '<fenced>' + |
| 2729 '<content>' + |
| 2730 '<fence>(</fence>' + |
| 2731 '<fence>)</fence>' + |
| 2732 '</content>' + |
| 2733 '<children>' + |
| 2734 '<identifier>x</identifier>' + |
| 2735 '</children>' + |
| 2736 '</fenced>' + |
| 2737 '</children>' + |
| 2738 '</appl>' + |
| 2739 '</children>' + |
| 2740 '</fenced>' + |
| 2741 '</children>' + |
| 2742 '</appl>'); |
| 2743 |
| 2744 this.executeTreeTest( |
| 2745 '<mrow><mi>h</mi><mo>(</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>' + |
| 2746 '<mi>g</mi><mo>(</mo><mi>y</mi><mo>)</mo><mo>)</mo></mrow>', |
| 2747 '<appl>' + |
| 2748 '<content>' + |
| 2749 '<punctuation>\u2061</punctuation>' + |
| 2750 '</content>' + |
| 2751 '<children>' + |
| 2752 '<identifier>h</identifier>' + |
| 2753 '<fenced>' + |
| 2754 '<content>' + |
| 2755 '<fence>(</fence>' + |
| 2756 '<fence>)</fence>' + |
| 2757 '</content>' + |
| 2758 '<children>' + |
| 2759 '<infixop>\u2062' + |
| 2760 '<content>' + |
| 2761 '<operator>\u2062</operator>' + |
| 2762 '</content>' + |
| 2763 '<children>' + |
| 2764 '<appl>' + |
| 2765 '<content>' + |
| 2766 '<punctuation>\u2061</punctuation>' + |
| 2767 '</content>' + |
| 2768 '<children>' + |
| 2769 '<identifier>f</identifier>' + |
| 2770 '<fenced>' + |
| 2771 '<content>' + |
| 2772 '<fence>(</fence>' + |
| 2773 '<fence>)</fence>' + |
| 2774 '</content>' + |
| 2775 '<children>' + |
| 2776 '<identifier>x</identifier>' + |
| 2777 '</children>' + |
| 2778 '</fenced>' + |
| 2779 '</children>' + |
| 2780 '</appl>' + |
| 2781 '<appl>' + |
| 2782 '<content>' + |
| 2783 '<punctuation>\u2061</punctuation>' + |
| 2784 '</content>' + |
| 2785 '<children>' + |
| 2786 '<identifier>g</identifier>' + |
| 2787 '<fenced>' + |
| 2788 '<content>' + |
| 2789 '<fence>(</fence>' + |
| 2790 '<fence>)</fence>' + |
| 2791 '</content>' + |
| 2792 '<children>' + |
| 2793 '<identifier>y</identifier>' + |
| 2794 '</children>' + |
| 2795 '</fenced>' + |
| 2796 '</children>' + |
| 2797 '</appl>' + |
| 2798 '</children>' + |
| 2799 '</infixop>' + |
| 2800 '</children>' + |
| 2801 '</fenced>' + |
| 2802 '</children>' + |
| 2803 '</appl>'); |
| 2804 |
| 2805 this.executeTreeTest( |
| 2806 '<mrow><mi>h</mi><mo>(</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo>' + |
| 2807 '<mo>+</mo><mi>g</mi><mo>(</mo><mi>y</mi><mo>)</mo><mo>)</mo></mrow>', |
| 2808 '<infixop>\u2062' + |
| 2809 '<content>' + |
| 2810 '<operator>\u2062</operator>' + |
| 2811 '</content>' + |
| 2812 '<children>' + |
| 2813 '<identifier>h</identifier>' + |
| 2814 '<fenced>' + |
| 2815 '<content>' + |
| 2816 '<fence>(</fence>' + |
| 2817 '<fence>)</fence>' + |
| 2818 '</content>' + |
| 2819 '<children>' + |
| 2820 '<infixop>+' + |
| 2821 '<content>' + |
| 2822 '<operator>+</operator>' + |
| 2823 '</content>' + |
| 2824 '<children>' + |
| 2825 '<appl>' + |
| 2826 '<content>' + |
| 2827 '<punctuation>\u2061</punctuation>' + |
| 2828 '</content>' + |
| 2829 '<children>' + |
| 2830 '<identifier>f</identifier>' + |
| 2831 '<fenced>' + |
| 2832 '<content>' + |
| 2833 '<fence>(</fence>' + |
| 2834 '<fence>)</fence>' + |
| 2835 '</content>' + |
| 2836 '<children>' + |
| 2837 '<identifier>x</identifier>' + |
| 2838 '</children>' + |
| 2839 '</fenced>' + |
| 2840 '</children>' + |
| 2841 '</appl>' + |
| 2842 '<appl>' + |
| 2843 '<content>' + |
| 2844 '<punctuation>\u2061</punctuation>' + |
| 2845 '</content>' + |
| 2846 '<children>' + |
| 2847 '<identifier>g</identifier>' + |
| 2848 '<fenced>' + |
| 2849 '<content>' + |
| 2850 '<fence>(</fence>' + |
| 2851 '<fence>)</fence>' + |
| 2852 '</content>' + |
| 2853 '<children>' + |
| 2854 '<identifier>y</identifier>' + |
| 2855 '</children>' + |
| 2856 '</fenced>' + |
| 2857 '</children>' + |
| 2858 '</appl>' + |
| 2859 '</children>' + |
| 2860 '</infixop>' + |
| 2861 '</children>' + |
| 2862 '</fenced>' + |
| 2863 '</children>' + |
| 2864 '</infixop>'); |
| 2865 |
| 2866 this.executeTreeTest( |
| 2867 '<mi>P</mi><mo>[</mo><mi>x</mi><mo>=</mo><mn>2</mn><mo>]</mo>', |
| 2868 '<appl>' + |
| 2869 '<content>' + |
| 2870 '<punctuation>\u2061</punctuation>' + |
| 2871 '</content>' + |
| 2872 '<children>' + |
| 2873 '<identifier>P</identifier>' + |
| 2874 '<fenced>' + |
| 2875 '<content>' + |
| 2876 '<fence>[</fence>' + |
| 2877 '<fence>]</fence>' + |
| 2878 '</content>' + |
| 2879 '<children>' + |
| 2880 '<relseq>=' + |
| 2881 '<content>' + |
| 2882 '<relation>=</relation>' + |
| 2883 '</content>' + |
| 2884 '<children>' + |
| 2885 '<identifier>x</identifier>' + |
| 2886 '<number>2</number>' + |
| 2887 '</children>' + |
| 2888 '</relseq>' + |
| 2889 '</children>' + |
| 2890 '</fenced>' + |
| 2891 '</children>' + |
| 2892 '</appl>'); |
| 2893 }); |
| 2894 |
| 2895 |
| 2896 /** |
| 2897 * Simple functions with explicit function application. |
| 2898 */ |
| 2899 TEST_F('CvoxSemanticTreeUnitTest', 'StreeSimpleFuncsExplicitApp', function() { |
| 2900 this.brief = true; |
| 2901 this.executeTreeTest( |
| 2902 '<mi>f</mi><mo>\u2061</mo><mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi>' + |
| 2903 '<mo>)</mo>', |
| 2904 '<appl>' + |
| 2905 '<content>' + |
| 2906 '<punctuation>\u2061</punctuation>' + |
| 2907 '</content>' + |
| 2908 '<children>' + |
| 2909 '<identifier>f</identifier>' + |
| 2910 '<fenced>' + |
| 2911 '<content>' + |
| 2912 '<fence>(</fence>' + |
| 2913 '<fence>)</fence>' + |
| 2914 '</content>' + |
| 2915 '<children>' + |
| 2916 '<infixop>+' + |
| 2917 '<content>' + |
| 2918 '<operator>+</operator>' + |
| 2919 '</content>' + |
| 2920 '<children>' + |
| 2921 '<identifier>x</identifier>' + |
| 2922 '<identifier>y</identifier>' + |
| 2923 '</children>' + |
| 2924 '</infixop>' + |
| 2925 '</children>' + |
| 2926 '</fenced>' + |
| 2927 '</children>' + |
| 2928 '</appl>'); |
| 2929 |
| 2930 this.executeTreeTest( |
| 2931 '<mi>f</mi><mo>\u2061</mo><mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi>' + |
| 2932 '<mo>)</mo><mo>+</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>+</mo>' + |
| 2933 '<mi>y</mi><mo>)</mo>', |
| 2934 '<infixop>+' + |
| 2935 '<content>' + |
| 2936 '<operator>+</operator>' + |
| 2937 '</content>' + |
| 2938 '<children>' + |
| 2939 '<appl>' + |
| 2940 '<content>' + |
| 2941 '<punctuation>\u2061</punctuation>' + |
| 2942 '</content>' + |
| 2943 '<children>' + |
| 2944 '<identifier>f</identifier>' + |
| 2945 '<fenced>' + |
| 2946 '<content>' + |
| 2947 '<fence>(</fence>' + |
| 2948 '<fence>)</fence>' + |
| 2949 '</content>' + |
| 2950 '<children>' + |
| 2951 '<infixop>+' + |
| 2952 '<content>' + |
| 2953 '<operator>+</operator>' + |
| 2954 '</content>' + |
| 2955 '<children>' + |
| 2956 '<identifier>x</identifier>' + |
| 2957 '<identifier>y</identifier>' + |
| 2958 '</children>' + |
| 2959 '</infixop>' + |
| 2960 '</children>' + |
| 2961 '</fenced>' + |
| 2962 '</children>' + |
| 2963 '</appl>' + |
| 2964 '<infixop>\u2062' + |
| 2965 '<content>' + |
| 2966 '<operator>\u2062</operator>' + |
| 2967 '</content>' + |
| 2968 '<children>' + |
| 2969 '<identifier>f</identifier>' + |
| 2970 '<fenced>' + |
| 2971 '<content>' + |
| 2972 '<fence>(</fence>' + |
| 2973 '<fence>)</fence>' + |
| 2974 '</content>' + |
| 2975 '<children>' + |
| 2976 '<infixop>+' + |
| 2977 '<content>' + |
| 2978 '<operator>+</operator>' + |
| 2979 '</content>' + |
| 2980 '<children>' + |
| 2981 '<identifier>x</identifier>' + |
| 2982 '<identifier>y</identifier>' + |
| 2983 '</children>' + |
| 2984 '</infixop>' + |
| 2985 '</children>' + |
| 2986 '</fenced>' + |
| 2987 '</children>' + |
| 2988 '</infixop>' + |
| 2989 '</children>' + |
| 2990 '</infixop>'); |
| 2991 |
| 2992 this.executeTreeTest( |
| 2993 '<msub><mi>f</mi><mn>1</mn></msub><mo>\u2061</mo><mo>(</mo><mi>x</mi>' + |
| 2994 '<mo>+</mo><mi>y</mi><mo>)</mo>', |
| 2995 '<appl>' + |
| 2996 '<content>' + |
| 2997 '<punctuation>\u2061</punctuation>' + |
| 2998 '</content>' + |
| 2999 '<children>' + |
| 3000 '<subscript>' + |
| 3001 '<children>' + |
| 3002 '<identifier>f</identifier>' + |
| 3003 '<number>1</number>' + |
| 3004 '</children>' + |
| 3005 '</subscript>' + |
| 3006 '<fenced>' + |
| 3007 '<content>' + |
| 3008 '<fence>(</fence>' + |
| 3009 '<fence>)</fence>' + |
| 3010 '</content>' + |
| 3011 '<children>' + |
| 3012 '<infixop>+' + |
| 3013 '<content>' + |
| 3014 '<operator>+</operator>' + |
| 3015 '</content>' + |
| 3016 '<children>' + |
| 3017 '<identifier>x</identifier>' + |
| 3018 '<identifier>y</identifier>' + |
| 3019 '</children>' + |
| 3020 '</infixop>' + |
| 3021 '</children>' + |
| 3022 '</fenced>' + |
| 3023 '</children>' + |
| 3024 '</appl>'); |
| 3025 |
| 3026 this.executeTreeTest( |
| 3027 '<msup><msub><mi>f</mi><mn>n</mn></msub><mn>2</mn></msup>' + |
| 3028 '<mo>\u2061</mo><mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi><mo>)</mo>' + |
| 3029 '<mo>+</mo><msup><msub><mi>f</mi><mn>m</mn></msub><mn>2</mn></msup>' + |
| 3030 '<mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi><mo>)</mo>', |
| 3031 '<infixop>+' + |
| 3032 '<content>' + |
| 3033 '<operator>+</operator>' + |
| 3034 '</content>' + |
| 3035 '<children>' + |
| 3036 '<appl>' + |
| 3037 '<content>' + |
| 3038 '<punctuation>\u2061</punctuation>' + |
| 3039 '</content>' + |
| 3040 '<children>' + |
| 3041 '<superscript>' + |
| 3042 '<children>' + |
| 3043 '<subscript>' + |
| 3044 '<children>' + |
| 3045 '<identifier>f</identifier>' + |
| 3046 '<identifier>n</identifier>' + |
| 3047 '</children>' + |
| 3048 '</subscript>' + |
| 3049 '<number>2</number>' + |
| 3050 '</children>' + |
| 3051 '</superscript>' + |
| 3052 '<fenced>' + |
| 3053 '<content>' + |
| 3054 '<fence>(</fence>' + |
| 3055 '<fence>)</fence>' + |
| 3056 '</content>' + |
| 3057 '<children>' + |
| 3058 '<infixop>+' + |
| 3059 '<content>' + |
| 3060 '<operator>+</operator>' + |
| 3061 '</content>' + |
| 3062 '<children>' + |
| 3063 '<identifier>x</identifier>' + |
| 3064 '<identifier>y</identifier>' + |
| 3065 '</children>' + |
| 3066 '</infixop>' + |
| 3067 '</children>' + |
| 3068 '</fenced>' + |
| 3069 '</children>' + |
| 3070 '</appl>' + |
| 3071 '<infixop>\u2062' + |
| 3072 '<content>' + |
| 3073 '<operator>\u2062</operator>' + |
| 3074 '</content>' + |
| 3075 '<children>' + |
| 3076 '<superscript>' + |
| 3077 '<children>' + |
| 3078 '<subscript>' + |
| 3079 '<children>' + |
| 3080 '<identifier>f</identifier>' + |
| 3081 '<identifier>m</identifier>' + |
| 3082 '</children>' + |
| 3083 '</subscript>' + |
| 3084 '<number>2</number>' + |
| 3085 '</children>' + |
| 3086 '</superscript>' + |
| 3087 '<fenced>' + |
| 3088 '<content>' + |
| 3089 '<fence>(</fence>' + |
| 3090 '<fence>)</fence>' + |
| 3091 '</content>' + |
| 3092 '<children>' + |
| 3093 '<infixop>+' + |
| 3094 '<content>' + |
| 3095 '<operator>+</operator>' + |
| 3096 '</content>' + |
| 3097 '<children>' + |
| 3098 '<identifier>x</identifier>' + |
| 3099 '<identifier>y</identifier>' + |
| 3100 '</children>' + |
| 3101 '</infixop>' + |
| 3102 '</children>' + |
| 3103 '</fenced>' + |
| 3104 '</children>' + |
| 3105 '</infixop>' + |
| 3106 '</children>' + |
| 3107 '</infixop>'); |
| 3108 }); |
| 3109 |
| 3110 |
| 3111 /** |
| 3112 * Prefix function applications |
| 3113 */ |
| 3114 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsSingle', function() { |
| 3115 this.brief = true; |
| 3116 this.executeTreeTest( |
| 3117 '<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow>', |
| 3118 '<appl>' + |
| 3119 '<content>' + |
| 3120 '<punctuation>\u2061</punctuation>' + |
| 3121 '</content>' + |
| 3122 '<children>' + |
| 3123 '<function>sin</function>' + |
| 3124 '<fenced>' + |
| 3125 '<content>' + |
| 3126 '<fence>(</fence>' + |
| 3127 '<fence>)</fence>' + |
| 3128 '</content>' + |
| 3129 '<children>' + |
| 3130 '<identifier>x</identifier>' + |
| 3131 '</children>' + |
| 3132 '</fenced>' + |
| 3133 '</children>' + |
| 3134 '</appl>'); |
| 3135 |
| 3136 this.executeTreeTest( |
| 3137 '<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mi>y</mi><mo>)</mo></mrow>', |
| 3138 '<appl>' + |
| 3139 '<content>' + |
| 3140 '<punctuation>\u2061</punctuation>' + |
| 3141 '</content>' + |
| 3142 '<children>' + |
| 3143 '<function>sin</function>' + |
| 3144 '<fenced>' + |
| 3145 '<content>' + |
| 3146 '<fence>(</fence>' + |
| 3147 '<fence>)</fence>' + |
| 3148 '</content>' + |
| 3149 '<children>' + |
| 3150 '<infixop>\u2062' + |
| 3151 '<content>' + |
| 3152 '<operator>\u2062</operator>' + |
| 3153 '</content>' + |
| 3154 '<children>' + |
| 3155 '<identifier>x</identifier>' + |
| 3156 '<identifier>y</identifier>' + |
| 3157 '</children>' + |
| 3158 '</infixop>' + |
| 3159 '</children>' + |
| 3160 '</fenced>' + |
| 3161 '</children>' + |
| 3162 '</appl>'); |
| 3163 |
| 3164 this.executeTreeTest( |
| 3165 '<mrow><mi>sin</mi><mo>(</mo><msup><mi>x</mi><mn>2</mn></msup>' + |
| 3166 '<mo>)</mo></mrow>', |
| 3167 '<appl>' + |
| 3168 '<content>' + |
| 3169 '<punctuation>\u2061</punctuation>' + |
| 3170 '</content>' + |
| 3171 '<children>' + |
| 3172 '<function>sin</function>' + |
| 3173 '<fenced>' + |
| 3174 '<content>' + |
| 3175 '<fence>(</fence>' + |
| 3176 '<fence>)</fence>' + |
| 3177 '</content>' + |
| 3178 '<children>' + |
| 3179 '<superscript>' + |
| 3180 '<children>' + |
| 3181 '<identifier>x</identifier>' + |
| 3182 '<number>2</number>' + |
| 3183 '</children>' + |
| 3184 '</superscript>' + |
| 3185 '</children>' + |
| 3186 '</fenced>' + |
| 3187 '</children>' + |
| 3188 '</appl>'); |
| 3189 |
| 3190 this.executeTreeTest( |
| 3191 '<mrow><mi>sin</mi><mo>(</mo><msub><mi>x</mi><mn>2</mn></msub>' + |
| 3192 '<mo>)</mo></mrow>', |
| 3193 '<appl>' + |
| 3194 '<content>' + |
| 3195 '<punctuation>\u2061</punctuation>' + |
| 3196 '</content>' + |
| 3197 '<children>' + |
| 3198 '<function>sin</function>' + |
| 3199 '<fenced>' + |
| 3200 '<content>' + |
| 3201 '<fence>(</fence>' + |
| 3202 '<fence>)</fence>' + |
| 3203 '</content>' + |
| 3204 '<children>' + |
| 3205 '<subscript>' + |
| 3206 '<children>' + |
| 3207 '<identifier>x</identifier>' + |
| 3208 '<number>2</number>' + |
| 3209 '</children>' + |
| 3210 '</subscript>' + |
| 3211 '</children>' + |
| 3212 '</fenced>' + |
| 3213 '</children>' + |
| 3214 '</appl>'); |
| 3215 |
| 3216 this.executeTreeTest( |
| 3217 '<mrow><mi>sin</mi><mo>(</mo><msubsup><mi>x</mi><mn>2</mn>' + |
| 3218 '<mn>1</mn></msubsup><mo>)</mo></mrow>', |
| 3219 '<appl>' + |
| 3220 '<content>' + |
| 3221 '<punctuation>\u2061</punctuation>' + |
| 3222 '</content>' + |
| 3223 '<children>' + |
| 3224 '<function>sin</function>' + |
| 3225 '<fenced>' + |
| 3226 '<content>' + |
| 3227 '<fence>(</fence>' + |
| 3228 '<fence>)</fence>' + |
| 3229 '</content>' + |
| 3230 '<children>' + |
| 3231 '<superscript>' + |
| 3232 '<children>' + |
| 3233 '<subscript>' + |
| 3234 '<children>' + |
| 3235 '<identifier>x</identifier>' + |
| 3236 '<number>2</number>' + |
| 3237 '</children>' + |
| 3238 '</subscript>' + |
| 3239 '<number>1</number>' + |
| 3240 '</children>' + |
| 3241 '</superscript>' + |
| 3242 '</children>' + |
| 3243 '</fenced>' + |
| 3244 '</children>' + |
| 3245 '</appl>'); |
| 3246 |
| 3247 this.executeTreeTest( |
| 3248 '<mrow><mi>sin</mi><mo>(</mo><mover><mi>x</mi><mn>2</mn></mover>' + |
| 3249 '<mo>)</mo></mrow>', |
| 3250 '<appl>' + |
| 3251 '<content>' + |
| 3252 '<punctuation>\u2061</punctuation>' + |
| 3253 '</content>' + |
| 3254 '<children>' + |
| 3255 '<function>sin</function>' + |
| 3256 '<fenced>' + |
| 3257 '<content>' + |
| 3258 '<fence>(</fence>' + |
| 3259 '<fence>)</fence>' + |
| 3260 '</content>' + |
| 3261 '<children>' + |
| 3262 '<overscore>' + |
| 3263 '<children>' + |
| 3264 '<identifier>x</identifier>' + |
| 3265 '<number>2</number>' + |
| 3266 '</children>' + |
| 3267 '</overscore>' + |
| 3268 '</children>' + |
| 3269 '</fenced>' + |
| 3270 '</children>' + |
| 3271 '</appl>'); |
| 3272 |
| 3273 this.executeTreeTest( |
| 3274 '<mrow><mi>sin</mi><mo>(</mo><munder><mi>x</mi><mn>2</mn></munder>' + |
| 3275 '<mo>)</mo></mrow>', |
| 3276 '<appl>' + |
| 3277 '<content>' + |
| 3278 '<punctuation>\u2061</punctuation>' + |
| 3279 '</content>' + |
| 3280 '<children>' + |
| 3281 '<function>sin</function>' + |
| 3282 '<fenced>' + |
| 3283 '<content>' + |
| 3284 '<fence>(</fence>' + |
| 3285 '<fence>)</fence>' + |
| 3286 '</content>' + |
| 3287 '<children>' + |
| 3288 '<underscore>' + |
| 3289 '<children>' + |
| 3290 '<identifier>x</identifier>' + |
| 3291 '<number>2</number>' + |
| 3292 '</children>' + |
| 3293 '</underscore>' + |
| 3294 '</children>' + |
| 3295 '</fenced>' + |
| 3296 '</children>' + |
| 3297 '</appl>'); |
| 3298 |
| 3299 this.executeTreeTest( |
| 3300 '<mrow><mi>sin</mi><mo>(</mo><munderover><mi>x</mi><mn>2</mn>' + |
| 3301 '<mn>1</mn></munderover><mo>)</mo></mrow>', |
| 3302 '<appl>' + |
| 3303 '<content>' + |
| 3304 '<punctuation>\u2061</punctuation>' + |
| 3305 '</content>' + |
| 3306 '<children>' + |
| 3307 '<function>sin</function>' + |
| 3308 '<fenced>' + |
| 3309 '<content>' + |
| 3310 '<fence>(</fence>' + |
| 3311 '<fence>)</fence>' + |
| 3312 '</content>' + |
| 3313 '<children>' + |
| 3314 '<overscore>' + |
| 3315 '<children>' + |
| 3316 '<underscore>' + |
| 3317 '<children>' + |
| 3318 '<identifier>x</identifier>' + |
| 3319 '<number>2</number>' + |
| 3320 '</children>' + |
| 3321 '</underscore>' + |
| 3322 '<number>1</number>' + |
| 3323 '</children>' + |
| 3324 '</overscore>' + |
| 3325 '</children>' + |
| 3326 '</fenced>' + |
| 3327 '</children>' + |
| 3328 '</appl>'); |
| 3329 |
| 3330 this.executeTreeTest( |
| 3331 '<mrow><mi>sin</mi><mo>(</mo><mfrac><mn>1</mn><mn>2</mn></mfrac>' + |
| 3332 '<mo>)</mo></mrow>', |
| 3333 '<appl>' + |
| 3334 '<content>' + |
| 3335 '<punctuation>\u2061</punctuation>' + |
| 3336 '</content>' + |
| 3337 '<children>' + |
| 3338 '<function>sin</function>' + |
| 3339 '<fenced>' + |
| 3340 '<content>' + |
| 3341 '<fence>(</fence>' + |
| 3342 '<fence>)</fence>' + |
| 3343 '</content>' + |
| 3344 '<children>' + |
| 3345 '<fraction>' + |
| 3346 '<children>' + |
| 3347 '<number>1</number>' + |
| 3348 '<number>2</number>' + |
| 3349 '</children>' + |
| 3350 '</fraction>' + |
| 3351 '</children>' + |
| 3352 '</fenced>' + |
| 3353 '</children>' + |
| 3354 '</appl>'); |
| 3355 |
| 3356 this.executeTreeTest( |
| 3357 '<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>+</mo><mi>y</mi>' + |
| 3358 '<mo>)</mo></mrow>', |
| 3359 '<appl>' + |
| 3360 '<content>' + |
| 3361 '<punctuation>\u2061</punctuation>' + |
| 3362 '</content>' + |
| 3363 '<children>' + |
| 3364 '<function>sin</function>' + |
| 3365 '<fenced>' + |
| 3366 '<content>' + |
| 3367 '<fence>(</fence>' + |
| 3368 '<fence>)</fence>' + |
| 3369 '</content>' + |
| 3370 '<children>' + |
| 3371 '<infixop>+' + |
| 3372 '<content>' + |
| 3373 '<operator>+</operator>' + |
| 3374 '</content>' + |
| 3375 '<children>' + |
| 3376 '<identifier>x</identifier>' + |
| 3377 '<identifier>y</identifier>' + |
| 3378 '</children>' + |
| 3379 '</infixop>' + |
| 3380 '</children>' + |
| 3381 '</fenced>' + |
| 3382 '</children>' + |
| 3383 '</appl>'); |
| 3384 }); |
| 3385 |
| 3386 |
| 3387 /** |
| 3388 * Prefix functions applications with surrounding operators. |
| 3389 */ |
| 3390 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsWithOps', function() { |
| 3391 this.brief = true; |
| 3392 this.executeTreeTest( |
| 3393 '<mrow><mn>1</mn><mo>+</mo><mi>sin</mi><mo>(</mo><mi>x</mi>' + |
| 3394 '<mo>)</mo></mrow>', |
| 3395 '<infixop>+' + |
| 3396 '<content>' + |
| 3397 '<operator>+</operator>' + |
| 3398 '</content>' + |
| 3399 '<children>' + |
| 3400 '<number>1</number>' + |
| 3401 '<appl>' + |
| 3402 '<content>' + |
| 3403 '<punctuation>\u2061</punctuation>' + |
| 3404 '</content>' + |
| 3405 '<children>' + |
| 3406 '<function>sin</function>' + |
| 3407 '<fenced>' + |
| 3408 '<content>' + |
| 3409 '<fence>(</fence>' + |
| 3410 '<fence>)</fence>' + |
| 3411 '</content>' + |
| 3412 '<children>' + |
| 3413 '<identifier>x</identifier>' + |
| 3414 '</children>' + |
| 3415 '</fenced>' + |
| 3416 '</children>' + |
| 3417 '</appl>' + |
| 3418 '</children>' + |
| 3419 '</infixop>'); |
| 3420 |
| 3421 this.executeTreeTest( |
| 3422 '<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo>' + |
| 3423 '<mn>2</mn></mrow>', |
| 3424 '<infixop>+' + |
| 3425 '<content>' + |
| 3426 '<operator>+</operator>' + |
| 3427 '</content>' + |
| 3428 '<children>' + |
| 3429 '<appl>' + |
| 3430 '<content>' + |
| 3431 '<punctuation>\u2061</punctuation>' + |
| 3432 '</content>' + |
| 3433 '<children>' + |
| 3434 '<function>sin</function>' + |
| 3435 '<fenced>' + |
| 3436 '<content>' + |
| 3437 '<fence>(</fence>' + |
| 3438 '<fence>)</fence>' + |
| 3439 '</content>' + |
| 3440 '<children>' + |
| 3441 '<identifier>x</identifier>' + |
| 3442 '</children>' + |
| 3443 '</fenced>' + |
| 3444 '</children>' + |
| 3445 '</appl>' + |
| 3446 '<number>2</number>' + |
| 3447 '</children>' + |
| 3448 '</infixop>'); |
| 3449 |
| 3450 this.executeTreeTest( |
| 3451 '<mrow><mn>1</mn><mo>+</mo><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo>' + |
| 3452 '<mo>+</mo><mn>2</mn></mrow>', |
| 3453 '<infixop>+' + |
| 3454 '<content>' + |
| 3455 '<operator>+</operator>' + |
| 3456 '<operator>+</operator>' + |
| 3457 '</content>' + |
| 3458 '<children>' + |
| 3459 '<number>1</number>' + |
| 3460 '<appl>' + |
| 3461 '<content>' + |
| 3462 '<punctuation>\u2061</punctuation>' + |
| 3463 '</content>' + |
| 3464 '<children>' + |
| 3465 '<function>sin</function>' + |
| 3466 '<fenced>' + |
| 3467 '<content>' + |
| 3468 '<fence>(</fence>' + |
| 3469 '<fence>)</fence>' + |
| 3470 '</content>' + |
| 3471 '<children>' + |
| 3472 '<identifier>x</identifier>' + |
| 3473 '</children>' + |
| 3474 '</fenced>' + |
| 3475 '</children>' + |
| 3476 '</appl>' + |
| 3477 '<number>2</number>' + |
| 3478 '</children>' + |
| 3479 '</infixop>'); |
| 3480 |
| 3481 this.executeTreeTest( |
| 3482 '<mrow><mo>a</mo><mo>+</mo><mi>sin</mi><mo>(</mo><mi>x</mi>' + |
| 3483 '<mo>)</mo></mrow>', |
| 3484 '<infixop>+' + |
| 3485 '<content>' + |
| 3486 '<operator>+</operator>' + |
| 3487 '</content>' + |
| 3488 '<children>' + |
| 3489 '<identifier>a</identifier>' + |
| 3490 '<appl>' + |
| 3491 '<content>' + |
| 3492 '<punctuation>\u2061</punctuation>' + |
| 3493 '</content>' + |
| 3494 '<children>' + |
| 3495 '<function>sin</function>' + |
| 3496 '<fenced>' + |
| 3497 '<content>' + |
| 3498 '<fence>(</fence>' + |
| 3499 '<fence>)</fence>' + |
| 3500 '</content>' + |
| 3501 '<children>' + |
| 3502 '<identifier>x</identifier>' + |
| 3503 '</children>' + |
| 3504 '</fenced>' + |
| 3505 '</children>' + |
| 3506 '</appl>' + |
| 3507 '</children>' + |
| 3508 '</infixop>'); |
| 3509 |
| 3510 this.executeTreeTest( |
| 3511 '<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo>' + |
| 3512 '<mo>b</mo></mrow>', |
| 3513 '<infixop>+' + |
| 3514 '<content>' + |
| 3515 '<operator>+</operator>' + |
| 3516 '</content>' + |
| 3517 '<children>' + |
| 3518 '<appl>' + |
| 3519 '<content>' + |
| 3520 '<punctuation>\u2061</punctuation>' + |
| 3521 '</content>' + |
| 3522 '<children>' + |
| 3523 '<function>sin</function>' + |
| 3524 '<fenced>' + |
| 3525 '<content>' + |
| 3526 '<fence>(</fence>' + |
| 3527 '<fence>)</fence>' + |
| 3528 '</content>' + |
| 3529 '<children>' + |
| 3530 '<identifier>x</identifier>' + |
| 3531 '</children>' + |
| 3532 '</fenced>' + |
| 3533 '</children>' + |
| 3534 '</appl>' + |
| 3535 '<identifier>b</identifier>' + |
| 3536 '</children>' + |
| 3537 '</infixop>'); |
| 3538 |
| 3539 this.executeTreeTest( |
| 3540 '<mrow><mo>a</mo><mo>+</mo><mi>sin</mi><mo>(</mo><mi>x</mi>' + |
| 3541 '<mo>)</mo><mo>+</mo><mo>b</mo></mrow>', |
| 3542 '<infixop>+' + |
| 3543 '<content>' + |
| 3544 '<operator>+</operator>' + |
| 3545 '<operator>+</operator>' + |
| 3546 '</content>' + |
| 3547 '<children>' + |
| 3548 '<identifier>a</identifier>' + |
| 3549 '<appl>' + |
| 3550 '<content>' + |
| 3551 '<punctuation>\u2061</punctuation>' + |
| 3552 '</content>' + |
| 3553 '<children>' + |
| 3554 '<function>sin</function>' + |
| 3555 '<fenced>' + |
| 3556 '<content>' + |
| 3557 '<fence>(</fence>' + |
| 3558 '<fence>)</fence>' + |
| 3559 '</content>' + |
| 3560 '<children>' + |
| 3561 '<identifier>x</identifier>' + |
| 3562 '</children>' + |
| 3563 '</fenced>' + |
| 3564 '</children>' + |
| 3565 '</appl>' + |
| 3566 '<identifier>b</identifier>' + |
| 3567 '</children>' + |
| 3568 '</infixop>'); |
| 3569 |
| 3570 this.executeTreeTest( |
| 3571 '<mrow><mo>a</mo><mo>=</mo><mi>sin</mi><mo>(</mo><mi>x</mi>' + |
| 3572 '<mo>)</mo></mrow>', |
| 3573 '<relseq>=' + |
| 3574 '<content>' + |
| 3575 '<relation>=</relation>' + |
| 3576 '</content>' + |
| 3577 '<children>' + |
| 3578 '<identifier>a</identifier>' + |
| 3579 '<appl>' + |
| 3580 '<content>' + |
| 3581 '<punctuation>\u2061</punctuation>' + |
| 3582 '</content>' + |
| 3583 '<children>' + |
| 3584 '<function>sin</function>' + |
| 3585 '<fenced>' + |
| 3586 '<content>' + |
| 3587 '<fence>(</fence>' + |
| 3588 '<fence>)</fence>' + |
| 3589 '</content>' + |
| 3590 '<children>' + |
| 3591 '<identifier>x</identifier>' + |
| 3592 '</children>' + |
| 3593 '</fenced>' + |
| 3594 '</children>' + |
| 3595 '</appl>' + |
| 3596 '</children>' + |
| 3597 '</relseq>'); |
| 3598 |
| 3599 this.executeTreeTest( |
| 3600 '<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo>' + |
| 3601 '<mo>b</mo></mrow>', |
| 3602 '<relseq>=' + |
| 3603 '<content>' + |
| 3604 '<relation>=</relation>' + |
| 3605 '</content>' + |
| 3606 '<children>' + |
| 3607 '<appl>' + |
| 3608 '<content>' + |
| 3609 '<punctuation>\u2061</punctuation>' + |
| 3610 '</content>' + |
| 3611 '<children>' + |
| 3612 '<function>sin</function>' + |
| 3613 '<fenced>' + |
| 3614 '<content>' + |
| 3615 '<fence>(</fence>' + |
| 3616 '<fence>)</fence>' + |
| 3617 '</content>' + |
| 3618 '<children>' + |
| 3619 '<identifier>x</identifier>' + |
| 3620 '</children>' + |
| 3621 '</fenced>' + |
| 3622 '</children>' + |
| 3623 '</appl>' + |
| 3624 '<identifier>b</identifier>' + |
| 3625 '</children>' + |
| 3626 '</relseq>'); |
| 3627 |
| 3628 this.executeTreeTest( |
| 3629 '<mrow><mo>a</mo><mo>=</mo><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo>' + |
| 3630 '<mo>=</mo><mo>b</mo></mrow>', |
| 3631 '<relseq>=' + |
| 3632 '<content>' + |
| 3633 '<relation>=</relation>' + |
| 3634 '<relation>=</relation>' + |
| 3635 '</content>' + |
| 3636 '<children>' + |
| 3637 '<identifier>a</identifier>' + |
| 3638 '<appl>' + |
| 3639 '<content>' + |
| 3640 '<punctuation>\u2061</punctuation>' + |
| 3641 '</content>' + |
| 3642 '<children>' + |
| 3643 '<function>sin</function>' + |
| 3644 '<fenced>' + |
| 3645 '<content>' + |
| 3646 '<fence>(</fence>' + |
| 3647 '<fence>)</fence>' + |
| 3648 '</content>' + |
| 3649 '<children>' + |
| 3650 '<identifier>x</identifier>' + |
| 3651 '</children>' + |
| 3652 '</fenced>' + |
| 3653 '</children>' + |
| 3654 '</appl>' + |
| 3655 '<identifier>b</identifier>' + |
| 3656 '</children>' + |
| 3657 '</relseq>'); |
| 3658 }); |
| 3659 |
| 3660 |
| 3661 /** |
| 3662 * Multiple prefix function applications. |
| 3663 */ |
| 3664 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsMulti', function() { |
| 3665 this.brief = true; |
| 3666 this.executeTreeTest( |
| 3667 '<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo><mi>cos</mi>' + |
| 3668 '<mo>(</mo><mi>x</mi><mo>)</mo></mrow>', |
| 3669 '<infixop>+' + |
| 3670 '<content>' + |
| 3671 '<operator>+</operator>' + |
| 3672 '</content>' + |
| 3673 '<children>' + |
| 3674 '<appl>' + |
| 3675 '<content>' + |
| 3676 '<punctuation>\u2061</punctuation>' + |
| 3677 '</content>' + |
| 3678 '<children>' + |
| 3679 '<function>sin</function>' + |
| 3680 '<fenced>' + |
| 3681 '<content>' + |
| 3682 '<fence>(</fence>' + |
| 3683 '<fence>)</fence>' + |
| 3684 '</content>' + |
| 3685 '<children>' + |
| 3686 '<identifier>x</identifier>' + |
| 3687 '</children>' + |
| 3688 '</fenced>' + |
| 3689 '</children>' + |
| 3690 '</appl>' + |
| 3691 '<appl>' + |
| 3692 '<content>' + |
| 3693 '<punctuation>\u2061</punctuation>' + |
| 3694 '</content>' + |
| 3695 '<children>' + |
| 3696 '<function>cos</function>' + |
| 3697 '<fenced>' + |
| 3698 '<content>' + |
| 3699 '<fence>(</fence>' + |
| 3700 '<fence>)</fence>' + |
| 3701 '</content>' + |
| 3702 '<children>' + |
| 3703 '<identifier>x</identifier>' + |
| 3704 '</children>' + |
| 3705 '</fenced>' + |
| 3706 '</children>' + |
| 3707 '</appl>' + |
| 3708 '</children>' + |
| 3709 '</infixop>'); |
| 3710 |
| 3711 this.executeTreeTest( |
| 3712 '<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo><mi>cos</mi>' + |
| 3713 '<mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><mi>tan</mi><mo>(</mo>' + |
| 3714 '<mi>x</mi><mo>)</mo></mrow>', |
| 3715 '<relseq>=' + |
| 3716 '<content>' + |
| 3717 '<relation>=</relation>' + |
| 3718 '</content>' + |
| 3719 '<children>' + |
| 3720 '<infixop>+' + |
| 3721 '<content>' + |
| 3722 '<operator>+</operator>' + |
| 3723 '</content>' + |
| 3724 '<children>' + |
| 3725 '<appl>' + |
| 3726 '<content>' + |
| 3727 '<punctuation>\u2061</punctuation>' + |
| 3728 '</content>' + |
| 3729 '<children>' + |
| 3730 '<function>sin</function>' + |
| 3731 '<fenced>' + |
| 3732 '<content>' + |
| 3733 '<fence>(</fence>' + |
| 3734 '<fence>)</fence>' + |
| 3735 '</content>' + |
| 3736 '<children>' + |
| 3737 '<identifier>x</identifier>' + |
| 3738 '</children>' + |
| 3739 '</fenced>' + |
| 3740 '</children>' + |
| 3741 '</appl>' + |
| 3742 '<appl>' + |
| 3743 '<content>' + |
| 3744 '<punctuation>\u2061</punctuation>' + |
| 3745 '</content>' + |
| 3746 '<children>' + |
| 3747 '<function>cos</function>' + |
| 3748 '<fenced>' + |
| 3749 '<content>' + |
| 3750 '<fence>(</fence>' + |
| 3751 '<fence>)</fence>' + |
| 3752 '</content>' + |
| 3753 '<children>' + |
| 3754 '<identifier>x</identifier>' + |
| 3755 '</children>' + |
| 3756 '</fenced>' + |
| 3757 '</children>' + |
| 3758 '</appl>' + |
| 3759 '</children>' + |
| 3760 '</infixop>' + |
| 3761 '<appl>' + |
| 3762 '<content>' + |
| 3763 '<punctuation>\u2061</punctuation>' + |
| 3764 '</content>' + |
| 3765 '<children>' + |
| 3766 '<function>tan</function>' + |
| 3767 '<fenced>' + |
| 3768 '<content>' + |
| 3769 '<fence>(</fence>' + |
| 3770 '<fence>)</fence>' + |
| 3771 '</content>' + |
| 3772 '<children>' + |
| 3773 '<identifier>x</identifier>' + |
| 3774 '</children>' + |
| 3775 '</fenced>' + |
| 3776 '</children>' + |
| 3777 '</appl>' + |
| 3778 '</children>' + |
| 3779 '</relseq>'); |
| 3780 |
| 3781 this.executeTreeTest( |
| 3782 '<mrow><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>+</mo><mi>cos</mi>' + |
| 3783 '<mo>(</mo><mi>y</mi><mo>)</mo><mo>=</mo><mi>tan</mi><mo>(</mo>' + |
| 3784 '<mi>x</mi><mi>y</mi><mo>)</mo></mrow>', |
| 3785 '<relseq>=' + |
| 3786 '<content>' + |
| 3787 '<relation>=</relation>' + |
| 3788 '</content>' + |
| 3789 '<children>' + |
| 3790 '<infixop>+' + |
| 3791 '<content>' + |
| 3792 '<operator>+</operator>' + |
| 3793 '</content>' + |
| 3794 '<children>' + |
| 3795 '<appl>' + |
| 3796 '<content>' + |
| 3797 '<punctuation>\u2061</punctuation>' + |
| 3798 '</content>' + |
| 3799 '<children>' + |
| 3800 '<function>sin</function>' + |
| 3801 '<fenced>' + |
| 3802 '<content>' + |
| 3803 '<fence>(</fence>' + |
| 3804 '<fence>)</fence>' + |
| 3805 '</content>' + |
| 3806 '<children>' + |
| 3807 '<identifier>x</identifier>' + |
| 3808 '</children>' + |
| 3809 '</fenced>' + |
| 3810 '</children>' + |
| 3811 '</appl>' + |
| 3812 '<appl>' + |
| 3813 '<content>' + |
| 3814 '<punctuation>\u2061</punctuation>' + |
| 3815 '</content>' + |
| 3816 '<children>' + |
| 3817 '<function>cos</function>' + |
| 3818 '<fenced>' + |
| 3819 '<content>' + |
| 3820 '<fence>(</fence>' + |
| 3821 '<fence>)</fence>' + |
| 3822 '</content>' + |
| 3823 '<children>' + |
| 3824 '<identifier>y</identifier>' + |
| 3825 '</children>' + |
| 3826 '</fenced>' + |
| 3827 '</children>' + |
| 3828 '</appl>' + |
| 3829 '</children>' + |
| 3830 '</infixop>' + |
| 3831 '<appl>' + |
| 3832 '<content>' + |
| 3833 '<punctuation>\u2061</punctuation>' + |
| 3834 '</content>' + |
| 3835 '<children>' + |
| 3836 '<function>tan</function>' + |
| 3837 '<fenced>' + |
| 3838 '<content>' + |
| 3839 '<fence>(</fence>' + |
| 3840 '<fence>)</fence>' + |
| 3841 '</content>' + |
| 3842 '<children>' + |
| 3843 '<infixop>\u2062' + |
| 3844 '<content>' + |
| 3845 '<operator>\u2062</operator>' + |
| 3846 '</content>' + |
| 3847 '<children>' + |
| 3848 '<identifier>x</identifier>' + |
| 3849 '<identifier>y</identifier>' + |
| 3850 '</children>' + |
| 3851 '</infixop>' + |
| 3852 '</children>' + |
| 3853 '</fenced>' + |
| 3854 '</children>' + |
| 3855 '</appl>' + |
| 3856 '</children>' + |
| 3857 '</relseq>'); |
| 3858 }); |
| 3859 |
| 3860 |
| 3861 /** |
| 3862 * Prefix function applications with sub- and superscripts. |
| 3863 */ |
| 3864 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsScripts', function() { |
| 3865 this.brief = true; |
| 3866 this.executeTreeTest( |
| 3867 '<mrow><msup><mi>sin</mi><mn>2</mn></msup><mo>(</mo><mi>x</mi>' + |
| 3868 '<mo>)</mo></mrow>', |
| 3869 '<appl>' + |
| 3870 '<content>' + |
| 3871 '<punctuation>\u2061</punctuation>' + |
| 3872 '</content>' + |
| 3873 '<children>' + |
| 3874 '<superscript>' + |
| 3875 '<children>' + |
| 3876 '<function>sin</function>' + |
| 3877 '<number>2</number>' + |
| 3878 '</children>' + |
| 3879 '</superscript>' + |
| 3880 '<fenced>' + |
| 3881 '<content>' + |
| 3882 '<fence>(</fence>' + |
| 3883 '<fence>)</fence>' + |
| 3884 '</content>' + |
| 3885 '<children>' + |
| 3886 '<identifier>x</identifier>' + |
| 3887 '</children>' + |
| 3888 '</fenced>' + |
| 3889 '</children>' + |
| 3890 '</appl>'); |
| 3891 |
| 3892 this.executeTreeTest( |
| 3893 '<mrow><msub><mi>sin</mi><mn>1</mn></msub><mo>(</mo><mi>x</mi>' + |
| 3894 '<mo>)</mo></mrow>', |
| 3895 '<appl>' + |
| 3896 '<content>' + |
| 3897 '<punctuation>\u2061</punctuation>' + |
| 3898 '</content>' + |
| 3899 '<children>' + |
| 3900 '<subscript>' + |
| 3901 '<children>' + |
| 3902 '<function>sin</function>' + |
| 3903 '<number>1</number>' + |
| 3904 '</children>' + |
| 3905 '</subscript>' + |
| 3906 '<fenced>' + |
| 3907 '<content>' + |
| 3908 '<fence>(</fence>' + |
| 3909 '<fence>)</fence>' + |
| 3910 '</content>' + |
| 3911 '<children>' + |
| 3912 '<identifier>x</identifier>' + |
| 3913 '</children>' + |
| 3914 '</fenced>' + |
| 3915 '</children>' + |
| 3916 '</appl>'); |
| 3917 |
| 3918 this.executeTreeTest( |
| 3919 '<mrow><msubsup><mi>sin</mi><mn>2</mn><mn>1</mn></msubsup><mo>(</mo>' + |
| 3920 '<mi>x</mi><mo>)</mo></mrow>', |
| 3921 '<appl>' + |
| 3922 '<content>' + |
| 3923 '<punctuation>\u2061</punctuation>' + |
| 3924 '</content>' + |
| 3925 '<children>' + |
| 3926 '<superscript>' + |
| 3927 '<children>' + |
| 3928 '<subscript>' + |
| 3929 '<children>' + |
| 3930 '<function>sin</function>' + |
| 3931 '<number>2</number>' + |
| 3932 '</children>' + |
| 3933 '</subscript>' + |
| 3934 '<number>1</number>' + |
| 3935 '</children>' + |
| 3936 '</superscript>' + |
| 3937 '<fenced>' + |
| 3938 '<content>' + |
| 3939 '<fence>(</fence>' + |
| 3940 '<fence>)</fence>' + |
| 3941 '</content>' + |
| 3942 '<children>' + |
| 3943 '<identifier>x</identifier>' + |
| 3944 '</children>' + |
| 3945 '</fenced>' + |
| 3946 '</children>' + |
| 3947 '</appl>'); |
| 3948 |
| 3949 this.executeTreeTest( |
| 3950 '<mrow><msup><mi>sin</mi><mn>2</mn></msup><mo>(</mo><mi>x</mi>' + |
| 3951 '<mo>)</mo><mo>+</mo><msup><mi>cos</mi><mn>2</mn></msup><mo>(</mo>' + |
| 3952 '<mi>y</mi><mo>)</mo><mo>=</mo><mn>1</mn></mrow>', |
| 3953 '<relseq>=' + |
| 3954 '<content>' + |
| 3955 '<relation>=</relation>' + |
| 3956 '</content>' + |
| 3957 '<children>' + |
| 3958 '<infixop>+' + |
| 3959 '<content>' + |
| 3960 '<operator>+</operator>' + |
| 3961 '</content>' + |
| 3962 '<children>' + |
| 3963 '<appl>' + |
| 3964 '<content>' + |
| 3965 '<punctuation>\u2061</punctuation>' + |
| 3966 '</content>' + |
| 3967 '<children>' + |
| 3968 '<superscript>' + |
| 3969 '<children>' + |
| 3970 '<function>sin</function>' + |
| 3971 '<number>2</number>' + |
| 3972 '</children>' + |
| 3973 '</superscript>' + |
| 3974 '<fenced>' + |
| 3975 '<content>' + |
| 3976 '<fence>(</fence>' + |
| 3977 '<fence>)</fence>' + |
| 3978 '</content>' + |
| 3979 '<children>' + |
| 3980 '<identifier>x</identifier>' + |
| 3981 '</children>' + |
| 3982 '</fenced>' + |
| 3983 '</children>' + |
| 3984 '</appl>' + |
| 3985 '<appl>' + |
| 3986 '<content>' + |
| 3987 '<punctuation>\u2061</punctuation>' + |
| 3988 '</content>' + |
| 3989 '<children>' + |
| 3990 '<superscript>' + |
| 3991 '<children>' + |
| 3992 '<function>cos</function>' + |
| 3993 '<number>2</number>' + |
| 3994 '</children>' + |
| 3995 '</superscript>' + |
| 3996 '<fenced>' + |
| 3997 '<content>' + |
| 3998 '<fence>(</fence>' + |
| 3999 '<fence>)</fence>' + |
| 4000 '</content>' + |
| 4001 '<children>' + |
| 4002 '<identifier>y</identifier>' + |
| 4003 '</children>' + |
| 4004 '</fenced>' + |
| 4005 '</children>' + |
| 4006 '</appl>' + |
| 4007 '</children>' + |
| 4008 '</infixop>' + |
| 4009 '<number>1</number>' + |
| 4010 '</children>' + |
| 4011 '</relseq>'); |
| 4012 }); |
| 4013 |
| 4014 |
| 4015 /** |
| 4016 * Prefix function applications with unfenced arguments. |
| 4017 */ |
| 4018 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsUnfenced', function() { |
| 4019 this.brief = true; |
| 4020 this.executeTreeTest( |
| 4021 '<mrow><mi>sin</mi><mi>x</mi></mrow>', |
| 4022 '<appl>' + |
| 4023 '<content>' + |
| 4024 '<punctuation>\u2061</punctuation>' + |
| 4025 '</content>' + |
| 4026 '<children>' + |
| 4027 '<function>sin</function>' + |
| 4028 '<identifier>x</identifier>' + |
| 4029 '</children>' + |
| 4030 '</appl>'); |
| 4031 |
| 4032 this.executeTreeTest( |
| 4033 '<mrow><mi>sin</mi><mi>x</mi><mi>y</mi></mrow>', |
| 4034 '<appl>' + |
| 4035 '<content>' + |
| 4036 '<punctuation>\u2061</punctuation>' + |
| 4037 '</content>' + |
| 4038 '<children>' + |
| 4039 '<function>sin</function>' + |
| 4040 '<infixop>\u2062' + |
| 4041 '<content>' + |
| 4042 '<operator>\u2062</operator>' + |
| 4043 '</content>' + |
| 4044 '<children>' + |
| 4045 '<identifier>x</identifier>' + |
| 4046 '<identifier>y</identifier>' + |
| 4047 '</children>' + |
| 4048 '</infixop>' + |
| 4049 '</children>' + |
| 4050 '</appl>'); |
| 4051 |
| 4052 this.executeTreeTest( |
| 4053 '<mrow><mi>sin</mi><msup><mi>x</mi><mn>2</mn></msup></mrow>', |
| 4054 '<appl>' + |
| 4055 '<content>' + |
| 4056 '<punctuation>\u2061</punctuation>' + |
| 4057 '</content>' + |
| 4058 '<children>' + |
| 4059 '<function>sin</function>' + |
| 4060 '<superscript>' + |
| 4061 '<children>' + |
| 4062 '<identifier>x</identifier>' + |
| 4063 '<number>2</number>' + |
| 4064 '</children>' + |
| 4065 '</superscript>' + |
| 4066 '</children>' + |
| 4067 '</appl>'); |
| 4068 |
| 4069 this.executeTreeTest( |
| 4070 '<mrow><mi>sin</mi><msub><mi>x</mi><mn>2</mn></msub></mrow>', |
| 4071 '<appl>' + |
| 4072 '<content>' + |
| 4073 '<punctuation>\u2061</punctuation>' + |
| 4074 '</content>' + |
| 4075 '<children>' + |
| 4076 '<function>sin</function>' + |
| 4077 '<subscript>' + |
| 4078 '<children>' + |
| 4079 '<identifier>x</identifier>' + |
| 4080 '<number>2</number>' + |
| 4081 '</children>' + |
| 4082 '</subscript>' + |
| 4083 '</children>' + |
| 4084 '</appl>'); |
| 4085 |
| 4086 this.executeTreeTest( |
| 4087 '<mrow><mi>sin</mi><msubsup><mi>x</mi><mn>2</mn><mn>1</mn>' + |
| 4088 '</msubsup></mrow>', |
| 4089 '<appl>' + |
| 4090 '<content>' + |
| 4091 '<punctuation>\u2061</punctuation>' + |
| 4092 '</content>' + |
| 4093 '<children>' + |
| 4094 '<function>sin</function>' + |
| 4095 '<superscript>' + |
| 4096 '<children>' + |
| 4097 '<subscript>' + |
| 4098 '<children>' + |
| 4099 '<identifier>x</identifier>' + |
| 4100 '<number>2</number>' + |
| 4101 '</children>' + |
| 4102 '</subscript>' + |
| 4103 '<number>1</number>' + |
| 4104 '</children>' + |
| 4105 '</superscript>' + |
| 4106 '</children>' + |
| 4107 '</appl>'); |
| 4108 |
| 4109 this.executeTreeTest( |
| 4110 '<mrow><mi>sin</mi><mover><mi>x</mi><mn>2</mn></mover></mrow>', |
| 4111 '<appl>' + |
| 4112 '<content>' + |
| 4113 '<punctuation>\u2061</punctuation>' + |
| 4114 '</content>' + |
| 4115 '<children>' + |
| 4116 '<function>sin</function>' + |
| 4117 '<overscore>' + |
| 4118 '<children>' + |
| 4119 '<identifier>x</identifier>' + |
| 4120 '<number>2</number>' + |
| 4121 '</children>' + |
| 4122 '</overscore>' + |
| 4123 '</children>' + |
| 4124 '</appl>'); |
| 4125 |
| 4126 this.executeTreeTest( |
| 4127 '<mrow><mi>sin</mi><munder><mi>x</mi><mn>2</mn></munder></mrow>', |
| 4128 '<appl>' + |
| 4129 '<content>' + |
| 4130 '<punctuation>\u2061</punctuation>' + |
| 4131 '</content>' + |
| 4132 '<children>' + |
| 4133 '<function>sin</function>' + |
| 4134 '<underscore>' + |
| 4135 '<children>' + |
| 4136 '<identifier>x</identifier>' + |
| 4137 '<number>2</number>' + |
| 4138 '</children>' + |
| 4139 '</underscore>' + |
| 4140 '</children>' + |
| 4141 '</appl>'); |
| 4142 |
| 4143 this.executeTreeTest( |
| 4144 '<mrow><mi>sin</mi><munderover><mi>x</mi><mn>2</mn><mn>1</mn>' + |
| 4145 '</munderover></mrow>', |
| 4146 '<appl>' + |
| 4147 '<content>' + |
| 4148 '<punctuation>\u2061</punctuation>' + |
| 4149 '</content>' + |
| 4150 '<children>' + |
| 4151 '<function>sin</function>' + |
| 4152 '<overscore>' + |
| 4153 '<children>' + |
| 4154 '<underscore>' + |
| 4155 '<children>' + |
| 4156 '<identifier>x</identifier>' + |
| 4157 '<number>2</number>' + |
| 4158 '</children>' + |
| 4159 '</underscore>' + |
| 4160 '<number>1</number>' + |
| 4161 '</children>' + |
| 4162 '</overscore>' + |
| 4163 '</children>' + |
| 4164 '</appl>'); |
| 4165 |
| 4166 this.executeTreeTest( |
| 4167 '<mrow><mi>sin</mi><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow>', |
| 4168 '<appl>' + |
| 4169 '<content>' + |
| 4170 '<punctuation>\u2061</punctuation>' + |
| 4171 '</content>' + |
| 4172 '<children>' + |
| 4173 '<function>sin</function>' + |
| 4174 '<fraction>' + |
| 4175 '<children>' + |
| 4176 '<number>1</number>' + |
| 4177 '<number>2</number>' + |
| 4178 '</children>' + |
| 4179 '</fraction>' + |
| 4180 '</children>' + |
| 4181 '</appl>'); |
| 4182 }); |
| 4183 |
| 4184 |
| 4185 /** |
| 4186 * Prefix function applications with unfenced arguments in an operator |
| 4187 * expression. |
| 4188 */ |
| 4189 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsUnfencedOps', function() { |
| 4190 this.brief = true; |
| 4191 this.executeTreeTest( |
| 4192 '<mrow><mn>1</mn><mo>+</mo><mi>sin</mi><mi>x</mi></mrow>', |
| 4193 '<infixop>+' + |
| 4194 '<content>' + |
| 4195 '<operator>+</operator>' + |
| 4196 '</content>' + |
| 4197 '<children>' + |
| 4198 '<number>1</number>' + |
| 4199 '<appl>' + |
| 4200 '<content>' + |
| 4201 '<punctuation>\u2061</punctuation>' + |
| 4202 '</content>' + |
| 4203 '<children>' + |
| 4204 '<function>sin</function>' + |
| 4205 '<identifier>x</identifier>' + |
| 4206 '</children>' + |
| 4207 '</appl>' + |
| 4208 '</children>' + |
| 4209 '</infixop>'); |
| 4210 |
| 4211 this.executeTreeTest( |
| 4212 '<mrow><mi>sin</mi><mi>x</mi><mo>+</mo><mn>2</mn></mrow>', |
| 4213 '<infixop>+' + |
| 4214 '<content>' + |
| 4215 '<operator>+</operator>' + |
| 4216 '</content>' + |
| 4217 '<children>' + |
| 4218 '<appl>' + |
| 4219 '<content>' + |
| 4220 '<punctuation>\u2061</punctuation>' + |
| 4221 '</content>' + |
| 4222 '<children>' + |
| 4223 '<function>sin</function>' + |
| 4224 '<identifier>x</identifier>' + |
| 4225 '</children>' + |
| 4226 '</appl>' + |
| 4227 '<number>2</number>' + |
| 4228 '</children>' + |
| 4229 '</infixop>'); |
| 4230 |
| 4231 this.executeTreeTest( |
| 4232 '<mrow><mn>1</mn><mo>+</mo><mi>sin</mi><mi>x</mi><mo>+</mo>' + |
| 4233 '<mn>2</mn></mrow>', |
| 4234 '<infixop>+' + |
| 4235 '<content>' + |
| 4236 '<operator>+</operator>' + |
| 4237 '<operator>+</operator>' + |
| 4238 '</content>' + |
| 4239 '<children>' + |
| 4240 '<number>1</number>' + |
| 4241 '<appl>' + |
| 4242 '<content>' + |
| 4243 '<punctuation>\u2061</punctuation>' + |
| 4244 '</content>' + |
| 4245 '<children>' + |
| 4246 '<function>sin</function>' + |
| 4247 '<identifier>x</identifier>' + |
| 4248 '</children>' + |
| 4249 '</appl>' + |
| 4250 '<number>2</number>' + |
| 4251 '</children>' + |
| 4252 '</infixop>'); |
| 4253 |
| 4254 this.executeTreeTest( |
| 4255 '<mrow><mo>a</mo><mo>+</mo><mi>sin</mi><mi>x</mi></mrow>', |
| 4256 '<infixop>+' + |
| 4257 '<content>' + |
| 4258 '<operator>+</operator>' + |
| 4259 '</content>' + |
| 4260 '<children>' + |
| 4261 '<identifier>a</identifier>' + |
| 4262 '<appl>' + |
| 4263 '<content>' + |
| 4264 '<punctuation>\u2061</punctuation>' + |
| 4265 '</content>' + |
| 4266 '<children>' + |
| 4267 '<function>sin</function>' + |
| 4268 '<identifier>x</identifier>' + |
| 4269 '</children>' + |
| 4270 '</appl>' + |
| 4271 '</children>' + |
| 4272 '</infixop>'); |
| 4273 |
| 4274 this.executeTreeTest( |
| 4275 '<mrow><mi>sin</mi><mi>x</mi><mo>+</mo><mo>b</mo></mrow>', |
| 4276 '<infixop>+' + |
| 4277 '<content>' + |
| 4278 '<operator>+</operator>' + |
| 4279 '</content>' + |
| 4280 '<children>' + |
| 4281 '<appl>' + |
| 4282 '<content>' + |
| 4283 '<punctuation>\u2061</punctuation>' + |
| 4284 '</content>' + |
| 4285 '<children>' + |
| 4286 '<function>sin</function>' + |
| 4287 '<identifier>x</identifier>' + |
| 4288 '</children>' + |
| 4289 '</appl>' + |
| 4290 '<identifier>b</identifier>' + |
| 4291 '</children>' + |
| 4292 '</infixop>'); |
| 4293 |
| 4294 this.executeTreeTest( |
| 4295 '<mrow><mo>a</mo><mo>+</mo><mi>sin</mi><mi>x</mi><mo>+</mo>' + |
| 4296 '<mo>b</mo></mrow>', |
| 4297 '<infixop>+' + |
| 4298 '<content>' + |
| 4299 '<operator>+</operator>' + |
| 4300 '<operator>+</operator>' + |
| 4301 '</content>' + |
| 4302 '<children>' + |
| 4303 '<identifier>a</identifier>' + |
| 4304 '<appl>' + |
| 4305 '<content>' + |
| 4306 '<punctuation>\u2061</punctuation>' + |
| 4307 '</content>' + |
| 4308 '<children>' + |
| 4309 '<function>sin</function>' + |
| 4310 '<identifier>x</identifier>' + |
| 4311 '</children>' + |
| 4312 '</appl>' + |
| 4313 '<identifier>b</identifier>' + |
| 4314 '</children>' + |
| 4315 '</infixop>'); |
| 4316 |
| 4317 this.executeTreeTest( |
| 4318 '<mrow><mo>a</mo><mo>=</mo><mi>sin</mi><mi>x</mi></mrow>', |
| 4319 '<relseq>=' + |
| 4320 '<content>' + |
| 4321 '<relation>=</relation>' + |
| 4322 '</content>' + |
| 4323 '<children>' + |
| 4324 '<identifier>a</identifier>' + |
| 4325 '<appl>' + |
| 4326 '<content>' + |
| 4327 '<punctuation>\u2061</punctuation>' + |
| 4328 '</content>' + |
| 4329 '<children>' + |
| 4330 '<function>sin</function>' + |
| 4331 '<identifier>x</identifier>' + |
| 4332 '</children>' + |
| 4333 '</appl>' + |
| 4334 '</children>' + |
| 4335 '</relseq>'); |
| 4336 |
| 4337 this.executeTreeTest( |
| 4338 '<mrow><mi>sin</mi><mi>x</mi><mo>=</mo><mo>b</mo></mrow>', |
| 4339 '<relseq>=' + |
| 4340 '<content>' + |
| 4341 '<relation>=</relation>' + |
| 4342 '</content>' + |
| 4343 '<children>' + |
| 4344 '<appl>' + |
| 4345 '<content>' + |
| 4346 '<punctuation>\u2061</punctuation>' + |
| 4347 '</content>' + |
| 4348 '<children>' + |
| 4349 '<function>sin</function>' + |
| 4350 '<identifier>x</identifier>' + |
| 4351 '</children>' + |
| 4352 '</appl>' + |
| 4353 '<identifier>b</identifier>' + |
| 4354 '</children>' + |
| 4355 '</relseq>'); |
| 4356 |
| 4357 this.executeTreeTest( |
| 4358 '<mrow><mo>a</mo><mo>=</mo><mi>sin</mi><mi>x</mi><mo>=</mo>' + |
| 4359 '<mo>b</mo></mrow>', |
| 4360 '<relseq>=' + |
| 4361 '<content>' + |
| 4362 '<relation>=</relation>' + |
| 4363 '<relation>=</relation>' + |
| 4364 '</content>' + |
| 4365 '<children>' + |
| 4366 '<identifier>a</identifier>' + |
| 4367 '<appl>' + |
| 4368 '<content>' + |
| 4369 '<punctuation>\u2061</punctuation>' + |
| 4370 '</content>' + |
| 4371 '<children>' + |
| 4372 '<function>sin</function>' + |
| 4373 '<identifier>x</identifier>' + |
| 4374 '</children>' + |
| 4375 '</appl>' + |
| 4376 '<identifier>b</identifier>' + |
| 4377 '</children>' + |
| 4378 '</relseq>'); |
| 4379 }); |
| 4380 |
| 4381 |
| 4382 /** |
| 4383 * Multiple prefix function applications with unfenced arguments. |
| 4384 */ |
| 4385 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsMultiUnfenced', function() { |
| 4386 this.brief = true; |
| 4387 this.executeTreeTest( |
| 4388 '<mrow><mi>sin</mi><mi>x</mi><mo>+</mo><mi>cos</mi><mi>x</mi></mrow>', |
| 4389 '<infixop>+' + |
| 4390 '<content>' + |
| 4391 '<operator>+</operator>' + |
| 4392 '</content>' + |
| 4393 '<children>' + |
| 4394 '<appl>' + |
| 4395 '<content>' + |
| 4396 '<punctuation>\u2061</punctuation>' + |
| 4397 '</content>' + |
| 4398 '<children>' + |
| 4399 '<function>sin</function>' + |
| 4400 '<identifier>x</identifier>' + |
| 4401 '</children>' + |
| 4402 '</appl>' + |
| 4403 '<appl>' + |
| 4404 '<content>' + |
| 4405 '<punctuation>\u2061</punctuation>' + |
| 4406 '</content>' + |
| 4407 '<children>' + |
| 4408 '<function>cos</function>' + |
| 4409 '<identifier>x</identifier>' + |
| 4410 '</children>' + |
| 4411 '</appl>' + |
| 4412 '</children>' + |
| 4413 '</infixop>'); |
| 4414 |
| 4415 this.executeTreeTest( |
| 4416 '<mrow><mi>sin</mi><mi>x</mi><mo>+</mo><mi>cos</mi><mi>x</mi><mo>=</mo>' + |
| 4417 '<mi>tan</mi><mi>x</mi></mrow>', |
| 4418 '<relseq>=' + |
| 4419 '<content>' + |
| 4420 '<relation>=</relation>' + |
| 4421 '</content>' + |
| 4422 '<children>' + |
| 4423 '<infixop>+' + |
| 4424 '<content>' + |
| 4425 '<operator>+</operator>' + |
| 4426 '</content>' + |
| 4427 '<children>' + |
| 4428 '<appl>' + |
| 4429 '<content>' + |
| 4430 '<punctuation>\u2061</punctuation>' + |
| 4431 '</content>' + |
| 4432 '<children>' + |
| 4433 '<function>sin</function>' + |
| 4434 '<identifier>x</identifier>' + |
| 4435 '</children>' + |
| 4436 '</appl>' + |
| 4437 '<appl>' + |
| 4438 '<content>' + |
| 4439 '<punctuation>\u2061</punctuation>' + |
| 4440 '</content>' + |
| 4441 '<children>' + |
| 4442 '<function>cos</function>' + |
| 4443 '<identifier>x</identifier>' + |
| 4444 '</children>' + |
| 4445 '</appl>' + |
| 4446 '</children>' + |
| 4447 '</infixop>' + |
| 4448 '<appl>' + |
| 4449 '<content>' + |
| 4450 '<punctuation>\u2061</punctuation>' + |
| 4451 '</content>' + |
| 4452 '<children>' + |
| 4453 '<function>tan</function>' + |
| 4454 '<identifier>x</identifier>' + |
| 4455 '</children>' + |
| 4456 '</appl>' + |
| 4457 '</children>' + |
| 4458 '</relseq>'); |
| 4459 |
| 4460 this.executeTreeTest( |
| 4461 '<mrow><mi>sin</mi><mi>x</mi><mo>+</mo><mi>cos</mi><mi>y</mi><mo>=</mo>' + |
| 4462 '<mi>tan</mi><mi>x</mi><mi>y</mi></mrow>', |
| 4463 '<relseq>=' + |
| 4464 '<content>' + |
| 4465 '<relation>=</relation>' + |
| 4466 '</content>' + |
| 4467 '<children>' + |
| 4468 '<infixop>+' + |
| 4469 '<content>' + |
| 4470 '<operator>+</operator>' + |
| 4471 '</content>' + |
| 4472 '<children>' + |
| 4473 '<appl>' + |
| 4474 '<content>' + |
| 4475 '<punctuation>\u2061</punctuation>' + |
| 4476 '</content>' + |
| 4477 '<children>' + |
| 4478 '<function>sin</function>' + |
| 4479 '<identifier>x</identifier>' + |
| 4480 '</children>' + |
| 4481 '</appl>' + |
| 4482 '<appl>' + |
| 4483 '<content>' + |
| 4484 '<punctuation>\u2061</punctuation>' + |
| 4485 '</content>' + |
| 4486 '<children>' + |
| 4487 '<function>cos</function>' + |
| 4488 '<identifier>y</identifier>' + |
| 4489 '</children>' + |
| 4490 '</appl>' + |
| 4491 '</children>' + |
| 4492 '</infixop>' + |
| 4493 '<appl>' + |
| 4494 '<content>' + |
| 4495 '<punctuation>\u2061</punctuation>' + |
| 4496 '</content>' + |
| 4497 '<children>' + |
| 4498 '<function>tan</function>' + |
| 4499 '<infixop>\u2062' + |
| 4500 '<content>' + |
| 4501 '<operator>\u2062</operator>' + |
| 4502 '</content>' + |
| 4503 '<children>' + |
| 4504 '<identifier>x</identifier>' + |
| 4505 '<identifier>y</identifier>' + |
| 4506 '</children>' + |
| 4507 '</infixop>' + |
| 4508 '</children>' + |
| 4509 '</appl>' + |
| 4510 '</children>' + |
| 4511 '</relseq>'); |
| 4512 }); |
| 4513 |
| 4514 |
| 4515 /** |
| 4516 * Prefix function applications with sub- and superscripts and unfenced |
| 4517 * arguments. |
| 4518 */ |
| 4519 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsScriptUnfenced', |
| 4520 function() { |
| 4521 this.brief = true; |
| 4522 this.executeTreeTest( |
| 4523 '<mrow><msup><mi>sin</mi><mn>2</mn></msup><mi>x</mi></mrow>', |
| 4524 '<appl>' + |
| 4525 '<content>' + |
| 4526 '<punctuation>\u2061</punctuation>' + |
| 4527 '</content>' + |
| 4528 '<children>' + |
| 4529 '<superscript>' + |
| 4530 '<children>' + |
| 4531 '<function>sin</function>' + |
| 4532 '<number>2</number>' + |
| 4533 '</children>' + |
| 4534 '</superscript>' + |
| 4535 '<identifier>x</identifier>' + |
| 4536 '</children>' + |
| 4537 '</appl>'); |
| 4538 |
| 4539 this.executeTreeTest( |
| 4540 '<mrow><msub><mi>sin</mi><mn>1</mn></msub><mi>x</mi></mrow>', |
| 4541 '<appl>' + |
| 4542 '<content>' + |
| 4543 '<punctuation>\u2061</punctuation>' + |
| 4544 '</content>' + |
| 4545 '<children>' + |
| 4546 '<subscript>' + |
| 4547 '<children>' + |
| 4548 '<function>sin</function>' + |
| 4549 '<number>1</number>' + |
| 4550 '</children>' + |
| 4551 '</subscript>' + |
| 4552 '<identifier>x</identifier>' + |
| 4553 '</children>' + |
| 4554 '</appl>'); |
| 4555 |
| 4556 this.executeTreeTest( |
| 4557 '<mrow><msubsup><mi>sin</mi><mn>2</mn><mn>1</mn></msubsup>' + |
| 4558 '<mi>x</mi></mrow>', |
| 4559 '<appl>' + |
| 4560 '<content>' + |
| 4561 '<punctuation>\u2061</punctuation>' + |
| 4562 '</content>' + |
| 4563 '<children>' + |
| 4564 '<superscript>' + |
| 4565 '<children>' + |
| 4566 '<subscript>' + |
| 4567 '<children>' + |
| 4568 '<function>sin</function>' + |
| 4569 '<number>2</number>' + |
| 4570 '</children>' + |
| 4571 '</subscript>' + |
| 4572 '<number>1</number>' + |
| 4573 '</children>' + |
| 4574 '</superscript>' + |
| 4575 '<identifier>x</identifier>' + |
| 4576 '</children>' + |
| 4577 '</appl>'); |
| 4578 |
| 4579 this.executeTreeTest( |
| 4580 '<mrow><msup><mi>sin</mi><mn>2</mn></msup><mi>x</mi><mo>+</mo><msup>' + |
| 4581 '<mi>cos</mi><mn>2</mn></msup><mi>y</mi><mo>=</mo><mn>1</mn></mrow>', |
| 4582 '<relseq>=' + |
| 4583 '<content>' + |
| 4584 '<relation>=</relation>' + |
| 4585 '</content>' + |
| 4586 '<children>' + |
| 4587 '<infixop>+' + |
| 4588 '<content>' + |
| 4589 '<operator>+</operator>' + |
| 4590 '</content>' + |
| 4591 '<children>' + |
| 4592 '<appl>' + |
| 4593 '<content>' + |
| 4594 '<punctuation>\u2061</punctuation>' + |
| 4595 '</content>' + |
| 4596 '<children>' + |
| 4597 '<superscript>' + |
| 4598 '<children>' + |
| 4599 '<function>sin</function>' + |
| 4600 '<number>2</number>' + |
| 4601 '</children>' + |
| 4602 '</superscript>' + |
| 4603 '<identifier>x</identifier>' + |
| 4604 '</children>' + |
| 4605 '</appl>' + |
| 4606 '<appl>' + |
| 4607 '<content>' + |
| 4608 '<punctuation>\u2061</punctuation>' + |
| 4609 '</content>' + |
| 4610 '<children>' + |
| 4611 '<superscript>' + |
| 4612 '<children>' + |
| 4613 '<function>cos</function>' + |
| 4614 '<number>2</number>' + |
| 4615 '</children>' + |
| 4616 '</superscript>' + |
| 4617 '<identifier>y</identifier>' + |
| 4618 '</children>' + |
| 4619 '</appl>' + |
| 4620 '</children>' + |
| 4621 '</infixop>' + |
| 4622 '<number>1</number>' + |
| 4623 '</children>' + |
| 4624 '</relseq>'); |
| 4625 this.executeTreeTest( |
| 4626 '<mrow><msubsup><msubsup><mi>sin</mi><mn>2</mn><mn>1</mn>' + |
| 4627 '</msubsup><mi>n</mi><mi>m</mi></msubsup><mi>x</mi></mrow>', |
| 4628 '<appl>' + |
| 4629 '<content>' + |
| 4630 '<punctuation>\u2061</punctuation>' + |
| 4631 '</content>' + |
| 4632 '<children>' + |
| 4633 '<superscript>' + |
| 4634 '<children>' + |
| 4635 '<subscript>' + |
| 4636 '<children>' + |
| 4637 '<superscript>' + |
| 4638 '<children>' + |
| 4639 '<subscript>' + |
| 4640 '<children>' + |
| 4641 '<function>sin</function>' + |
| 4642 '<number>2</number>' + |
| 4643 '</children>' + |
| 4644 '</subscript>' + |
| 4645 '<number>1</number>' + |
| 4646 '</children>' + |
| 4647 '</superscript>' + |
| 4648 '<identifier>n</identifier>' + |
| 4649 '</children>' + |
| 4650 '</subscript>' + |
| 4651 '<identifier>m</identifier>' + |
| 4652 '</children>' + |
| 4653 '</superscript>' + |
| 4654 '<identifier>x</identifier>' + |
| 4655 '</children>' + |
| 4656 '</appl>'); |
| 4657 }); |
| 4658 |
| 4659 |
| 4660 /** |
| 4661 * Prefix functions without arguments. |
| 4662 */ |
| 4663 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsNoArgs', function() { |
| 4664 this.brief = true; |
| 4665 this.executeTreeTest( |
| 4666 '<mi>sin</mi>', |
| 4667 '<function>sin</function>'); |
| 4668 |
| 4669 this.executeTreeTest( |
| 4670 '<msup><mi>sin</mi><mn>2</mn></msup>', |
| 4671 '<superscript>' + |
| 4672 '<children>' + |
| 4673 '<function>sin</function>' + |
| 4674 '<number>2</number>' + |
| 4675 '</children>' + |
| 4676 '</superscript>'); |
| 4677 |
| 4678 this.executeTreeTest( |
| 4679 '<msup><mi>sin</mi><mn>2</mn></msup><mo>+</mo><msup><mi>cos</mi>' + |
| 4680 '<mn>2</mn></msup>', |
| 4681 '<infixop>+' + |
| 4682 '<content>' + |
| 4683 '<operator>+</operator>' + |
| 4684 '</content>' + |
| 4685 '<children>' + |
| 4686 '<appl>' + |
| 4687 '<content>' + |
| 4688 '<punctuation>\u2061</punctuation>' + |
| 4689 '</content>' + |
| 4690 '<children>' + |
| 4691 '<superscript>' + |
| 4692 '<children>' + |
| 4693 '<function>sin</function>' + |
| 4694 '<number>2</number>' + |
| 4695 '</children>' + |
| 4696 '</superscript>' + |
| 4697 '<empty/>' + |
| 4698 '</children>' + |
| 4699 '</appl>' + |
| 4700 '<appl>' + |
| 4701 '<content>' + |
| 4702 '<punctuation>\u2061</punctuation>' + |
| 4703 '</content>' + |
| 4704 '<children>' + |
| 4705 '<superscript>' + |
| 4706 '<children>' + |
| 4707 '<function>cos</function>' + |
| 4708 '<number>2</number>' + |
| 4709 '</children>' + |
| 4710 '</superscript>' + |
| 4711 '<empty/>' + |
| 4712 '</children>' + |
| 4713 '</appl>' + |
| 4714 '</children>' + |
| 4715 '</infixop>'); |
| 4716 |
| 4717 this.executeTreeTest( |
| 4718 '<mrow><msup><mi>sin</mi><mn>2</mn></msup><mo>+</mo>' + |
| 4719 '<msup><mi>cos</mi><mn>2</mn></msup><mo>=</mo><mn>1</mn></mrow>', |
| 4720 '<relseq>=' + |
| 4721 '<content>' + |
| 4722 '<relation>=</relation>' + |
| 4723 '</content>' + |
| 4724 '<children>' + |
| 4725 '<infixop>+' + |
| 4726 '<content>' + |
| 4727 '<operator>+</operator>' + |
| 4728 '</content>' + |
| 4729 '<children>' + |
| 4730 '<appl>' + |
| 4731 '<content>' + |
| 4732 '<punctuation>\u2061</punctuation>' + |
| 4733 '</content>' + |
| 4734 '<children>' + |
| 4735 '<superscript>' + |
| 4736 '<children>' + |
| 4737 '<function>sin</function>' + |
| 4738 '<number>2</number>' + |
| 4739 '</children>' + |
| 4740 '</superscript>' + |
| 4741 '<empty/>' + |
| 4742 '</children>' + |
| 4743 '</appl>' + |
| 4744 '<appl>' + |
| 4745 '<content>' + |
| 4746 '<punctuation>\u2061</punctuation>' + |
| 4747 '</content>' + |
| 4748 '<children>' + |
| 4749 '<superscript>' + |
| 4750 '<children>' + |
| 4751 '<function>cos</function>' + |
| 4752 '<number>2</number>' + |
| 4753 '</children>' + |
| 4754 '</superscript>' + |
| 4755 '<empty/>' + |
| 4756 '</children>' + |
| 4757 '</appl>' + |
| 4758 '</children>' + |
| 4759 '</infixop>' + |
| 4760 '<number>1</number>' + |
| 4761 '</children>' + |
| 4762 '</relseq>'); |
| 4763 |
| 4764 this.executeTreeTest( |
| 4765 '<mrow><mi>sin</mi><mo>=</mo><mfrac><mn>1</mn>' + |
| 4766 '<mi>csc</mi></mfrac></mrow>', |
| 4767 '<relseq>=' + |
| 4768 '<content>' + |
| 4769 '<relation>=</relation>' + |
| 4770 '</content>' + |
| 4771 '<children>' + |
| 4772 '<appl>' + |
| 4773 '<content>' + |
| 4774 '<punctuation>\u2061</punctuation>' + |
| 4775 '</content>' + |
| 4776 '<children>' + |
| 4777 '<function>sin</function>' + |
| 4778 '<empty/>' + |
| 4779 '</children>' + |
| 4780 '</appl>' + |
| 4781 '<fraction>' + |
| 4782 '<children>' + |
| 4783 '<number>1</number>' + |
| 4784 '<function>csc</function>' + |
| 4785 '</children>' + |
| 4786 '</fraction>' + |
| 4787 '</children>' + |
| 4788 '</relseq>'); |
| 4789 }); |
| 4790 |
| 4791 |
| 4792 /** |
| 4793 * Nested prefix function applications, both with and without fenced arguments. |
| 4794 */ |
| 4795 TEST_F('CvoxSemanticTreeUnitTest', 'StreePrefixFuncsNested', function() { |
| 4796 this.brief = true; |
| 4797 this.executeTreeTest( |
| 4798 '<mrow><mi>log</mi><mi>cos</mi><mi>x</mi></mrow>', |
| 4799 '<appl>' + |
| 4800 '<content>' + |
| 4801 '<punctuation>\u2061</punctuation>' + |
| 4802 '</content>' + |
| 4803 '<children>' + |
| 4804 '<function>log</function>' + |
| 4805 '<appl>' + |
| 4806 '<content>' + |
| 4807 '<punctuation>\u2061</punctuation>' + |
| 4808 '</content>' + |
| 4809 '<children>' + |
| 4810 '<function>cos</function>' + |
| 4811 '<identifier>x</identifier>' + |
| 4812 '</children>' + |
| 4813 '</appl>' + |
| 4814 '</children>' + |
| 4815 '</appl>'); |
| 4816 |
| 4817 this.executeTreeTest( |
| 4818 '<mrow><mi>ln</mi><mo>(</mo><mi>sin</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>)<
/mo></mrow>', |
| 4819 '<appl>' + |
| 4820 '<content>' + |
| 4821 '<punctuation>\u2061</punctuation>' + |
| 4822 '</content>' + |
| 4823 '<children>' + |
| 4824 '<function>ln</function>' + |
| 4825 '<fenced>' + |
| 4826 '<content>' + |
| 4827 '<fence>(</fence>' + |
| 4828 '<fence>)</fence>' + |
| 4829 '</content>' + |
| 4830 '<children>' + |
| 4831 '<appl>' + |
| 4832 '<content>' + |
| 4833 '<punctuation>\u2061</punctuation>' + |
| 4834 '</content>' + |
| 4835 '<children>' + |
| 4836 '<function>sin</function>' + |
| 4837 '<fenced>' + |
| 4838 '<content>' + |
| 4839 '<fence>(</fence>' + |
| 4840 '<fence>)</fence>' + |
| 4841 '</content>' + |
| 4842 '<children>' + |
| 4843 '<identifier>x</identifier>' + |
| 4844 '</children>' + |
| 4845 '</fenced>' + |
| 4846 '</children>' + |
| 4847 '</appl>' + |
| 4848 '</children>' + |
| 4849 '</fenced>' + |
| 4850 '</children>' + |
| 4851 '</appl>'); |
| 4852 |
| 4853 this.executeTreeTest( |
| 4854 '<mrow><mi>log</mi><mi>cos</mi><mi>x</mi><mo>=</mo><mi>ln</mi><mo>(</mo><mi>
sin</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>)</mo></mrow>', |
| 4855 '<relseq>=' + |
| 4856 '<content>' + |
| 4857 '<relation>=</relation>' + |
| 4858 '</content>' + |
| 4859 '<children>' + |
| 4860 '<appl>' + |
| 4861 '<content>' + |
| 4862 '<punctuation>\u2061</punctuation>' + |
| 4863 '</content>' + |
| 4864 '<children>' + |
| 4865 '<function>log</function>' + |
| 4866 '<appl>' + |
| 4867 '<content>' + |
| 4868 '<punctuation>\u2061</punctuation>' + |
| 4869 '</content>' + |
| 4870 '<children>' + |
| 4871 '<function>cos</function>' + |
| 4872 '<identifier>x</identifier>' + |
| 4873 '</children>' + |
| 4874 '</appl>' + |
| 4875 '</children>' + |
| 4876 '</appl>' + |
| 4877 '<appl>' + |
| 4878 '<content>' + |
| 4879 '<punctuation>\u2061</punctuation>' + |
| 4880 '</content>' + |
| 4881 '<children>' + |
| 4882 '<function>ln</function>' + |
| 4883 '<fenced>' + |
| 4884 '<content>' + |
| 4885 '<fence>(</fence>' + |
| 4886 '<fence>)</fence>' + |
| 4887 '</content>' + |
| 4888 '<children>' + |
| 4889 '<appl>' + |
| 4890 '<content>' + |
| 4891 '<punctuation>\u2061</punctuation>' + |
| 4892 '</content>' + |
| 4893 '<children>' + |
| 4894 '<function>sin</function>' + |
| 4895 '<fenced>' + |
| 4896 '<content>' + |
| 4897 '<fence>(</fence>' + |
| 4898 '<fence>)</fence>' + |
| 4899 '</content>' + |
| 4900 '<children>' + |
| 4901 '<identifier>x</identifier>' + |
| 4902 '</children>' + |
| 4903 '</fenced>' + |
| 4904 '</children>' + |
| 4905 '</appl>' + |
| 4906 '</children>' + |
| 4907 '</fenced>' + |
| 4908 '</children>' + |
| 4909 '</appl>' + |
| 4910 '</children>' + |
| 4911 '</relseq>'); |
| 4912 }); |
| 4913 |
| 4914 |
| 4915 /** |
| 4916 * Variations of tables representing matrices, vectors, case statements, |
| 4917 * multiline equations and regular tables. |
| 4918 */ |
| 4919 TEST_F('CvoxSemanticTreeUnitTest', 'StreeTables', function() { |
| 4920 this.brief = false; |
| 4921 this.executeTreeTest( |
| 4922 '<mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">A</mi>' + |
| 4923 '<mo>=</mo><mo>[</mo><mtable rowspacing="4pt" columnspacing="1em">' + |
| 4924 '<mtr><mtd><mn>0</mn></mtd><mtd><mn>1</mn></mtd></mtr><mtr><mtd>' + |
| 4925 '<mn>2</mn></mtd><mtd><mn>3</mn></mtd></mtr></mtable><mo>]</mo>' + |
| 4926 '</mrow>', |
| 4927 '<relseq role="equality" id="16">=' + |
| 4928 '<content>' + |
| 4929 '<relation role="equality" id="1">=</relation>' + |
| 4930 '</content>' + |
| 4931 '<children>' + |
| 4932 '<identifier role="latinletter" font="bold" id="0">A</identifier>' + |
| 4933 '<matrix role="unknown" id="13">' + |
| 4934 '<content>' + |
| 4935 '<fence role="open" id="2">[</fence>' + |
| 4936 '<fence role="close" id="14">]</fence>' + |
| 4937 '</content>' + |
| 4938 '<children>' + |
| 4939 '<row role="matrix" id="7">' + |
| 4940 '<children>' + |
| 4941 '<cell role="matrix" id="4">' + |
| 4942 '<children>' + |
| 4943 '<number role="integer" font="normal" id="3">0</number>' + |
| 4944 '</children>' + |
| 4945 '</cell>' + |
| 4946 '<cell role="matrix" id="6">' + |
| 4947 '<children>' + |
| 4948 '<number role="integer" font="normal" id="5">1</number>' + |
| 4949 '</children>' + |
| 4950 '</cell>' + |
| 4951 '</children>' + |
| 4952 '</row>' + |
| 4953 '<row role="matrix" id="12">' + |
| 4954 '<children>' + |
| 4955 '<cell role="matrix" id="9">' + |
| 4956 '<children>' + |
| 4957 '<number role="integer" font="normal" id="8">2</number>' + |
| 4958 '</children>' + |
| 4959 '</cell>' + |
| 4960 '<cell role="matrix" id="11">' + |
| 4961 '<children>' + |
| 4962 '<number role="integer" font="normal" id="10">3</number>' + |
| 4963 '</children>' + |
| 4964 '</cell>' + |
| 4965 '</children>' + |
| 4966 '</row>' + |
| 4967 '</children>' + |
| 4968 '</matrix>' + |
| 4969 '</children>' + |
| 4970 '</relseq>'); |
| 4971 |
| 4972 this.executeTreeTest( |
| 4973 '<mo>[</mo><mtable rowspacing="4pt" columnspacing="1em"><mtr>' + |
| 4974 '<mtd><mn>0</mn></mtd><mtd><mn>1</mn></mtd></mtr><mtr><mtd>' + |
| 4975 '<mn>2</mn></mtd><mtd><mn>3</mn></mtd></mtr></mtable>' + |
| 4976 '<mo>]</mo>', |
| 4977 '<matrix role="unknown" id="11">' + |
| 4978 '<content>' + |
| 4979 '<fence role="open" id="0">[</fence>' + |
| 4980 '<fence role="close" id="12">]</fence>' + |
| 4981 '</content>' + |
| 4982 '<children>' + |
| 4983 '<row role="matrix" id="5">' + |
| 4984 '<children>' + |
| 4985 '<cell role="matrix" id="2">' + |
| 4986 '<children>' + |
| 4987 '<number role="integer" font="normal" id="1">0</number>' + |
| 4988 '</children>' + |
| 4989 '</cell>' + |
| 4990 '<cell role="matrix" id="4">' + |
| 4991 '<children>' + |
| 4992 '<number role="integer" font="normal" id="3">1</number>' + |
| 4993 '</children>' + |
| 4994 '</cell>' + |
| 4995 '</children>' + |
| 4996 '</row>' + |
| 4997 '<row role="matrix" id="10">' + |
| 4998 '<children>' + |
| 4999 '<cell role="matrix" id="7">' + |
| 5000 '<children>' + |
| 5001 '<number role="integer" font="normal" id="6">2</number>' + |
| 5002 '</children>' + |
| 5003 '</cell>' + |
| 5004 '<cell role="matrix" id="9">' + |
| 5005 '<children>' + |
| 5006 '<number role="integer" font="normal" id="8">3</number>' + |
| 5007 '</children>' + |
| 5008 '</cell>' + |
| 5009 '</children>' + |
| 5010 '</row>' + |
| 5011 '</children>' + |
| 5012 '</matrix>'); |
| 5013 |
| 5014 this.executeTreeTest( |
| 5015 '<mrow class="MJX-TeXAtom-ORD"><mi mathvariant="bold">V</mi>' + |
| 5016 '<mo>=</mo><mo>[</mo><mtable rowspacing="4pt" columnspacing="1em">' + |
| 5017 '<mtr><mtd><mn>1</mn></mtd></mtr><mtr><mtd><mn>2</mn></mtd></mtr>' + |
| 5018 '<mtr><mtd><mn>3</mn></mtd></mtr></mtable><mo>]</mo></mrow>', |
| 5019 '<relseq role="equality" id="15">=' + |
| 5020 '<content>' + |
| 5021 '<relation role="equality" id="1">=</relation>' + |
| 5022 '</content>' + |
| 5023 '<children>' + |
| 5024 '<identifier role="latinletter" font="bold" id="0">V</identifier>' + |
| 5025 '<vector role="unknown" id="12">' + |
| 5026 '<content>' + |
| 5027 '<fence role="open" id="2">[</fence>' + |
| 5028 '<fence role="close" id="13">]</fence>' + |
| 5029 '</content>' + |
| 5030 '<children>' + |
| 5031 '<line role="vector" id="5">' + |
| 5032 '<children>' + |
| 5033 '<number role="integer" font="normal" id="3">1</number>' + |
| 5034 '</children>' + |
| 5035 '</line>' + |
| 5036 '<line role="vector" id="8">' + |
| 5037 '<children>' + |
| 5038 '<number role="integer" font="normal" id="6">2</number>' + |
| 5039 '</children>' + |
| 5040 '</line>' + |
| 5041 '<line role="vector" id="11">' + |
| 5042 '<children>' + |
| 5043 '<number role="integer" font="normal" id="9">3</number>' + |
| 5044 '</children>' + |
| 5045 '</line>' + |
| 5046 '</children>' + |
| 5047 '</vector>' + |
| 5048 '</children>' + |
| 5049 '</relseq>'); |
| 5050 |
| 5051 this.executeTreeTest( |
| 5052 '<mo>[</mo><mtable rowspacing="4pt" columnspacing="1em">' + |
| 5053 '<mtr><mtd><mn>1</mn></mtd></mtr><mtr><mtd><mn>2</mn></mtd></mtr>' + |
| 5054 '<mtr><mtd><mn>3</mn></mtd></mtr></mtable><mo>]</mo>', |
| 5055 '<vector role="unknown" id="10">' + |
| 5056 '<content>' + |
| 5057 '<fence role="open" id="0">[</fence>' + |
| 5058 '<fence role="close" id="11">]</fence>' + |
| 5059 '</content>' + |
| 5060 '<children>' + |
| 5061 '<line role="vector" id="3">' + |
| 5062 '<children>' + |
| 5063 '<number role="integer" font="normal" id="1">1</number>' + |
| 5064 '</children>' + |
| 5065 '</line>' + |
| 5066 '<line role="vector" id="6">' + |
| 5067 '<children>' + |
| 5068 '<number role="integer" font="normal" id="4">2</number>' + |
| 5069 '</children>' + |
| 5070 '</line>' + |
| 5071 '<line role="vector" id="9">' + |
| 5072 '<children>' + |
| 5073 '<number role="integer" font="normal" id="7">3</number>' + |
| 5074 '</children>' + |
| 5075 '</line>' + |
| 5076 '</children>' + |
| 5077 '</vector>'); |
| 5078 |
| 5079 |
| 5080 this.executeTreeTest( |
| 5081 '<mrow><mo>{</mo><mtable><mtr><mtd><mi>a</mi></mtd><mtd>' + |
| 5082 '<mtext>often</mtext></mtd></mtr><mtr><mtd><mi>b</mi></mtd>' + |
| 5083 '<mtd><mtext>sometimes</mtext></mtd></mtr></mtable></mrow>', |
| 5084 '<cases role="unknown" id="11">' + |
| 5085 '<content>' + |
| 5086 '<punctuation role="openfence" id="0">{</punctuation>' + |
| 5087 '</content>' + |
| 5088 '<children>' + |
| 5089 '<row role="cases" id="5">' + |
| 5090 '<children>' + |
| 5091 '<cell role="cases" id="2">' + |
| 5092 '<children>' + |
| 5093 '<identifier role="latinletter" font="normal" id="1">a</identifier>' + |
| 5094 '</children>' + |
| 5095 '</cell>' + |
| 5096 '<cell role="cases" id="4">' + |
| 5097 '<children>' + |
| 5098 '<text role="unknown" id="3">often</text>' + |
| 5099 '</children>' + |
| 5100 '</cell>' + |
| 5101 '</children>' + |
| 5102 '</row>' + |
| 5103 '<row role="cases" id="10">' + |
| 5104 '<children>' + |
| 5105 '<cell role="cases" id="7">' + |
| 5106 '<children>' + |
| 5107 '<identifier role="latinletter" font="normal" id="6">b</identifier>' + |
| 5108 '</children>' + |
| 5109 '</cell>' + |
| 5110 '<cell role="cases" id="9">' + |
| 5111 '<children>' + |
| 5112 '<text role="unknown" id="8">sometimes</text>' + |
| 5113 '</children>' + |
| 5114 '</cell>' + |
| 5115 '</children>' + |
| 5116 '</row>' + |
| 5117 '</children>' + |
| 5118 '</cases>'); |
| 5119 |
| 5120 this.executeTreeTest( |
| 5121 '<mrow><mi mathvariant="bold">A</mi><mo>=</mo><mo>{</mo><mtable>' + |
| 5122 '<mtr><mtd><mi>a</mi></mtd><mtd><mtext>often</mtext></mtd></mtr>' + |
| 5123 '<mtr><mtd><mi>b</mi></mtd><mtd><mtext>sometimes</mtext></mtd></mtr>' + |
| 5124 '</mtable></mrow>', |
| 5125 '<relseq role="equality" id="14">=' + |
| 5126 '<content>' + |
| 5127 '<relation role="equality" id="1">=</relation>' + |
| 5128 '</content>' + |
| 5129 '<children>' + |
| 5130 '<identifier role="latinletter" font="bold" id="0">A</identifier>' + |
| 5131 '<cases role="unknown" id="13">' + |
| 5132 '<content>' + |
| 5133 '<punctuation role="openfence" id="2">{</punctuation>' + |
| 5134 '</content>' + |
| 5135 '<children>' + |
| 5136 '<row role="cases" id="7">' + |
| 5137 '<children>' + |
| 5138 '<cell role="cases" id="4">' + |
| 5139 '<children>' + |
| 5140 '<identifier role="latinletter" font="normal" id="3">a</identifier>' + |
| 5141 '</children>' + |
| 5142 '</cell>' + |
| 5143 '<cell role="cases" id="6">' + |
| 5144 '<children>' + |
| 5145 '<text role="unknown" id="5">often</text>' + |
| 5146 '</children>' + |
| 5147 '</cell>' + |
| 5148 '</children>' + |
| 5149 '</row>' + |
| 5150 '<row role="cases" id="12">' + |
| 5151 '<children>' + |
| 5152 '<cell role="cases" id="9">' + |
| 5153 '<children>' + |
| 5154 '<identifier role="latinletter" font="normal" id="8">b</identifier>' + |
| 5155 '</children>' + |
| 5156 '</cell>' + |
| 5157 '<cell role="cases" id="11">' + |
| 5158 '<children>' + |
| 5159 '<text role="unknown" id="10">sometimes</text>' + |
| 5160 '</children>' + |
| 5161 '</cell>' + |
| 5162 '</children>' + |
| 5163 '</row>' + |
| 5164 '</children>' + |
| 5165 '</cases>' + |
| 5166 '</children>' + |
| 5167 '</relseq>'); |
| 5168 |
| 5169 this.executeTreeTest( |
| 5170 '<mrow><mo>{</mo><mtable><mtr><mtd><mi>a</mi></mtd><mtd>' + |
| 5171 '<mtext>often</mtext></mtd></mtr><mtr><mtd><mi>b</mi></mtd><mtd>' + |
| 5172 '<mtext>sometimes</mtext></mtd></mtr></mtable><mo>.</mo></mrow>', |
| 5173 '<punctuated role="endpunct" id="13">' + |
| 5174 '<content>' + |
| 5175 '<punctuation role="fullstop" id="12">.</punctuation>' + |
| 5176 '</content>' + |
| 5177 '<children>' + |
| 5178 '<cases role="unknown" id="11">' + |
| 5179 '<content>' + |
| 5180 '<punctuation role="openfence" id="0">{</punctuation>' + |
| 5181 '</content>' + |
| 5182 '<children>' + |
| 5183 '<row role="cases" id="5">' + |
| 5184 '<children>' + |
| 5185 '<cell role="cases" id="2">' + |
| 5186 '<children>' + |
| 5187 '<identifier role="latinletter" font="normal" id="1">a</identifier>' + |
| 5188 '</children>' + |
| 5189 '</cell>' + |
| 5190 '<cell role="cases" id="4">' + |
| 5191 '<children>' + |
| 5192 '<text role="unknown" id="3">often</text>' + |
| 5193 '</children>' + |
| 5194 '</cell>' + |
| 5195 '</children>' + |
| 5196 '</row>' + |
| 5197 '<row role="cases" id="10">' + |
| 5198 '<children>' + |
| 5199 '<cell role="cases" id="7">' + |
| 5200 '<children>' + |
| 5201 '<identifier role="latinletter" font="normal" id="6">b</identifier>' + |
| 5202 '</children>' + |
| 5203 '</cell>' + |
| 5204 '<cell role="cases" id="9">' + |
| 5205 '<children>' + |
| 5206 '<text role="unknown" id="8">sometimes</text>' + |
| 5207 '</children>' + |
| 5208 '</cell>' + |
| 5209 '</children>' + |
| 5210 '</row>' + |
| 5211 '</children>' + |
| 5212 '</cases>' + |
| 5213 '<punctuation role="fullstop" id="12">.</punctuation>' + |
| 5214 '</children>' + |
| 5215 '</punctuated>'); |
| 5216 |
| 5217 this.executeTreeTest( |
| 5218 '<mrow><mo>{</mo><mtable><mtr><mtd><mi>a</mi></mtd>' + |
| 5219 '<mtd><mtext>often</mtext></mtd></mtr><mtr><mtd><mi>b</mi></mtd>' + |
| 5220 '<mtd><mtext>sometimes</mtext></mtd></mtr></mtable>' + |
| 5221 '<mo>,</mo><mi>b</mi><mo>,</mo><mi>c</mi><mo>.</mo></mrow>', |
| 5222 '<punctuated role="sequence" id="17">' + |
| 5223 '<content>' + |
| 5224 '<punctuation role="unknown" id="12">,</punctuation>' + |
| 5225 '<punctuation role="unknown" id="14">,</punctuation>' + |
| 5226 '<punctuation role="fullstop" id="16">.</punctuation>' + |
| 5227 '</content>' + |
| 5228 '<children>' + |
| 5229 '<cases role="unknown" id="11">' + |
| 5230 '<content>' + |
| 5231 '<punctuation role="openfence" id="0">{</punctuation>' + |
| 5232 '</content>' + |
| 5233 '<children>' + |
| 5234 '<row role="cases" id="5">' + |
| 5235 '<children>' + |
| 5236 '<cell role="cases" id="2">' + |
| 5237 '<children>' + |
| 5238 '<identifier role="latinletter" font="normal" id="1">a</identifier>' + |
| 5239 '</children>' + |
| 5240 '</cell>' + |
| 5241 '<cell role="cases" id="4">' + |
| 5242 '<children>' + |
| 5243 '<text role="unknown" id="3">often</text>' + |
| 5244 '</children>' + |
| 5245 '</cell>' + |
| 5246 '</children>' + |
| 5247 '</row>' + |
| 5248 '<row role="cases" id="10">' + |
| 5249 '<children>' + |
| 5250 '<cell role="cases" id="7">' + |
| 5251 '<children>' + |
| 5252 '<identifier role="latinletter" font="normal" id="6">b</identifier>' + |
| 5253 '</children>' + |
| 5254 '</cell>' + |
| 5255 '<cell role="cases" id="9">' + |
| 5256 '<children>' + |
| 5257 '<text role="unknown" id="8">sometimes</text>' + |
| 5258 '</children>' + |
| 5259 '</cell>' + |
| 5260 '</children>' + |
| 5261 '</row>' + |
| 5262 '</children>' + |
| 5263 '</cases>' + |
| 5264 '<punctuation role="unknown" id="12">,</punctuation>' + |
| 5265 '<identifier role="latinletter" font="normal" id="13">b</identifier>' + |
| 5266 '<punctuation role="unknown" id="14">,</punctuation>' + |
| 5267 '<identifier role="latinletter" font="normal" id="15">c</identifier>' + |
| 5268 '<punctuation role="fullstop" id="16">.</punctuation>' + |
| 5269 '</children>' + |
| 5270 '</punctuated>'); |
| 5271 |
| 5272 this.executeTreeTest( |
| 5273 '<mrow><mo>{</mo><mtable><mtr><mtd><mi>a</mi><mo>,</mo>' + |
| 5274 '<mtext>often</mtext></mtd></mtr><mtr><mtd><mi>b</mi><mo>,</mo>' + |
| 5275 '<mtext>sometimes</mtext></mtd></mtr></mtable><mo>,</mo><mi>b</mi>' + |
| 5276 '<mo>,</mo><mi>c</mi><mo>.</mo></mrow>', |
| 5277 '<punctuated role="sequence" id="19">' + |
| 5278 '<content>' + |
| 5279 '<punctuation role="unknown" id="14">,</punctuation>' + |
| 5280 '<punctuation role="unknown" id="16">,</punctuation>' + |
| 5281 '<punctuation role="fullstop" id="18">.</punctuation>' + |
| 5282 '</content>' + |
| 5283 '<children>' + |
| 5284 '<cases role="unknown" id="13">' + |
| 5285 '<content>' + |
| 5286 '<punctuation role="openfence" id="0">{</punctuation>' + |
| 5287 '</content>' + |
| 5288 '<children>' + |
| 5289 '<line role="cases" id="6">' + |
| 5290 '<children>' + |
| 5291 '<punctuated role="sequence" id="4">' + |
| 5292 '<content>' + |
| 5293 '<punctuation role="unknown" id="2">,</punctuation>' + |
| 5294 '</content>' + |
| 5295 '<children>' + |
| 5296 '<identifier role="latinletter" font="normal" id="1">a</identifier>' + |
| 5297 '<punctuation role="unknown" id="2">,</punctuation>' + |
| 5298 '<text role="unknown" id="3">often</text>' + |
| 5299 '</children>' + |
| 5300 '</punctuated>' + |
| 5301 '</children>' + |
| 5302 '</line>' + |
| 5303 '<line role="cases" id="12">' + |
| 5304 '<children>' + |
| 5305 '<punctuated role="sequence" id="10">' + |
| 5306 '<content>' + |
| 5307 '<punctuation role="unknown" id="8">,</punctuation>' + |
| 5308 '</content>' + |
| 5309 '<children>' + |
| 5310 '<identifier role="latinletter" font="normal" id="7">b</identifier>' + |
| 5311 '<punctuation role="unknown" id="8">,</punctuation>' + |
| 5312 '<text role="unknown" id="9">sometimes</text>' + |
| 5313 '</children>' + |
| 5314 '</punctuated>' + |
| 5315 '</children>' + |
| 5316 '</line>' + |
| 5317 '</children>' + |
| 5318 '</cases>' + |
| 5319 '<punctuation role="unknown" id="14">,</punctuation>' + |
| 5320 '<identifier role="latinletter" font="normal" id="15">b</identifier>' + |
| 5321 '<punctuation role="unknown" id="16">,</punctuation>' + |
| 5322 '<identifier role="latinletter" font="normal" id="17">c</identifier>' + |
| 5323 '<punctuation role="fullstop" id="18">.</punctuation>' + |
| 5324 '</children>' + |
| 5325 '</punctuated>'); |
| 5326 |
| 5327 this.executeTreeTest( |
| 5328 '<mtable><mtr><mtd><mi>x</mi><maligngroup/><mo>=</mo><mn>4</mn>' + |
| 5329 '</mtd></mtr><mtr><mtd><mi>y</mi><maligngroup/><mo>=</mo><mn>2</mn>' + |
| 5330 '</mtd></mtr><mtr><mtd><mi>x</mi><mi>y</mi><maligngroup/><mo>=</mo>' + |
| 5331 '<mn>6</mn></mtd></mtr></mtable>', |
| 5332 '<multiline role="unknown" id="21">' + |
| 5333 '<children>' + |
| 5334 '<line role="multiline" id="5">' + |
| 5335 '<children>' + |
| 5336 '<relseq role="equality" id="3">=' + |
| 5337 '<content>' + |
| 5338 '<relation role="equality" id="1">=</relation>' + |
| 5339 '</content>' + |
| 5340 '<children>' + |
| 5341 '<identifier role="latinletter" font="normal" id="0">x</identifier>' + |
| 5342 '<number role="integer" font="normal" id="2">4</number>' + |
| 5343 '</children>' + |
| 5344 '</relseq>' + |
| 5345 '</children>' + |
| 5346 '</line>' + |
| 5347 '<line role="multiline" id="11">' + |
| 5348 '<children>' + |
| 5349 '<relseq role="equality" id="9">=' + |
| 5350 '<content>' + |
| 5351 '<relation role="equality" id="7">=</relation>' + |
| 5352 '</content>' + |
| 5353 '<children>' + |
| 5354 '<identifier role="latinletter" font="normal" id="6">y</identifier>' + |
| 5355 '<number role="integer" font="normal" id="8">2</number>' + |
| 5356 '</children>' + |
| 5357 '</relseq>' + |
| 5358 '</children>' + |
| 5359 '</line>' + |
| 5360 '<line role="multiline" id="20">' + |
| 5361 '<children>' + |
| 5362 '<relseq role="equality" id="18">=' + |
| 5363 '<content>' + |
| 5364 '<relation role="equality" id="14">=</relation>' + |
| 5365 '</content>' + |
| 5366 '<children>' + |
| 5367 '<infixop role="implicit" id="17">\u2062' + |
| 5368 '<content>' + |
| 5369 '<operator role="multiplication" id="16">\u2062</operator>' + |
| 5370 '</content>' + |
| 5371 '<children>' + |
| 5372 '<identifier role="latinletter" font="normal" id="12">x</identifier>' + |
| 5373 '<identifier role="latinletter" font="normal" id="13">y</identifier>' + |
| 5374 '</children>' + |
| 5375 '</infixop>' + |
| 5376 '<number role="integer" font="normal" id="15">6</number>' + |
| 5377 '</children>' + |
| 5378 '</relseq>' + |
| 5379 '</children>' + |
| 5380 '</line>' + |
| 5381 '</children>' + |
| 5382 '</multiline>'); |
| 5383 |
| 5384 this.executeTreeTest( |
| 5385 '<mtable><mtr><mtd><mi>x</mi></mtd><mtd><mo>=</mo></mtd><mtd><mn>4</mn>' + |
| 5386 '</mtd></mtr><mtr><mtd><mi>y</mi></mtd><mtd><mo>=</mo></mtd><mtd>' + |
| 5387 '<mn>2</mn></mtd></mtr><mtr><mtd><mi>x</mi><mi>y</mi></mtd><mtd>' + |
| 5388 '<mo>=</mo></mtd><mtd><mn>6</mn></mtd></mtr></mtable>', |
| 5389 '<table role="unknown" id="24">' + |
| 5390 '<children>' + |
| 5391 '<row role="table" id="6">' + |
| 5392 '<children>' + |
| 5393 '<cell role="table" id="1">' + |
| 5394 '<children>' + |
| 5395 '<identifier role="latinletter" font="normal" id="0">x</identifier>' + |
| 5396 '</children>' + |
| 5397 '</cell>' + |
| 5398 '<cell role="table" id="3">' + |
| 5399 '<children>' + |
| 5400 '<relation role="equality" id="2">=</relation>' + |
| 5401 '</children>' + |
| 5402 '</cell>' + |
| 5403 '<cell role="table" id="5">' + |
| 5404 '<children>' + |
| 5405 '<number role="integer" font="normal" id="4">4</number>' + |
| 5406 '</children>' + |
| 5407 '</cell>' + |
| 5408 '</children>' + |
| 5409 '</row>' + |
| 5410 '<row role="table" id="13">' + |
| 5411 '<children>' + |
| 5412 '<cell role="table" id="8">' + |
| 5413 '<children>' + |
| 5414 '<identifier role="latinletter" font="normal" id="7">y</identifier>' + |
| 5415 '</children>' + |
| 5416 '</cell>' + |
| 5417 '<cell role="table" id="10">' + |
| 5418 '<children>' + |
| 5419 '<relation role="equality" id="9">=</relation>' + |
| 5420 '</children>' + |
| 5421 '</cell>' + |
| 5422 '<cell role="table" id="12">' + |
| 5423 '<children>' + |
| 5424 '<number role="integer" font="normal" id="11">2</number>' + |
| 5425 '</children>' + |
| 5426 '</cell>' + |
| 5427 '</children>' + |
| 5428 '</row>' + |
| 5429 '<row role="table" id="23">' + |
| 5430 '<children>' + |
| 5431 '<cell role="table" id="18">' + |
| 5432 '<children>' + |
| 5433 '<infixop role="implicit" id="17">\u2062' + |
| 5434 '<content>' + |
| 5435 '<operator role="multiplication" id="16">\u2062</operator>' + |
| 5436 '</content>' + |
| 5437 '<children>' + |
| 5438 '<identifier role="latinletter" font="normal" id="14">x</identifier>' + |
| 5439 '<identifier role="latinletter" font="normal" id="15">y</identifier>' + |
| 5440 '</children>' + |
| 5441 '</infixop>' + |
| 5442 '</children>' + |
| 5443 '</cell>' + |
| 5444 '<cell role="table" id="20">' + |
| 5445 '<children>' + |
| 5446 '<relation role="equality" id="19">=</relation>' + |
| 5447 '</children>' + |
| 5448 '</cell>' + |
| 5449 '<cell role="table" id="22">' + |
| 5450 '<children>' + |
| 5451 '<number role="integer" font="normal" id="21">6</number>' + |
| 5452 '</children>' + |
| 5453 '</cell>' + |
| 5454 '</children>' + |
| 5455 '</row>' + |
| 5456 '</children>' + |
| 5457 '</table>'); |
| 5458 }); |
| 5459 |
| 5460 |
| 5461 TEST_F('CvoxSemanticTreeUnitTest', 'StreeLimitFunctions', function() { |
| 5462 this.brief = true; |
| 5463 this.executeTreeTest( |
| 5464 '<mrow><munder><mi>lim</mi><mrow><mi>x</mi><mo>\u2192</mo>' + |
| 5465 '<mi>\u221E</mi></mrow></munder><mo>(</mo><mi>x</mi><mo>)</mo></mrow>', |
| 5466 '<appl>' + |
| 5467 '<content>' + |
| 5468 '<punctuation>\u2061</punctuation>' + |
| 5469 '</content>' + |
| 5470 '<children>' + |
| 5471 '<limlower>' + |
| 5472 '<children>' + |
| 5473 '<function>lim</function>' + |
| 5474 '<relseq>\u2192' + |
| 5475 '<content>' + |
| 5476 '<relation>\u2192</relation>' + |
| 5477 '</content>' + |
| 5478 '<children>' + |
| 5479 '<identifier>x</identifier>' + |
| 5480 '<identifier>\u221E</identifier>' + |
| 5481 '</children>' + |
| 5482 '</relseq>' + |
| 5483 '</children>' + |
| 5484 '</limlower>' + |
| 5485 '<fenced>' + |
| 5486 '<content>' + |
| 5487 '<fence>(</fence>' + |
| 5488 '<fence>)</fence>' + |
| 5489 '</content>' + |
| 5490 '<children>' + |
| 5491 '<identifier>x</identifier>' + |
| 5492 '</children>' + |
| 5493 '</fenced>' + |
| 5494 '</children>' + |
| 5495 '</appl>'); |
| 5496 |
| 5497 this.executeTreeTest( |
| 5498 '<mrow><mi>a</mi><mo>+</mo><munder><mi>lim</mi><mrow><mi>x</mi>' + |
| 5499 '<mo>\u2192</mo><mi>\u221E</mi></mrow></munder><mo>(</mo><mi>x</mi>' + |
| 5500 '<mo>)</mo><mo>+</mo><mi>b</mi></mrow>', |
| 5501 '<infixop>+' + |
| 5502 '<content>' + |
| 5503 '<operator>+</operator>' + |
| 5504 '<operator>+</operator>' + |
| 5505 '</content>' + |
| 5506 '<children>' + |
| 5507 '<identifier>a</identifier>' + |
| 5508 '<appl>' + |
| 5509 '<content>' + |
| 5510 '<punctuation>\u2061</punctuation>' + |
| 5511 '</content>' + |
| 5512 '<children>' + |
| 5513 '<limlower>' + |
| 5514 '<children>' + |
| 5515 '<function>lim</function>' + |
| 5516 '<relseq>\u2192' + |
| 5517 '<content>' + |
| 5518 '<relation>\u2192</relation>' + |
| 5519 '</content>' + |
| 5520 '<children>' + |
| 5521 '<identifier>x</identifier>' + |
| 5522 '<identifier>\u221E</identifier>' + |
| 5523 '</children>' + |
| 5524 '</relseq>' + |
| 5525 '</children>' + |
| 5526 '</limlower>' + |
| 5527 '<fenced>' + |
| 5528 '<content>' + |
| 5529 '<fence>(</fence>' + |
| 5530 '<fence>)</fence>' + |
| 5531 '</content>' + |
| 5532 '<children>' + |
| 5533 '<identifier>x</identifier>' + |
| 5534 '</children>' + |
| 5535 '</fenced>' + |
| 5536 '</children>' + |
| 5537 '</appl>' + |
| 5538 '<identifier>b</identifier>' + |
| 5539 '</children>' + |
| 5540 '</infixop>'); |
| 5541 |
| 5542 this.executeTreeTest( |
| 5543 '<mrow><msup><munder><mi>lim</mi><mrow><mi>x</mi><mo>\u2192</mo>' + |
| 5544 '<mi>\u221E</mi></mrow></munder><mo>+</mo></msup><mo>(</mo><mi>x</mi>' + |
| 5545 '<mo>)</mo></mrow>', |
| 5546 '<appl>' + |
| 5547 '<content>' + |
| 5548 '<punctuation>\u2061</punctuation>' + |
| 5549 '</content>' + |
| 5550 '<children>' + |
| 5551 '<limupper>' + |
| 5552 '<children>' + |
| 5553 '<limlower>' + |
| 5554 '<children>' + |
| 5555 '<function>lim</function>' + |
| 5556 '<relseq>\u2192' + |
| 5557 '<content>' + |
| 5558 '<relation>\u2192</relation>' + |
| 5559 '</content>' + |
| 5560 '<children>' + |
| 5561 '<identifier>x</identifier>' + |
| 5562 '<identifier>\u221E</identifier>' + |
| 5563 '</children>' + |
| 5564 '</relseq>' + |
| 5565 '</children>' + |
| 5566 '</limlower>' + |
| 5567 '<operator>+</operator>' + |
| 5568 '</children>' + |
| 5569 '</limupper>' + |
| 5570 '<fenced>' + |
| 5571 '<content>' + |
| 5572 '<fence>(</fence>' + |
| 5573 '<fence>)</fence>' + |
| 5574 '</content>' + |
| 5575 '<children>' + |
| 5576 '<identifier>x</identifier>' + |
| 5577 '</children>' + |
| 5578 '</fenced>' + |
| 5579 '</children>' + |
| 5580 '</appl>'); |
| 5581 |
| 5582 this.executeTreeTest( |
| 5583 '<mrow><munderover><mi>lim</mi><mo>\u2015</mo><mrow><mi>x</mi>' + |
| 5584 '<mo>\u2192</mo><mi>\u221E</mi></mrow></munderover><mo>(</mo>' + |
| 5585 '<mi>x</mi><mo>)</mo></mrow>', |
| 5586 '<appl>' + |
| 5587 '<content>' + |
| 5588 '<punctuation>\u2061</punctuation>' + |
| 5589 '</content>' + |
| 5590 '<children>' + |
| 5591 '<limboth>' + |
| 5592 '<children>' + |
| 5593 '<function>lim</function>' + |
| 5594 '<punctuation>\u2015</punctuation>' + |
| 5595 '<relseq>\u2192' + |
| 5596 '<content>' + |
| 5597 '<relation>\u2192</relation>' + |
| 5598 '</content>' + |
| 5599 '<children>' + |
| 5600 '<identifier>x</identifier>' + |
| 5601 '<identifier>\u221E</identifier>' + |
| 5602 '</children>' + |
| 5603 '</relseq>' + |
| 5604 '</children>' + |
| 5605 '</limboth>' + |
| 5606 '<fenced>' + |
| 5607 '<content>' + |
| 5608 '<fence>(</fence>' + |
| 5609 '<fence>)</fence>' + |
| 5610 '</content>' + |
| 5611 '<children>' + |
| 5612 '<identifier>x</identifier>' + |
| 5613 '</children>' + |
| 5614 '</fenced>' + |
| 5615 '</children>' + |
| 5616 '</appl>'); |
| 5617 |
| 5618 this.executeTreeTest( |
| 5619 '<mrow><munder><mi>liminf</mi><mrow><mi>x</mi><mo>\u2192</mo>' + |
| 5620 '<mi>\u221E</mi></mrow></munder><mo>(</mo><mi>x</mi><mo>)</mo>' + |
| 5621 '<mo>+</mo><munder><mi>limsup</mi><mrow><mi>y</mi><mo>\u2192</mo>' + |
| 5622 '<mi>\u221E</mi></mrow></munder><mo>(</mo><mi>y</mi><mo>)</mo></mrow>', |
| 5623 '<infixop>+' + |
| 5624 '<content>' + |
| 5625 '<operator>+</operator>' + |
| 5626 '</content>' + |
| 5627 '<children>' + |
| 5628 '<appl>' + |
| 5629 '<content>' + |
| 5630 '<punctuation>\u2061</punctuation>' + |
| 5631 '</content>' + |
| 5632 '<children>' + |
| 5633 '<limlower>' + |
| 5634 '<children>' + |
| 5635 '<function>liminf</function>' + |
| 5636 '<relseq>\u2192' + |
| 5637 '<content>' + |
| 5638 '<relation>\u2192</relation>' + |
| 5639 '</content>' + |
| 5640 '<children>' + |
| 5641 '<identifier>x</identifier>' + |
| 5642 '<identifier>\u221E</identifier>' + |
| 5643 '</children>' + |
| 5644 '</relseq>' + |
| 5645 '</children>' + |
| 5646 '</limlower>' + |
| 5647 '<fenced>' + |
| 5648 '<content>' + |
| 5649 '<fence>(</fence>' + |
| 5650 '<fence>)</fence>' + |
| 5651 '</content>' + |
| 5652 '<children>' + |
| 5653 '<identifier>x</identifier>' + |
| 5654 '</children>' + |
| 5655 '</fenced>' + |
| 5656 '</children>' + |
| 5657 '</appl>' + |
| 5658 '<appl>' + |
| 5659 '<content>' + |
| 5660 '<punctuation>\u2061</punctuation>' + |
| 5661 '</content>' + |
| 5662 '<children>' + |
| 5663 '<limlower>' + |
| 5664 '<children>' + |
| 5665 '<function>limsup</function>' + |
| 5666 '<relseq>\u2192' + |
| 5667 '<content>' + |
| 5668 '<relation>\u2192</relation>' + |
| 5669 '</content>' + |
| 5670 '<children>' + |
| 5671 '<identifier>y</identifier>' + |
| 5672 '<identifier>\u221E</identifier>' + |
| 5673 '</children>' + |
| 5674 '</relseq>' + |
| 5675 '</children>' + |
| 5676 '</limlower>' + |
| 5677 '<fenced>' + |
| 5678 '<content>' + |
| 5679 '<fence>(</fence>' + |
| 5680 '<fence>)</fence>' + |
| 5681 '</content>' + |
| 5682 '<children>' + |
| 5683 '<identifier>y</identifier>' + |
| 5684 '</children>' + |
| 5685 '</fenced>' + |
| 5686 '</children>' + |
| 5687 '</appl>' + |
| 5688 '</children>' + |
| 5689 '</infixop>'); |
| 5690 |
| 5691 this.executeTreeTest( |
| 5692 '<mrow><mi>a</mi><mo>+</mo><munder><mi>lim</mi><mrow><mi>x</mi>' + |
| 5693 '<mo>\u2192</mo><mi>\u221E</mi></mrow></munder><mi>x</mi><mo>+</mo>' + |
| 5694 '<mi>b</mi></mrow>', |
| 5695 '<infixop>+' + |
| 5696 '<content>' + |
| 5697 '<operator>+</operator>' + |
| 5698 '<operator>+</operator>' + |
| 5699 '</content>' + |
| 5700 '<children>' + |
| 5701 '<identifier>a</identifier>' + |
| 5702 '<appl>' + |
| 5703 '<content>' + |
| 5704 '<punctuation>\u2061</punctuation>' + |
| 5705 '</content>' + |
| 5706 '<children>' + |
| 5707 '<limlower>' + |
| 5708 '<children>' + |
| 5709 '<function>lim</function>' + |
| 5710 '<relseq>\u2192' + |
| 5711 '<content>' + |
| 5712 '<relation>\u2192</relation>' + |
| 5713 '</content>' + |
| 5714 '<children>' + |
| 5715 '<identifier>x</identifier>' + |
| 5716 '<identifier>\u221E</identifier>' + |
| 5717 '</children>' + |
| 5718 '</relseq>' + |
| 5719 '</children>' + |
| 5720 '</limlower>' + |
| 5721 '<identifier>x</identifier>' + |
| 5722 '</children>' + |
| 5723 '</appl>' + |
| 5724 '<identifier>b</identifier>' + |
| 5725 '</children>' + |
| 5726 '</infixop>'); |
| 5727 |
| 5728 this.executeTreeTest( |
| 5729 '<mrow><munder><mi>lim</mi><mrow><mi>x</mi><mo>\u2192</mo><mi>\u221E</mi>' + |
| 5730 '</mrow></munder><mi>lim</mi><munder><mrow><mi>y</mi><mo>\u2192</mo>' + |
| 5731 '<mi>\u221E</mi></mrow></munder><mi>x</mi><mi>y</mi></mrow>', |
| 5732 '<appl>' + |
| 5733 '<content>' + |
| 5734 '<punctuation>\u2061</punctuation>' + |
| 5735 '</content>' + |
| 5736 '<children>' + |
| 5737 '<limlower>' + |
| 5738 '<children>' + |
| 5739 '<function>lim</function>' + |
| 5740 '<relseq>\u2192' + |
| 5741 '<content>' + |
| 5742 '<relation>\u2192</relation>' + |
| 5743 '</content>' + |
| 5744 '<children>' + |
| 5745 '<identifier>x</identifier>' + |
| 5746 '<identifier>\u221E</identifier>' + |
| 5747 '</children>' + |
| 5748 '</relseq>' + |
| 5749 '</children>' + |
| 5750 '</limlower>' + |
| 5751 '<appl>' + |
| 5752 '<content>' + |
| 5753 '<punctuation>\u2061</punctuation>' + |
| 5754 '</content>' + |
| 5755 '<children>' + |
| 5756 '<function>lim</function>' + |
| 5757 '<infixop>\u2062' + |
| 5758 '<content>' + |
| 5759 '<operator>\u2062</operator>' + |
| 5760 '</content>' + |
| 5761 '<children>' + |
| 5762 '<underscore>' + |
| 5763 '<children>' + |
| 5764 '<relseq>\u2192' + |
| 5765 '<content>' + |
| 5766 '<relation>\u2192</relation>' + |
| 5767 '</content>' + |
| 5768 '<children>' + |
| 5769 '<identifier>y</identifier>' + |
| 5770 '<identifier>\u221E</identifier>' + |
| 5771 '</children>' + |
| 5772 '</relseq>' + |
| 5773 '</children>' + |
| 5774 '</underscore>' + |
| 5775 '<identifier>x</identifier>' + |
| 5776 '<identifier>y</identifier>' + |
| 5777 '</children>' + |
| 5778 '</infixop>' + |
| 5779 '</children>' + |
| 5780 '</appl>' + |
| 5781 '</children>' + |
| 5782 '</appl>'); |
| 5783 |
| 5784 this.executeTreeTest( |
| 5785 '<mi>liminf</mi>', |
| 5786 '<function>liminf</function>'); |
| 5787 |
| 5788 this.executeTreeTest( |
| 5789 '<munder><mi>lim</mi><mrow><mi>x</mi><mo>\u2192</mo><mi>\u221E</mi>' + |
| 5790 '</mrow></munder>', |
| 5791 '<limlower>' + |
| 5792 '<children>' + |
| 5793 '<function>lim</function>' + |
| 5794 '<relseq>\u2192' + |
| 5795 '<content>' + |
| 5796 '<relation>\u2192</relation>' + |
| 5797 '</content>' + |
| 5798 '<children>' + |
| 5799 '<identifier>x</identifier>' + |
| 5800 '<identifier>\u221E</identifier>' + |
| 5801 '</children>' + |
| 5802 '</relseq>' + |
| 5803 '</children>' + |
| 5804 '</limlower>'); |
| 5805 |
| 5806 this.executeTreeTest( |
| 5807 '<mi>liminf</mi><mo>+</mo><mi>limsup</mi><mo>=</mo><mi>lim</mi>', |
| 5808 '<relseq>=' + |
| 5809 '<content>' + |
| 5810 '<relation>=</relation>' + |
| 5811 '</content>' + |
| 5812 '<children>' + |
| 5813 '<infixop>+' + |
| 5814 '<content>' + |
| 5815 '<operator>+</operator>' + |
| 5816 '</content>' + |
| 5817 '<children>' + |
| 5818 '<appl>' + |
| 5819 '<content>' + |
| 5820 '<punctuation>\u2061</punctuation>' + |
| 5821 '</content>' + |
| 5822 '<children>' + |
| 5823 '<function>liminf</function>' + |
| 5824 '<empty/>' + |
| 5825 '</children>' + |
| 5826 '</appl>' + |
| 5827 '<appl>' + |
| 5828 '<content>' + |
| 5829 '<punctuation>\u2061</punctuation>' + |
| 5830 '</content>' + |
| 5831 '<children>' + |
| 5832 '<function>limsup</function>' + |
| 5833 '<empty/>' + |
| 5834 '</children>' + |
| 5835 '</appl>' + |
| 5836 '</children>' + |
| 5837 '</infixop>' + |
| 5838 '<appl>' + |
| 5839 '<content>' + |
| 5840 '<punctuation>\u2061</punctuation>' + |
| 5841 '</content>' + |
| 5842 '<children>' + |
| 5843 '<function>lim</function>' + |
| 5844 '<empty/>' + |
| 5845 '</children>' + |
| 5846 '</appl>' + |
| 5847 '</children>' + |
| 5848 '</relseq>'); |
| 5849 }); |
| 5850 |
| 5851 |
| 5852 /** |
| 5853 * Variations of big operators. |
| 5854 */ |
| 5855 TEST_F('CvoxSemanticTreeUnitTest', 'StreeBigOps', function() { |
| 5856 this.brief = true; |
| 5857 this.executeTreeTest( |
| 5858 '<mrow><munderover><mi>\u2211</mi><mrow><mi>n</mi><mo>=</mo><mn>0</mn>' + |
| 5859 '</mrow><mi>\u221E</mi></munderover><msup><mi>n</mi><mn>2</mn>' + |
| 5860 '</msup></mrow>', |
| 5861 '<bigop>' + |
| 5862 '<children>' + |
| 5863 '<limboth>' + |
| 5864 '<children>' + |
| 5865 '<largeop>\u2211</largeop>' + |
| 5866 '<relseq>=' + |
| 5867 '<content>' + |
| 5868 '<relation>=</relation>' + |
| 5869 '</content>' + |
| 5870 '<children>' + |
| 5871 '<identifier>n</identifier>' + |
| 5872 '<number>0</number>' + |
| 5873 '</children>' + |
| 5874 '</relseq>' + |
| 5875 '<identifier>\u221E</identifier>' + |
| 5876 '</children>' + |
| 5877 '</limboth>' + |
| 5878 '<superscript>' + |
| 5879 '<children>' + |
| 5880 '<identifier>n</identifier>' + |
| 5881 '<number>2</number>' + |
| 5882 '</children>' + |
| 5883 '</superscript>' + |
| 5884 '</children>' + |
| 5885 '</bigop>'); |
| 5886 |
| 5887 this.executeTreeTest( |
| 5888 '<mrow><munderover><mi>\u2211</mi><mrow><mi>n</mi><mo>=</mo><mn>0</mn>' + |
| 5889 '</mrow><mi>\u221E</mi></munderover><munderover><mi>\u2211</mi><mrow>' + |
| 5890 '<mi>m</mi><mo>=</mo><mn>0</mn></mrow><mi>\u221E</mi></munderover><msup>' + |
| 5891 '<mi>n</mi><mn>m</mn></msup></mrow>', |
| 5892 '<bigop>' + |
| 5893 '<children>' + |
| 5894 '<limboth>' + |
| 5895 '<children>' + |
| 5896 '<largeop>\u2211</largeop>' + |
| 5897 '<relseq>=' + |
| 5898 '<content>' + |
| 5899 '<relation>=</relation>' + |
| 5900 '</content>' + |
| 5901 '<children>' + |
| 5902 '<identifier>n</identifier>' + |
| 5903 '<number>0</number>' + |
| 5904 '</children>' + |
| 5905 '</relseq>' + |
| 5906 '<identifier>\u221E</identifier>' + |
| 5907 '</children>' + |
| 5908 '</limboth>' + |
| 5909 '<bigop>' + |
| 5910 '<children>' + |
| 5911 '<limboth>' + |
| 5912 '<children>' + |
| 5913 '<largeop>\u2211</largeop>' + |
| 5914 '<relseq>=' + |
| 5915 '<content>' + |
| 5916 '<relation>=</relation>' + |
| 5917 '</content>' + |
| 5918 '<children>' + |
| 5919 '<identifier>m</identifier>' + |
| 5920 '<number>0</number>' + |
| 5921 '</children>' + |
| 5922 '</relseq>' + |
| 5923 '<identifier>\u221E</identifier>' + |
| 5924 '</children>' + |
| 5925 '</limboth>' + |
| 5926 '<superscript>' + |
| 5927 '<children>' + |
| 5928 '<identifier>n</identifier>' + |
| 5929 '<identifier>m</identifier>' + |
| 5930 '</children>' + |
| 5931 '</superscript>' + |
| 5932 '</children>' + |
| 5933 '</bigop>' + |
| 5934 '</children>' + |
| 5935 '</bigop>'); |
| 5936 |
| 5937 this.executeTreeTest( |
| 5938 '<mrow><munder><mi>\u2211</mi><mrow><mi>n</mi><mo>=</mo><mn>0</mn></mrow>' + |
| 5939 '</munder><msup><mi>n</mi><mn>2</mn></msup></mrow>', |
| 5940 '<bigop>' + |
| 5941 '<children>' + |
| 5942 '<limlower>' + |
| 5943 '<children>' + |
| 5944 '<largeop>\u2211</largeop>' + |
| 5945 '<relseq>=' + |
| 5946 '<content>' + |
| 5947 '<relation>=</relation>' + |
| 5948 '</content>' + |
| 5949 '<children>' + |
| 5950 '<identifier>n</identifier>' + |
| 5951 '<number>0</number>' + |
| 5952 '</children>' + |
| 5953 '</relseq>' + |
| 5954 '</children>' + |
| 5955 '</limlower>' + |
| 5956 '<superscript>' + |
| 5957 '<children>' + |
| 5958 '<identifier>n</identifier>' + |
| 5959 '<number>2</number>' + |
| 5960 '</children>' + |
| 5961 '</superscript>' + |
| 5962 '</children>' + |
| 5963 '</bigop>'); |
| 5964 }); |
| 5965 |
| 5966 |
| 5967 |
| 5968 /** |
| 5969 * Variations of integrals. |
| 5970 */ |
| 5971 TEST_F('CvoxSemanticTreeUnitTest', 'StreeIntegrals', function() { |
| 5972 this.brief = true; |
| 5973 this.executeTreeTest( |
| 5974 '<mi>\u222B</mi>', |
| 5975 '<largeop>\u222B</largeop>'); |
| 5976 |
| 5977 this.executeTreeTest( |
| 5978 '<mi>\u222B</mi><mi>dx</mi>', |
| 5979 '<integral>' + |
| 5980 '<children>' + |
| 5981 '<largeop>\u222B</largeop>' + |
| 5982 '<empty/>' + |
| 5983 '<identifier>dx</identifier>' + |
| 5984 '</children>' + |
| 5985 '</integral>'); |
| 5986 |
| 5987 this.executeTreeTest( |
| 5988 '<mrow><mi>\u222B</mi><mi>x</mi><mi>dx</mi></mrow>', |
| 5989 '<integral>' + |
| 5990 '<children>' + |
| 5991 '<largeop>\u222B</largeop>' + |
| 5992 '<identifier>x</identifier>' + |
| 5993 '<identifier>dx</identifier>' + |
| 5994 '</children>' + |
| 5995 '</integral>'); |
| 5996 |
| 5997 this.executeTreeTest( |
| 5998 '<mrow><mi>\u222B</mi><mi>x</mi><mi>d</mi><mi>x</mi></mrow>', |
| 5999 '<integral>' + |
| 6000 '<children>' + |
| 6001 '<largeop>\u222B</largeop>' + |
| 6002 '<identifier>x</identifier>' + |
| 6003 '<punctuated>' + |
| 6004 '<content>' + |
| 6005 '<punctuation>\u2063</punctuation>' + |
| 6006 '</content>' + |
| 6007 '<children>' + |
| 6008 '<identifier>d</identifier>' + |
| 6009 '<punctuation>\u2063</punctuation>' + |
| 6010 '<identifier>x</identifier>' + |
| 6011 '</children>' + |
| 6012 '</punctuated>' + |
| 6013 '</children>' + |
| 6014 '</integral>'); |
| 6015 |
| 6016 this.executeTreeTest( |
| 6017 '<mrow><mi>\u222B</mi><mi>x</mi><mo>+</mo><mi>y</mi><mi>d</mi><mi>x</mi></mr
ow>', |
| 6018 '<integral>' + |
| 6019 '<children>' + |
| 6020 '<largeop>\u222B</largeop>' + |
| 6021 '<infixop>+' + |
| 6022 '<content>' + |
| 6023 '<operator>+</operator>' + |
| 6024 '</content>' + |
| 6025 '<children>' + |
| 6026 '<identifier>x</identifier>' + |
| 6027 '<identifier>y</identifier>' + |
| 6028 '</children>' + |
| 6029 '</infixop>' + |
| 6030 '<punctuated>' + |
| 6031 '<content>' + |
| 6032 '<punctuation>\u2063</punctuation>' + |
| 6033 '</content>' + |
| 6034 '<children>' + |
| 6035 '<identifier>d</identifier>' + |
| 6036 '<punctuation>\u2063</punctuation>' + |
| 6037 '<identifier>x</identifier>' + |
| 6038 '</children>' + |
| 6039 '</punctuated>' + |
| 6040 '</children>' + |
| 6041 '</integral>'); |
| 6042 |
| 6043 this.executeTreeTest( |
| 6044 '<munderover><mi>\u222B</mi><mn>0</mn><mn>10</mn></munderover>', |
| 6045 '<limboth>' + |
| 6046 '<children>' + |
| 6047 '<largeop>\u222B</largeop>' + |
| 6048 '<number>0</number>' + |
| 6049 '<number>10</number>' + |
| 6050 '</children>' + |
| 6051 '</limboth>'); |
| 6052 |
| 6053 this.executeTreeTest( |
| 6054 '<munder><mi>\u222B</mi><mn>X</mn></munder>', |
| 6055 '<limlower>' + |
| 6056 '<children>' + |
| 6057 '<largeop>\u222B</largeop>' + |
| 6058 '<identifier>X</identifier>' + |
| 6059 '</children>' + |
| 6060 '</limlower>'); |
| 6061 |
| 6062 this.executeTreeTest( |
| 6063 '<munderover><mi>\u222B</mi><mn>0</mn><mn>10</mn></munderover><mi>x</mi>' + |
| 6064 '<mi>d</mi><mi>x</mi>', |
| 6065 '<integral>' + |
| 6066 '<children>' + |
| 6067 '<limboth>' + |
| 6068 '<children>' + |
| 6069 '<largeop>\u222B</largeop>' + |
| 6070 '<number>0</number>' + |
| 6071 '<number>10</number>' + |
| 6072 '</children>' + |
| 6073 '</limboth>' + |
| 6074 '<identifier>x</identifier>' + |
| 6075 '<punctuated>' + |
| 6076 '<content>' + |
| 6077 '<punctuation>\u2063</punctuation>' + |
| 6078 '</content>' + |
| 6079 '<children>' + |
| 6080 '<identifier>d</identifier>' + |
| 6081 '<punctuation>\u2063</punctuation>' + |
| 6082 '<identifier>x</identifier>' + |
| 6083 '</children>' + |
| 6084 '</punctuated>' + |
| 6085 '</children>' + |
| 6086 '</integral>'); |
| 6087 |
| 6088 this.executeTreeTest( |
| 6089 '<munder><mi>\u222B</mi><mn>X</mn></munder><mi>x</mi><mi>dx</mi>', |
| 6090 '<integral>' + |
| 6091 '<children>' + |
| 6092 '<limlower>' + |
| 6093 '<children>' + |
| 6094 '<largeop>\u222B</largeop>' + |
| 6095 '<identifier>X</identifier>' + |
| 6096 '</children>' + |
| 6097 '</limlower>' + |
| 6098 '<identifier>x</identifier>' + |
| 6099 '<identifier>dx</identifier>' + |
| 6100 '</children>' + |
| 6101 '</integral>'); |
| 6102 |
| 6103 this.executeTreeTest( |
| 6104 '<munderover><mi>\u222B</mi><mn>0</mn><mn>10</mn></munderover><mi>x</mi>' + |
| 6105 '<mi>dx</mi><mo>+</mo><munderover><mi>\u222B</mi><mn>10</mn><mn>20</mn>' + |
| 6106 '</munderover><mi>x</mi><mi>dx</mi><mo>=</mo><munderover><mi>\u222B</mi>' + |
| 6107 '<mn>0</mn><mn>20</mn></munderover><mi>x</mi><mi>dx</mi>', |
| 6108 '<relseq>=' + |
| 6109 '<content>' + |
| 6110 '<relation>=</relation>' + |
| 6111 '</content>' + |
| 6112 '<children>' + |
| 6113 '<infixop>+' + |
| 6114 '<content>' + |
| 6115 '<operator>+</operator>' + |
| 6116 '</content>' + |
| 6117 '<children>' + |
| 6118 '<integral>' + |
| 6119 '<children>' + |
| 6120 '<limboth>' + |
| 6121 '<children>' + |
| 6122 '<largeop>\u222B</largeop>' + |
| 6123 '<number>0</number>' + |
| 6124 '<number>10</number>' + |
| 6125 '</children>' + |
| 6126 '</limboth>' + |
| 6127 '<identifier>x</identifier>' + |
| 6128 '<identifier>dx</identifier>' + |
| 6129 '</children>' + |
| 6130 '</integral>' + |
| 6131 '<integral>' + |
| 6132 '<children>' + |
| 6133 '<limboth>' + |
| 6134 '<children>' + |
| 6135 '<largeop>\u222B</largeop>' + |
| 6136 '<number>10</number>' + |
| 6137 '<number>20</number>' + |
| 6138 '</children>' + |
| 6139 '</limboth>' + |
| 6140 '<identifier>x</identifier>' + |
| 6141 '<identifier>dx</identifier>' + |
| 6142 '</children>' + |
| 6143 '</integral>' + |
| 6144 '</children>' + |
| 6145 '</infixop>' + |
| 6146 '<integral>' + |
| 6147 '<children>' + |
| 6148 '<limboth>' + |
| 6149 '<children>' + |
| 6150 '<largeop>\u222B</largeop>' + |
| 6151 '<number>0</number>' + |
| 6152 '<number>20</number>' + |
| 6153 '</children>' + |
| 6154 '</limboth>' + |
| 6155 '<identifier>x</identifier>' + |
| 6156 '<identifier>dx</identifier>' + |
| 6157 '</children>' + |
| 6158 '</integral>' + |
| 6159 '</children>' + |
| 6160 '</relseq>'); |
| 6161 |
| 6162 this.executeTreeTest( |
| 6163 '<mi>\u222B</mi><mi>\u222B</mi><mi>\u222B</mi><mi>dx</mi><mi>dy</mi><mi>dz</
mi>', |
| 6164 '<integral>' + |
| 6165 '<children>' + |
| 6166 '<largeop>\u222B</largeop>' + |
| 6167 '<integral>' + |
| 6168 '<children>' + |
| 6169 '<largeop>\u222B</largeop>' + |
| 6170 '<integral>' + |
| 6171 '<children>' + |
| 6172 '<largeop>\u222B</largeop>' + |
| 6173 '<empty/>' + |
| 6174 '<identifier>dx</identifier>' + |
| 6175 '</children>' + |
| 6176 '</integral>' + |
| 6177 '<identifier>dy</identifier>' + |
| 6178 '</children>' + |
| 6179 '</integral>' + |
| 6180 '<identifier>dz</identifier>' + |
| 6181 '</children>' + |
| 6182 '</integral>'); |
| 6183 }); |
OLD | NEW |