How to use children method in storybook-root

Best JavaScript code snippet using storybook-root

math_semantic_tree_test.js

Source:math_semantic_tree_test.js Github

copy

Full Screen

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

Full Screen

Full Screen

tupu.js

Source:tupu.js Github

copy

Full Screen

1import Mock from './config'2Mock.mock(/info\/tupu/,'get',options=>{3 console.log(options)4 return {5 "Status": "200",6 "Message": "查询成功",7 "OrderNumber": "ECIRELATION2018081714544389316056",8 "Result": {9 "Node": {10 "name": "海通证券股份有限公司",11 "KeyNo": "56777fa57d850f62a5225be7d974a17e",12 "Category": 1,13 "ShortName": "海通证券",14 "Count": 128,15 "Level": 0,16 "Children": [{17 "name": "对外投资",18 "KeyNo": null,19 "Category": 2,20 "ShortName": "对外投资",21 "Count": 70,22 "Level": 0,23 "Children": [{24 "name": "中证信用增进股份有限公司",25 "KeyNo": "195562be947d311ee4d170aceb6a296c",26 "Category": 2,27 "ShortName": "中证信用增进",28 "Count": 0,29 "Level": 1,30 "Children": null31 }, {32 "name": "海通证券股份有限公司深圳梅林路证券营业部",33 "KeyNo": "1f4c40f0ed97c3baea83c149396fe495",34 "Category": 2,35 "ShortName": "海通证券",36 "Count": 0,37 "Level": 1,38 "Children": null39 }, {40 "name": "海通证券股份有限公司深圳高新南四道证券营业部",41 "KeyNo": "afbc7aa4e7db21f68f132e01352e31fa",42 "Category": 2,43 "ShortName": "海通证券",44 "Count": 0,45 "Level": 1,46 "Children": null47 }, {48 "name": "证通股份有限公司",49 "KeyNo": "00db45cb036ece3cfbc3897ffe372e74",50 "Category": 2,51 "ShortName": "证通",52 "Count": 0,53 "Level": 1,54 "Children": null55 }, {56 "name": "海通证券股份有限公司深圳宝源路证券营业部",57 "KeyNo": "6b1f1f15f20c881879c41509b166f6c5",58 "Category": 2,59 "ShortName": "海通证券",60 "Count": 0,61 "Level": 1,62 "Children": null63 }, {64 "name": "上海惟泰置业管理有限公司",65 "KeyNo": "0745ac985805e5013d890c79bfab4973",66 "Category": 2,67 "ShortName": "惟泰置业",68 "Count": 0,69 "Level": 1,70 "Children": null71 }, {72 "name": "海通证券股份有限公司深圳深南大道证券营业部",73 "KeyNo": "6030d841e0b7b8bc34fcfd3ea310bea7",74 "Category": 2,75 "ShortName": "海通证券",76 "Count": 0,77 "Level": 1,78 "Children": null79 }, {80 "name": "上海海通证券资产管理有限公司",81 "KeyNo": "2dc36c7a5f117488be2adee032f5c770",82 "Category": 2,83 "ShortName": "海通证券资产",84 "Count": 0,85 "Level": 1,86 "Children": null87 }, {88 "name": "海通创新证券投资有限公司",89 "KeyNo": "420447e12564fb5e424809af5c99c472",90 "Category": 2,91 "ShortName": "海通创新证券",92 "Count": 0,93 "Level": 1,94 "Children": null95 }, {96 "name": "上海时光科技股份有限公司",97 "KeyNo": "1bb3cb0f2cf7830dc685465e91ebc3ae",98 "Category": 2,99 "ShortName": "上海时光",100 "Count": 0,101 "Level": 1,102 "Children": null103 }, {104 "name": "合肥嘉东光学股份有限公司",105 "KeyNo": "ec05f25a4e751abcf4a2c30ead6142ac",106 "Category": 2,107 "ShortName": "嘉东光学",108 "Count": 0,109 "Level": 1,110 "Children": null111 }, {112 "name": "北京星立方科技发展股份有限公司",113 "KeyNo": "ffc1d9c689efdda49cc57fae05590072",114 "Category": 2,115 "ShortName": "星立方科技发",116 "Count": 0,117 "Level": 1,118 "Children": null119 }, {120 "name": "北京聚能鼎力科技股份有限公司",121 "KeyNo": "10798ccf855a4e98d18078111b61142f",122 "Category": 2,123 "ShortName": "聚能鼎力",124 "Count": 0,125 "Level": 1,126 "Children": null127 }, {128 "name": "广东松本绿色新材股份有限公司",129 "KeyNo": "97d4e0e2636b2222de6d3d36ea1d8f62",130 "Category": 2,131 "ShortName": "松本绿色新材",132 "Count": 0,133 "Level": 1,134 "Children": null135 }, {136 "name": "海通证券股份有限公司深圳分公司",137 "KeyNo": "3d40214923e321c47afdb5ff7c94bbb3",138 "Category": 2,139 "ShortName": "海通证券",140 "Count": 0,141 "Level": 1,142 "Children": null143 }, {144 "name": "海通开元投资有限公司",145 "KeyNo": "a54d8f397f474591d06a6a16a1eaf0f7",146 "Category": 2,147 "ShortName": "海通开元投资",148 "Count": 0,149 "Level": 1,150 "Children": null151 }, {152 "name": "四川鱼鳞图信息技术股份有限公司",153 "KeyNo": "96097759f2c3d5486ee62722acb12c49",154 "Category": 2,155 "ShortName": "鱼鳞图信息技",156 "Count": 0,157 "Level": 1,158 "Children": null159 }, {160 "name": "中国中煤能源股份有限公司",161 "KeyNo": "9230cf099809fa150e3a80f1bc6ebafc",162 "Category": 2,163 "ShortName": "中煤能源",164 "Count": 0,165 "Level": 1,166 "Children": null167 }, {168 "name": "上海益盟软件技术股份有限公司",169 "KeyNo": "01c774cca57a2a243c089ceb281a3490",170 "Category": 2,171 "ShortName": "益盟软件技术",172 "Count": 0,173 "Level": 1,174 "Children": null175 }, {176 "name": "贵州黔驰信息股份有限公司",177 "KeyNo": "6a256d8dc7c0b6216173b049c20579d2",178 "Category": 2,179 "ShortName": "黔驰信息",180 "Count": 0,181 "Level": 1,182 "Children": null183 }, {184 "name": "安徽富煌钢构股份有限公司",185 "KeyNo": "b0d810110c1d62712f25bafa6bf7960f",186 "Category": 2,187 "ShortName": "富煌钢构",188 "Count": 0,189 "Level": 1,190 "Children": null191 }, {192 "name": "中国―比利时直接股权投资基金",193 "KeyNo": "1b6e0f2bb0fbc66404d555b61c06a6c9",194 "Category": 2,195 "ShortName": "―比利时直接",196 "Count": 0,197 "Level": 1,198 "Children": null199 }, {200 "name": "海富产业投资基金管理有限公司",201 "KeyNo": "f8b9cfddc01adc227ec7b5c093ad1948",202 "Category": 2,203 "ShortName": "海富产业投资",204 "Count": 0,205 "Level": 1,206 "Children": null207 }, {208 "name": "瑞康医药股份有限公司",209 "KeyNo": "97c2f68a930871fc66d5c4e585ca9c41",210 "Category": 2,211 "ShortName": "瑞康医药",212 "Count": 0,213 "Level": 1,214 "Children": null215 }, {216 "name": "上海辰光医疗科技股份有限公司",217 "KeyNo": "1ca13511a91a498e704440f7dfd353e9",218 "Category": 2,219 "ShortName": "辰光医疗",220 "Count": 0,221 "Level": 1,222 "Children": null223 }, {224 "name": "海富通基金管理有限公司",225 "KeyNo": "9d847a6dc9ca0ada7124c4df25bae41c",226 "Category": 2,227 "ShortName": "海富通基金",228 "Count": 0,229 "Level": 1,230 "Children": null231 }, {232 "name": "华昌达智能装备集团股份有限公司",233 "KeyNo": "e986b84525c98322b29035b740596783",234 "Category": 2,235 "ShortName": "华昌达智能装",236 "Count": 0,237 "Level": 1,238 "Children": null239 }, {240 "name": "环旭电子股份有限公司",241 "KeyNo": "bf178d305707db324c7845acecb7034b",242 "Category": 2,243 "ShortName": "环旭电子",244 "Count": 0,245 "Level": 1,246 "Children": null247 }, {248 "name": "北京昊华能源股份有限公司",249 "KeyNo": "3184e61178d3cb711f235300223e6b3f",250 "Category": 2,251 "ShortName": "昊华能源",252 "Count": 0,253 "Level": 1,254 "Children": null255 }, {256 "name": "上海策源置业顾问股份有限公司",257 "KeyNo": "e51bb9b3a3a95c8cbedcc0ce1ece5e9e",258 "Category": 2,259 "ShortName": "策源置业顾问",260 "Count": 0,261 "Level": 1,262 "Children": null263 }, {264 "name": "汉得利(常州)电子股份有限公司",265 "KeyNo": "c6e3f141d5fad6c299d72f7c830a269c",266 "Category": 2,267 "ShortName": "汉得利电子",268 "Count": 0,269 "Level": 1,270 "Children": null271 }, {272 "name": "上海美诺福科技股份有限公司",273 "KeyNo": "767e3d1b1a6f0375a81d243e8b78a788",274 "Category": 2,275 "ShortName": "美诺福",276 "Count": 0,277 "Level": 1,278 "Children": null279 }, {280 "name": "大同煤业股份有限公司",281 "KeyNo": "fb12fa7914412ed1fdf83b56febc189a",282 "Category": 2,283 "ShortName": "大同煤业",284 "Count": 0,285 "Level": 1,286 "Children": null287 }, {288 "name": "上海宝鼎投资股份有限公司",289 "KeyNo": "874e591224be57f5ed6d602ae7e5adeb",290 "Category": 2,291 "ShortName": "宝鼎投资",292 "Count": 0,293 "Level": 1,294 "Children": null295 }, {296 "name": "安源煤业集团股份有限公司",297 "KeyNo": "2820ccc953096c74fc1a0a1909bd54b8",298 "Category": 2,299 "ShortName": "煤业集团",300 "Count": 0,301 "Level": 1,302 "Children": null303 }, {304 "name": "贵州盘江精煤股份有限公司",305 "KeyNo": "f4cc2499c8d4e806dd82e49b149d180d",306 "Category": 2,307 "ShortName": "盘江精煤",308 "Count": 0,309 "Level": 1,310 "Children": null311 }, {312 "name": "云南万绿生物股份有限公司",313 "KeyNo": "d15da1b1f4dc8aa6c2466176fbe5eedc",314 "Category": 2,315 "ShortName": "万绿生物",316 "Count": 0,317 "Level": 1,318 "Children": null319 }, {320 "name": "富国基金管理有限公司",321 "KeyNo": "59129a4cabfae9f6a54121a7ffc40a69",322 "Category": 2,323 "ShortName": "富国基金",324 "Count": 0,325 "Level": 1,326 "Children": null327 }, {328 "name": "山西兰花科技创业股份有限公司",329 "KeyNo": "2b6ade1cedaf103ffc1fafeed5ac7a2a",330 "Category": 2,331 "ShortName": "兰花科技创业",332 "Count": 0,333 "Level": 1,334 "Children": null335 }, {336 "name": "浙江天松医疗器械股份有限公司",337 "KeyNo": "8b35cab83c4bd0c44cec41bcc7e75b28",338 "Category": 2,339 "ShortName": "天松医疗器械",340 "Count": 0,341 "Level": 1,342 "Children": null343 }, {344 "name": "上海鸣志电器股份有限公司",345 "KeyNo": "7b93aef192661e0751bf5ebcb1ca0539",346 "Category": 2,347 "ShortName": "鸣志电器",348 "Count": 0,349 "Level": 1,350 "Children": null351 }, {352 "name": "上海海联投资发展有限公司",353 "KeyNo": "885fc358990d6bb7010526ba1cc3980c",354 "Category": 2,355 "ShortName": "海联投资",356 "Count": 0,357 "Level": 1,358 "Children": null359 }, {360 "name": "云南铜业股份有限公司",361 "KeyNo": "b635bc55738f0947aed0fb3fbb88853c",362 "Category": 2,363 "ShortName": "云南铜业",364 "Count": 0,365 "Level": 1,366 "Children": null367 }, {368 "name": "中煤新集能源股份有限公司",369 "KeyNo": "fc485d7e292b45ed5b51cbacfe6c1c20",370 "Category": 2,371 "ShortName": "中煤新集能源",372 "Count": 0,373 "Level": 1,374 "Children": null375 }, {376 "name": "江苏雅克科技股份有限公司",377 "KeyNo": "51e84f1bed720783f1b947bdf3791a7e",378 "Category": 2,379 "ShortName": "江苏雅克",380 "Count": 0,381 "Level": 1,382 "Children": null383 }, {384 "name": "上海市农工商浦东总公司",385 "KeyNo": "82b73c574811820dcf59648c7439a53b",386 "Category": 2,387 "ShortName": "农工商浦东",388 "Count": 0,389 "Level": 1,390 "Children": null391 }, {392 "name": "上海林奇投资咨询有限公司",393 "KeyNo": "c11fe32f62a00c81e2a88dc73593b376",394 "Category": 2,395 "ShortName": "林奇投资咨询",396 "Count": 0,397 "Level": 1,398 "Children": null399 }, {400 "name": "上海世孚商务有限公司",401 "KeyNo": "896ac3f46e4db437753681dd2d3b011c",402 "Category": 2,403 "ShortName": "世孚商务",404 "Count": 0,405 "Level": 1,406 "Children": null407 }, {408 "name": "海通证券股份有限公司深圳景田路证券营业部",409 "KeyNo": "b8b7c302c4bcb0d2f466f68d43c71b7b",410 "Category": 2,411 "ShortName": "海通证券",412 "Count": 0,413 "Level": 1,414 "Children": null415 }, {416 "name": "国义招标股份有限公司",417 "KeyNo": "03ae78fa43cfdf11e9efa86613189001",418 "Category": 2,419 "ShortName": "国义招标",420 "Count": 0,421 "Level": 1,422 "Children": null423 }]424 }, {425 "name": "股东",426 "KeyNo": null,427 "Category": 3,428 "ShortName": "股东",429 "Count": 3,430 "Level": 0,431 "Children": [{432 "name": "无限售条件股份",433 "KeyNo": "56777fa57d850f62a5225be7d974a17e_无限售条件股份",434 "Category": 3,435 "ShortName": "机关法人",436 "Count": 0,437 "Level": 1,438 "Children": null439 }, {440 "name": "有限售条件股份",441 "KeyNo": "56777fa57d850f62a5225be7d974a17e_有限售条件股份",442 "Category": 3,443 "ShortName": "机关法人",444 "Count": 0,445 "Level": 1,446 "Children": null447 }, {448 "name": "其他股东",449 "KeyNo": "56777fa57d850f62a5225be7d974a17e_其他股东",450 "Category": 3,451 "ShortName": "其他投资者",452 "Count": 0,453 "Level": 1,454 "Children": null455 }]456 }, {457 "name": "高管",458 "KeyNo": null,459 "Category": 4,460 "ShortName": "高管",461 "Count": 24,462 "Level": 0,463 "Children": [{464 "name": "林家礼",465 "KeyNo": null,466 "Category": 4,467 "ShortName": "董事",468 "Count": 0,469 "Level": 0,470 "Children": null471 }, {472 "name": "胡海蓉",473 "KeyNo": null,474 "Category": 4,475 "ShortName": "监事",476 "Count": 0,477 "Level": 0,478 "Children": null479 }, {480 "name": "宋世浩",481 "KeyNo": null,482 "Category": 4,483 "ShortName": "监事",484 "Count": 0,485 "Level": 0,486 "Children": null487 }, {488 "name": "瞿秋平",489 "KeyNo": null,490 "Category": 4,491 "ShortName": "董事兼总经理",492 "Count": 0,493 "Level": 0,494 "Children": null495 }, {496 "name": "郑小芸",497 "KeyNo": null,498 "Category": 4,499 "ShortName": "监事",500 "Count": 0,501 "Level": 0,502 "Children": null503 }, {504 "name": "周杰",505 "KeyNo": null,506 "Category": 4,507 "ShortName": "董事长",508 "Count": 0,509 "Level": 0,510 "Children": null511 }, {512 "name": "邬跃舟",513 "KeyNo": null,514 "Category": 4,515 "ShortName": "董事",516 "Count": 0,517 "Level": 0,518 "Children": null519 }, {520 "name": "冯煌",521 "KeyNo": null,522 "Category": 4,523 "ShortName": "监事",524 "Count": 0,525 "Level": 0,526 "Children": null527 }, {528 "name": "许建国",529 "KeyNo": null,530 "Category": 4,531 "ShortName": "董事",532 "Count": 0,533 "Level": 0,534 "Children": null535 }, {536 "name": "张鸣",537 "KeyNo": null,538 "Category": 4,539 "ShortName": "董事",540 "Count": 0,541 "Level": 0,542 "Children": null543 }, {544 "name": "芮政先",545 "KeyNo": null,546 "Category": 4,547 "ShortName": "监事",548 "Count": 0,549 "Level": 0,550 "Children": null551 }, {552 "name": "宋春风",553 "KeyNo": null,554 "Category": 4,555 "ShortName": "监事",556 "Count": 0,557 "Level": 0,558 "Children": null559 }, {560 "name": "李林",561 "KeyNo": null,562 "Category": 4,563 "ShortName": "监事",564 "Count": 0,565 "Level": 0,566 "Children": null567 }, {568 "name": "程峰",569 "KeyNo": null,570 "Category": 4,571 "ShortName": "监事",572 "Count": 0,573 "Level": 0,574 "Children": null575 }, {576 "name": "吴红伟",577 "KeyNo": null,578 "Category": 4,579 "ShortName": "监事",580 "Count": 0,581 "Level": 0,582 "Children": null583 }, {584 "name": "沈铁冬",585 "KeyNo": null,586 "Category": 4,587 "ShortName": "董事",588 "Count": 0,589 "Level": 0,590 "Children": null591 }, {592 "name": "余莉萍",593 "KeyNo": null,594 "Category": 4,595 "ShortName": "董事",596 "Count": 0,597 "Level": 0,598 "Children": null599 }, {600 "name": "肖遂宁",601 "KeyNo": null,602 "Category": 4,603 "ShortName": "董事",604 "Count": 0,605 "Level": 0,606 "Children": null607 }, {608 "name": "张新玫",609 "KeyNo": null,610 "Category": 4,611 "ShortName": "董事",612 "Count": 0,613 "Level": 0,614 "Children": null615 }, {616 "name": "陈斌",617 "KeyNo": null,618 "Category": 4,619 "ShortName": "董事",620 "Count": 0,621 "Level": 0,622 "Children": null623 }, {624 "name": "陈辉峰",625 "KeyNo": null,626 "Category": 4,627 "ShortName": "监事",628 "Count": 0,629 "Level": 0,630 "Children": null631 }, {632 "name": "冯仑",633 "KeyNo": null,634 "Category": 4,635 "ShortName": "董事",636 "Count": 0,637 "Level": 0,638 "Children": null639 }, {640 "name": "刘志敏",641 "KeyNo": null,642 "Category": 4,643 "ShortName": "董事",644 "Count": 0,645 "Level": 0,646 "Children": null647 }, {648 "name": "王美娟",649 "KeyNo": null,650 "Category": 4,651 "ShortName": "监事",652 "Count": 0,653 "Level": 0,654 "Children": null655 }]656 }, {657 "name": "历史股东",658 "KeyNo": null,659 "Category": 8,660 "ShortName": "历史股东",661 "Count": 0,662 "Level": 0,663 "Children": null664 }, {665 "name": "历史法人",666 "KeyNo": null,667 "Category": 9,668 "ShortName": "历史法人",669 "Count": 1,670 "Level": 0,671 "Children": [{672 "name": "王开国",673 "KeyNo": null,674 "Category": 9,675 "ShortName": null,676 "Count": 0,677 "Level": 0,678 "Children": null679 }]680 }, {681 "name": "裁判文书",682 "KeyNo": null,683 "Category": 6,684 "ShortName": "裁判文书",685 "Count": 29,686 "Level": 0,687 "Children": [{688 "name": "河北百盛律师事务所",689 "KeyNo": "w24ce750b40e7a70e0d22a4ac9518708",690 "Category": 6,691 "ShortName": "海通证券",692 "Count": 0,693 "Level": 0,694 "Children": null695 }, {696 "name": "海通证券股份有限公司西安西新街证券营业部",697 "KeyNo": "8113bdda7e9f33ac995338a40387f0e3",698 "Category": 6,699 "ShortName": "海通证券",700 "Count": 0,701 "Level": 0,702 "Children": null703 }, {704 "name": "黑龙江省盛恒基房地产开发集团有限责任公司",705 "KeyNo": "854ebb143bba939284295da846cf1972",706 "Category": 6,707 "ShortName": "海通证券",708 "Count": 0,709 "Level": 0,710 "Children": null711 }, {712 "name": "海通证券股份有限公司绍兴劳动路证券营业部",713 "KeyNo": "e3de61d8b3f7b37af3f539fadc54368a",714 "Category": 6,715 "ShortName": "海通证券",716 "Count": 0,717 "Level": 0,718 "Children": null719 }, {720 "name": "海通证券有限公司",721 "KeyNo": "34b176fab493cb533c9868fc114ab9cf",722 "Category": 6,723 "ShortName": "海通证券",724 "Count": 0,725 "Level": 0,726 "Children": null727 }, {728 "name": "上海国泰君安证券资产管理有限公司",729 "KeyNo": "6262ee34e9ddd285812f52d66a3d5ae3",730 "Category": 6,731 "ShortName": "海通证券",732 "Count": 0,733 "Level": 0,734 "Children": null735 }, {736 "name": "辽宁欣泰股份有限公司",737 "KeyNo": "69ce27fe94bdd779b12f075e6e723fe6",738 "Category": 6,739 "ShortName": "海通证券",740 "Count": 0,741 "Level": 0,742 "Children": null743 }, {744 "name": "上海著清商务咨询有限公司",745 "KeyNo": "cbe0be0a816573e8948d53bf680c6709",746 "Category": 6,747 "ShortName": "海通证券",748 "Count": 0,749 "Level": 0,750 "Children": null751 }, {752 "name": "海通证券股份有限公司新余劳动南路证券营业部",753 "KeyNo": "6cb3040322d7acbc8bea4d4543bfe8a2",754 "Category": 6,755 "ShortName": "海通证券",756 "Count": 0,757 "Level": 0,758 "Children": null759 }, {760 "name": "上海苏宁云商销售有限公司",761 "KeyNo": "553977322a4266555452e568a24cf045",762 "Category": 6,763 "ShortName": "海通证券",764 "Count": 0,765 "Level": 0,766 "Children": null767 }, {768 "name": "吉林昊融集团股份有限公司",769 "KeyNo": "08853b65ebb39abaf86d0393f5852c15",770 "Category": 6,771 "ShortName": "海通证券",772 "Count": 0,773 "Level": 0,774 "Children": null775 }, {776 "name": "中投信用担保有限公司",777 "KeyNo": "0e713b9512d878ead20036b7e0832d28",778 "Category": 6,779 "ShortName": "海通证券",780 "Count": 0,781 "Level": 0,782 "Children": null783 }, {784 "name": "海通证券股份有限公司福州广达路证券营业部",785 "KeyNo": "edb841da32a9c85117085856ddf88753",786 "Category": 6,787 "ShortName": "海通证券",788 "Count": 0,789 "Level": 0,790 "Children": null791 }, {792 "name": "海通证券股份有限公司营口辽河大街证券营业部",793 "KeyNo": "bba8c820f4b941ed04f3024a055238d1",794 "Category": 6,795 "ShortName": "海通证券",796 "Count": 0,797 "Level": 0,798 "Children": null799 }, {800 "name": "海通证券股份有限公司上海普陀区宜川路证券营业部",801 "KeyNo": "a0561ea3366f8d72dbacafd218224868",802 "Category": 6,803 "ShortName": "海通证券",804 "Count": 0,805 "Level": 0,806 "Children": null807 }, {808 "name": "上海海通证券资产管理有限公司",809 "KeyNo": "2dc36c7a5f117488be2adee032f5c770",810 "Category": 6,811 "ShortName": "海通证券",812 "Count": 0,813 "Level": 0,814 "Children": null815 }, {816 "name": "海通证券股份有限公司深圳分公司红岭中路证券营业部",817 "KeyNo": "f02c6e9d56e8aa59146123504d606cc7",818 "Category": 6,819 "ShortName": "海通证券",820 "Count": 0,821 "Level": 0,822 "Children": null823 }, {824 "name": "武汉建工第三建筑有限公司",825 "KeyNo": "1c7fcaffce786c65678954e184c5d89c",826 "Category": 6,827 "ShortName": "海通证券",828 "Count": 0,829 "Level": 0,830 "Children": null831 }, {832 "name": "武汉红日升餐饮有限公司",833 "KeyNo": "5edeb8ed1f67943a9f7e5ba660a00d37",834 "Category": 6,835 "ShortName": "海通证券",836 "Count": 0,837 "Level": 0,838 "Children": null839 }, {840 "name": "海通证券股份有限公司呼和浩特新华东街证券营业部",841 "KeyNo": "06e451d599b6ad92d67118da27c5a622",842 "Category": 6,843 "ShortName": "海通证券",844 "Count": 0,845 "Level": 0,846 "Children": null847 }, {848 "name": "海通证券股份有限公司福州群众路证券营业部",849 "KeyNo": "edb841da32a9c85117085856ddf88753",850 "Category": 6,851 "ShortName": "海通证券",852 "Count": 0,853 "Level": 0,854 "Children": null855 }, {856 "name": "中国银河投资管理有限公司",857 "KeyNo": "c62b2a20020f45cf30acd00680b5df28",858 "Category": 6,859 "ShortName": "海通证券",860 "Count": 0,861 "Level": 0,862 "Children": null863 }, {864 "name": "易熹(深圳)基金管理有限公司",865 "KeyNo": "cd137e7eed6cab1ce87675992f4d9eae",866 "Category": 6,867 "ShortName": "海通证券",868 "Count": 0,869 "Level": 0,870 "Children": null871 }, {872 "name": "易熹(深圳)基金管理有限公司",873 "KeyNo": "cd137e7eed6cab1ce87675992f4d9eae",874 "Category": 6,875 "ShortName": "海通证券",876 "Count": 0,877 "Level": 0,878 "Children": null879 }, {880 "name": "海通证券股份有限公司深圳分公司",881 "KeyNo": "3d40214923e321c47afdb5ff7c94bbb3",882 "Category": 6,883 "ShortName": "海通证券",884 "Count": 0,885 "Level": 0,886 "Children": null887 }, {888 "name": "上海花神百货商店",889 "KeyNo": "d9ac6748de89e4d228ba311b3402820c",890 "Category": 6,891 "ShortName": "海通证券",892 "Count": 0,893 "Level": 0,894 "Children": null895 }, {896 "name": "上海世茂股份有限公司",897 "KeyNo": "fdf7152d4fdbed7e20073111380ab099",898 "Category": 6,899 "ShortName": "海通证券",900 "Count": 0,901 "Level": 0,902 "Children": null903 }, {904 "name": "武汉市住房保障和房屋管理局",905 "KeyNo": "g41549c2201cb46a7e190274d9e15c93",906 "Category": 6,907 "ShortName": "海通证券",908 "Count": 0,909 "Level": 0,910 "Children": null911 }, {912 "name": "武汉瑞发房地产开发有限公司",913 "KeyNo": "6f6707446f97ea5fa1b73e53056d598a",914 "Category": 6,915 "ShortName": "海通证券",916 "Count": 0,917 "Level": 0,918 "Children": null919 }]920 }, {921 "name": "法院公告",922 "KeyNo": null,923 "Category": 5,924 "ShortName": "法院公告",925 "Count": 1,926 "Level": 0,927 "Children": [{928 "name": "威海赛文贸易有限公司",929 "KeyNo": "6c24f8e33c4e06a101e19f34056ab406",930 "Category": 5,931 "ShortName": "赛文贸易",932 "Count": 0,933 "Level": 0,934 "Children": null935 }]936 }]937 }938 }939 }...

Full Screen

Full Screen

help-center.js

Source:help-center.js Github

copy

Full Screen

1import LF from 'LF';2import Vue from 'vue';3//引入公共的header和footer4import LfHeader from '../../../components/header_new.vue';5import LfFooter from '../../../components/footer.vue';6import LfSearch from '../../../components/search.vue';7import {Message, Card,Carousel,CarouselItem,Tree,Select,Button} from 'element-ui' ;8Vue.use(Card)9Vue.use(Carousel)10Vue.use(CarouselItem)11Vue.use(Tree)12Vue.use(Select)13Vue.use(Button)14new Vue({15 el: '#app',16 data: {17 searchStr:'', 18 show:false,19 introduce:false, //关于蓝山20 management:false, //经营理念21 recruit:false, //招贤纳士22 aboutMarket:false, //关于袋鼠集市23 integral:false, //通用积分24 understandInt:false, //了解积分25 intRule:false, //积分规则26 distribution:false, //会员分享消费27 settled:false, //商家入驻28 user:false, //用户29 vip:false, //分销会员30 shop:false, //商户31 operate:false, //运营中心32 opipion:false, //意见建议33 registration:false, //用户注册协议34 privacy:false, //隐私政策35 contactUS:false, //联系我们36 customer:false, //客服服务37 helpMsg: [{38 label: '关于我们',39 children: [{40 label: '>关于蓝山集势', 41 },{42 label: '>经营理念',43 },{44 label: '>招贤纳士',45 }]46 },{47 label: '袋鼠集市',48 children: [{49 label: '>关于袋鼠集市', 50 },{51 label: '>通用积分',52 },{53 label: '>了解积分',54 },{55 label: '>积分规则',56 },{57 label: '>会员分享消费',58 },{59 label: '>商家入驻',60 }]61 },{62 label: '合作推广',63 children: [{64 label: '>用户', 65 },{66 label: '>分销会员',67 },{68 label: '>商户',69 },{70 label: '>运营中心',71 }]72 },{73 label: '意见反馈',74 children: [{75 label: '>意见建议', 76 },{77 label: '>用户注册协议',78 },{79 label: '>隐私政策',80 }]81 },{82 label: '联系我们',83 children: [{84 label: '>联系我们', 85 },{86 label: '>客服服务',87 }]88 }], 89 defaultProps: {90 children: 'children',91 label: 'label'92 } 93 },94 methods: {95 handleNodeClick(data,node,item) {console.log(data,node,item,'-------------------------------------------------------------------------------------------------');96 //所有tree元素97 // var tree = document.getElementsByClassName('el-tree');console.log(tree,'tree=============');98 // //关于我们99 // var about = document.getElementById('about');console.log(about,typeof(about),about instanceof Object)100 // var abNodes = about.getElementsByClassName('el-tree-node');console.log(abNodes)101 // //袋鼠集市102 // var market = document.getElementById('market');console.log(market)103 // var maNodes = market.getElementsByClassName('el-tree-node');console.log(maNodes)104 // //合作推广105 // var cooperation = document.getElementById('cooperation');console.log(cooperation)106 // var coNodes = cooperation.getElementsByClassName('el-tree-node');console.log(coNodes)107 // //意见反馈108 // var opinion = document.getElementById('opinion');console.log(opinion)109 // var opNodes = opinion.getElementsByClassName('el-tree-node');console.log(abNodes)110 // //联系我们111 // var contact = document.getElementById('contact');console.log(contact)112 // var coNodes = contact.getElementsByClassName('el-tree-node');console.log(coNodes,'------------------------------------->') 113 // node.parent.childNodes.forEach(function(item,index){114 // if(data.label == item.data.label ){115 // console.log(item,data.label,index);116 // if(node.parent.data.label == '关于我们'){ console.log(abNodes[index+1],'关于我们')117 // console.log(abNodes[index+1].innerText) 118 // }else if (node.parent.data.label == '袋鼠集市') { console.log(maNodes[index+1])119 120 // }121 // }122 // });123 124 125 // console.log(about.getElementsByClassName('el-tree-node__content')[0],123)126 // console.log(this);127 // this.show = true;128 if(data.label == ">关于蓝山集势"){this.introduce = true;this.$refs.tree.$children[0].$children[1].$el.style.color= '#f37e01';}else{this.introduce = false;this.$refs.tree.$children[0].$children[1].$el.style.color= ''};129 if(data.label == ">经营理念"){this.management = true;this.$refs.tree.$children[0].$children[2].$el.style.color= '#f37e01';}else{this.management = false;this.$refs.tree.$children[0].$children[2].$el.style.color= ''}; 130 if(data.label == ">招贤纳士"){this.recruit = true;this.$refs.tree.$children[0].$children[3].$el.style.color= '#f37e01';}else{this.recruit = false;this.$refs.tree.$children[0].$children[3].$el.style.color= ''};131 if(data.label == ">关于袋鼠集市"){this.aboutMarket = true;this.$refs.tree.$children[1].$children[1].$el.style.color= '#f37e01';}else{this.aboutMarket = false;this.$refs.tree.$children[1].$children[1].$el.style.color= '';};132 if(data.label == ">通用积分"){this.integral = true;this.$refs.tree.$children[1].$children[2].$el.style.color= '#f37e01';}else{this.integral = false;this.$refs.tree.$children[1].$children[2].$el.style.color= '';};133 if(data.label == ">了解积分"){this.understandInt = true;this.$refs.tree.$children[1].$children[3].$el.style.color= '#f37e01';}else{this.understandInt = false;this.$refs.tree.$children[1].$children[3].$el.style.color= '';};134 if(data.label == ">积分规则"){this.intRule = true;this.$refs.tree.$children[1].$children[4].$el.style.color= '#f37e01';}else{this.intRule = false;this.$refs.tree.$children[1].$children[4].$el.style.color= '';};135 if(data.label == ">会员分享消费"){this.distribution = true;this.$refs.tree.$children[1].$children[5].$el.style.color= '#f37e01';}else{this.distribution = false;this.$refs.tree.$children[1].$children[5].$el.style.color= '';};136 if(data.label == ">商家入驻"){this.settled = true;this.$refs.tree.$children[1].$children[6].$el.style.color= '#f37e01';}else{this.settled = false;this.$refs.tree.$children[1].$children[6].$el.style.color= '';};137 if(data.label == ">用户"){this.user = true;this.$refs.tree.$children[2].$children[1].$el.style.color= '#f37e01';}else{this.user = false;this.$refs.tree.$children[2].$children[1].$el.style.color= '';};138 if(data.label == ">分销会员"){this.vip = true;this.$refs.tree.$children[2].$children[2].$el.style.color= '#f37e01';}else{this.vip = false;this.$refs.tree.$children[2].$children[2].$el.style.color= '';};139 if(data.label == ">商户"){this.shop = true;this.$refs.tree.$children[2].$children[3].$el.style.color= '#f37e01';}else{this.shop = false;this.$refs.tree.$children[2].$children[3].$el.style.color= '';};140 if(data.label == ">运营中心"){this.operate = true;this.$refs.tree.$children[2].$children[4].$el.style.color= '#f37e01';}else{this.operate = false;this.$refs.tree.$children[2].$children[4].$el.style.color= '';};141 if(data.label == ">意见建议"){this.opipion = true;this.$refs.tree.$children[3].$children[1].$el.style.color= '#f37e01'}else{this.opipion = false;this.$refs.tree.$children[3].$children[1].$el.style.color= ''};142 if(data.label == ">用户注册协议"){this.registration = true;this.$refs.tree.$children[3].$children[2].$el.style.color= '#f37e01'}else{this.registration = false;this.$refs.tree.$children[3].$children[2].$el.style.color= ''};143 if(data.label == ">隐私政策"){this.privacy = true;this.$refs.tree.$children[3].$children[3].$el.style.color= '#f37e01'}else{this.privacy = false;this.$refs.tree.$children[3].$children[3].$el.style.color= ''};144 if(data.label == ">联系我们"){this.contactUS = true;this.$refs.tree.$children[4].$children[1].$el.style.color= '#f37e01'}else{this.contactUS = false;this.$refs.tree.$children[4].$children[1].$el.style.color= ''};145 if(data.label == ">客服服务"){this.customer = true;this.$refs.tree.$children[4].$children[2].$el.style.color= '#f37e01'}else{this.customer = false;this.$refs.tree.$children[4].$children[2].$el.style.color= ''};146 },147 getName:function(name){'>'+name148 if('>'+name == ">关于蓝山集势"){this.introduce = true;this.$refs.tree.$children[0].node.expanded = true;this.$refs.tree.$children[0].$children[1].$el.style.color= '#f37e01';}else{this.aboutMarket = false;this.$refs.tree.$children[1].$children[1].$el.style.color= '';};149 if('>'+name == ">经营理念"){this.management = true;this.$refs.tree.$children[0].node.expanded = true;this.$refs.tree.$children[0].$children[2].$el.style.color= '#f37e01';}else{this.management = false;this.$refs.tree.$children[0].$children[2].$el.style.color= ''}; 150 if('>'+name == ">招贤纳士"){this.recruit = true;this.$refs.tree.$children[0].node.expanded = true;this.$refs.tree.$children[0].$children[3].$el.style.color= '#f37e01';}else{this.recruit = false;this.$refs.tree.$children[0].$children[3].$el.style.color= ''};151 if('>'+name == ">关于袋鼠集市"){this.aboutMarket = true;this.$refs.tree.$children[1].node.expanded = true;this.$refs.tree.$children[1].$children[1].$el.style.color= '#f37e01';}else{this.aboutMarket = false;this.$refs.tree.$children[1].$children[1].$el.style.color= '';};152 if('>'+name == ">通用积分"){this.integral = true;this.$refs.tree.$children[1].node.expanded = true;this.$refs.tree.$children[1].$children[2].$el.style.color= '#f37e01';}else{this.integral = false;this.$refs.tree.$children[1].$children[2].$el.style.color= '';};153 if('>'+name == ">了解积分"){this.understandInt = true;this.$refs.tree.$children[1].node.expanded = true;this.$refs.tree.$children[1].$children[3].$el.style.color= '#f37e01';}else{this.understandInt = false;this.$refs.tree.$children[1].$children[3].$el.style.color= '';};154 if('>'+name == ">积分规则"){this.intRule = true;this.$refs.tree.$children[1].node.expanded = true;this.$refs.tree.$children[1].$children[4].$el.style.color= '#f37e01';}else{this.intRule = false;this.$refs.tree.$children[1].$children[4].$el.style.color= '';};155 if('>'+name == ">会员分享消费"){this.distribution = true;this.$refs.tree.$children[1].node.expanded = true;this.$refs.tree.$children[1].$children[5].$el.style.color= '#f37e01';}else{this.distribution = false;this.$refs.tree.$children[1].$children[5].$el.style.color= '';};156 if('>'+name == ">商家入驻"){this.settled = true;this.$refs.tree.$children[1].node.expanded = true;this.$refs.tree.$children[1].$children[6].$el.style.color= '#f37e01';}else{this.settled = false;this.$refs.tree.$children[1].$children[6].$el.style.color= '';};157 if('>'+name == ">用户"){this.user = true;this.$refs.tree.$children[2].node.expanded = true;this.$refs.tree.$children[2].$children[1].$el.style.color= '#f37e01';}else{this.user = false;this.$refs.tree.$children[2].$children[1].$el.style.color= '';};158 if('>'+name == ">分销会员"){this.vip = true;this.$refs.tree.$children[2].node.expanded = true;this.$refs.tree.$children[2].$children[2].$el.style.color= '#f37e01';}else{this.vip = false;this.$refs.tree.$children[2].$children[2].$el.style.color= '';};159 if('>'+name == ">商户"){this.shop = true;this.$refs.tree.$children[2].node.expanded = true;this.$refs.tree.$children[2].$children[3].$el.style.color= '#f37e01';}else{this.shop = false;this.$refs.tree.$children[2].$children[3].$el.style.color= '';};160 if('>'+name == ">运营中心"){this.operate = true;this.$refs.tree.$children[2].node.expanded = true;this.$refs.tree.$children[2].$children[4].$el.style.color= '#f37e01';}else{this.operate = false;this.$refs.tree.$children[2].$children[4].$el.style.color= '';};161 if('>'+name == ">意见建议"){this.opipion = true;this.$refs.tree.$children[3].node.expanded = true;this.$refs.tree.$children[3].$children[1].$el.style.color= '#f37e01'}else{this.opipion = false;this.$refs.tree.$children[3].$children[1].$el.style.color= ''};162 if('>'+name == ">用户注册协议"){this.registration = true;this.$refs.tree.$children[3].node.expanded = true;this.$refs.tree.$children[3].$children[2].$el.style.color= '#f37e01'}else{this.registration = false;this.$refs.tree.$children[3].$children[2].$el.style.color= ''};163 if('>'+name == ">隐私政策"){this.privacy = true;this.$refs.tree.$children[3].node.expanded = true;this.$refs.tree.$children[3].$children[3].$el.style.color= '#f37e01'}else{this.privacy = false;this.$refs.tree.$children[3].$children[3].$el.style.color= ''};164 if('>'+name == ">联系我们"){this.contactUS = true;this.$refs.tree.$children[4].node.expanded = true;this.$refs.tree.$children[4].$children[1].$el.style.color= '#f37e01'}else{this.contactUS = false;this.$refs.tree.$children[4].$children[1].$el.style.color= ''};165 if('>'+name == ">客服服务"){this.customer = true;this.$refs.tree.$children[4].node.expanded = true;this.$refs.tree.$children[4].$children[2].$el.style.color= '#f37e01'; }else{this.customer = false;this.$refs.tree.$children[4].$children[2].$el.style.color= ''};166 167 },168 check(q,w,e){169 console.log(q,w,e)170 },171 isShow:function(){172 alert(123)173 },174 remove:function(store, data) { 175 store.remove(data); 176 }, 177 renderContent:function(createElement, { node, data, store }) { 178 var self = this; 179 return createElement('span', [ 180 createElement('span', node.label), 181 createElement('span', {attrs:{ 182 style:"float: right; margin-right: 20px" 183 }},[ 184 createElement('el-button',{attrs:{ 185 size:"mini" 186 },on:{ 187 click:function() { 188 console.info("点击了节点" + data.id + "的添加按钮"); 189 store.append({ id: self.baseId++, label: 'testtest', children: [] }, data); 190 } 191 }},"添加"), 192 createElement('el-button',{attrs:{ 193 size:"mini" 194 },on:{ 195 click:function() { 196 console.info("点击了节点" + data.id + "的删除按钮"); 197 store.remove(data); 198 } 199 }},"删除"), 200 ]), 201 ]); 202 } ,203 closeService(){204 var mapEle = document.getElementById("Map");205 var parentEle = mapEle.parentNode;206 parentEle.style.display = "none";207 },208 onlineSale(){209 LF.net.getJSON("sys/after/sale", {}, function(res) {210 var href="";211 if(res.code==='000'){212 //href = "http://wpa.qq.com/msgrd?v=3&uin="+res.data.qq+"&site=qq&menu=yes";213 href="tencent://message/?uin="+res.data.qq+"&Site=qq&Menu=yes"214 window.open(href);215 }else{216 console.log(res.errorMessage);217 }218 });219 },220 go(url) {221 LF.window.openWindow(url);222 },223 doSearch(){224 if (this.searchStr == ''){225 Message({226 type: 'warning',227 message:"请输入门牌号!"228 });229 return;230 }231 LF.net.getJSON("/store/data/details", { houseNumber:this.searchStr }, res => {232 if(res.code == "000") {233 let storeId = res.data.id;234 if (storeId == ''){235 Message({236 type: 'warning',237 message:"未找到对应的实体店,请重新输入!"238 });239 return;240 }241 LF.window.openWindow("/app/pages/store/storeshop.html?houseNumber="+this.searchStr + "&merchantId=" + storeId,"_self");242 } else {243 Message({244 type: 'warning',245 message:"未找到对应的实体店,请重新输入!"246 });247 }248 }, res => {249 Message({250 type: 'error',251 message:res.errorMessage252 });253 console.log("error:" + JSON.stringify(res));254 });255 }, 256 },257 beforeMount(){258 },259 mounted() {console.log(location.href)260 var name = location.hash.replace('#','');console.log(name,5555);console.log(this.$refs.tree,147);261 name = decodeURI(name);console.log(name,666) 262 this.getName(name);263 264 console.log(this.$refs.tree.$children[0].$children[1].$el);265 // this.$refs.tree.$children[0].$children[1].$el.style.color = 'red';266 // this.$refs.tree.$children[0].$children[1].$el.setAttribute('class', 'active');267 },268components: {269 LfHeader,270 LfSearch,271 LfFooter272},...

Full Screen

Full Screen

sense.js

Source:sense.js Github

copy

Full Screen

1//keyCode 值 左上右下 37--402let people = document.querySelector("#people");3let sense_one = document.querySelector(".sense_one"); // 场景一4let sense_two = document.querySelector(".sense_two"); // 场景二5let sense_three = document.querySelector(".sense_three"); // 场景三6let sense_four = document.querySelector(".sense_four"); // 场景四7let is_sense_two = false; // 是否解锁场景二8let is_sense_three = false; // 是否解锁场景三9let is_sense_four = false; // 是否解锁场景四10let is_left = false; // 是否可以往左边查看前面的场景11let isMove = {12 left: "false",13 top: "false",14 right: "false",15 bottom: "false"16};17// 一开始场景二,三,四隐藏18sense_two.classList.add("displayNone");19sense_three.classList.add("displayNone");20sense_four.classList.add("displayNone");21// alert(people.offsetWidth);22document.onkeydown = function(ev) {23 var ev = ev || event;24 if (ev.keyCode == 37) {25 isMove["left"] = true;26 }27 if (ev.keyCode == 38) {28 isMove["top"] = true;29 }30 if (ev.keyCode == 39) {31 isMove["right"] = true;32 }33 if (ev.keyCode == 40) {34 isMove["bottom"] = true;35 }36};37document.onkeyup = function() {38 var ev = ev || event;39 if (ev.keyCode == 37) {40 isMove["left"] = false;41 }42 if (ev.keyCode == 38) {43 isMove["top"] = false;44 }45 if (ev.keyCode == 39) {46 isMove["right"] = false;47 }48 if (ev.keyCode == 40) {49 isMove["bottom"] = false;50 }51};52// currentPage当前用户在看哪一页53let currentPage = 1;54// 初始化第一场景的样式55sense_one_init();56setInterval(function() {57 if (isMove["left"] == true) {58 let left = people.getBoundingClientRect().left; // 元素距离左边的距离59 if (left <= 0) {60 if (is_left == true && currentPage == 4) {61 currentPage = 3;62 removeDisplay(sense_four);63 sense_four.classList.add("displayNone");64 sense_three.classList.add("displayBlock"); //显示场景三65 removeAnimation(sense_three);66 sense_three.classList.add("animationRight");67 // sense_three.style.left = 0; //显示场景三68 } else if (is_left == true && currentPage == 3) {69 currentPage = 2;70 removeDisplay(sense_three);71 sense_three.classList.add("displayNone");72 sense_two.classList.add("displayBlock"); //显示场景二73 removeAnimation(sense_two);74 sense_two.classList.add("animationRight");75 // sense_two.style.left = 0; //显示场景二76 } else if (is_left == true && currentPage == 2) {77 currentPage = 1;78 removeDisplay(sense_two);79 sense_two.classList.add("displayNone");80 sense_one.classList.add("displayBlock"); //显示场景一81 //显示场景一82 removeAnimation(sense_one);83 sense_one.classList.add("animationRight");84 }85 people.style.left = window.innerWidth - people.offsetWidth + "px"; // 左边滑块滑到最左边,重置为右边86 } else {87 people.style.left = people.offsetLeft - 10 + "px";88 }89 }90 // if (isMove["top"] == true) {91 // let top = people.getBoundingClientRect().top;92 // people.style.top = people.offsetTop - 10 + "px";93 // }94 if (isMove["right"] == true) {95 console.log(currentPage);96 let right = people.getBoundingClientRect().right; // 元素距离右边的距离97 // let activityDistance = window.innerWidth - people.offsetWidth; // 可移动距离98 // 判断是否达到最右端99 if (right >= window.innerWidth) {100 people.style.left = people.offsetWidth + "px";101 is_sense_two = true; // 开启场景二102 if (is_sense_two == true && currentPage == 1) {103 // 如果是第一场景而且是从右边过去的就是切换第二场景104 currentPage = 2;105 // 移除场景一106 removeAnimation(sense_one);107 sense_one.classList.add("animationLeft");108 sense_two.classList.remove("displayNone");109 sense_two.classList.add("displayBlock");110 // 执行场景二的样式111 excutedAnimationTwo( 112 sense_two.children[0].children[0],113 sense_two.children[0].children[1],114 sense_two.children[1].children[0].children[0].children[0],115 sense_two.children[1].children[0].children[1],116 sense_two.children[1].children[0].children[1].children[3].children[0],117 sense_two.children[1].children[0].children[1].children[3].children[1],118 sense_two.children[1].children[0].children[1].children[3].children[2],119 sense_two.children[1].children[1].children[0].children[0],120 sense_two.children[1].children[1].children[1],121 sense_two.children[1].children[1].children[1].children[3].children[0],122 sense_two.children[1].children[1].children[1].children[3].children[1],123 sense_two.children[1].children[1].children[1].children[3].children[2],124 sense_two.children[1].children[2].children[0].children[0],125 sense_two.children[1].children[2].children[1],126 sense_two.children[1].children[2].children[1].children[3].children[0],127 sense_two.children[1].children[2].children[1].children[3].children[1],128 sense_two.children[1].children[2].children[1].children[3].children[2]129 );130 is_sense_three = true; // 开启场景三131 // is_left = true; // 可以查看之前的场景132 } else if (is_sense_three == true && currentPage == 2) {133 // 当前页是2且是解锁了场景三134 currentPage = 3; // 当前页是3135 // sense_two.style.left = "-5000px"; // 移除场景二136 removeAnimation(sense_two);137 sense_two.classList.add("animationLeft");138 sense_three.classList.remove("displayNone"); // 有这个样式首先移除139 sense_three.classList.add("displayBlock"); // 显示场景三140 // 依次执行第三场景的样式141 excutedAnimationThree(142 sense_three.children[1].children[0],143 sense_three.children[1].children[2],144 sense_three.children[1].children[1],145 sense_three.children[1].children[1].children[0].children[0].children[1],146 sense_three.children[1].children[1].children[0].children[0].children[0],147 sense_three.children[1].children[1].children[0].children[1].children[1],148 sense_three.children[1].children[1].children[0].children[1].children[0],149 sense_three.children[1].children[1].children[0].children[2].children[1],150 sense_three.children[1].children[1].children[0].children[2].children[0],151 sense_three.children[1].children[1].children[0].children[3].children[1],152 sense_three.children[1].children[1].children[0].children[3].children[0],153 sense_three.children[1].children[1].children[0].children[4].children[1],154 sense_three.children[1].children[1].children[0].children[4].children[0],155 sense_three.children[1].children[1].children[0].children[5].children[1],156 sense_three.children[1].children[1].children[0].children[5].children[0],157 sense_three.children[1].children[1].children[0].children[6].children[1],158 sense_three.children[1].children[1].children[0].children[6].children[0]159 ); 160 is_sense_four = true; // 开启场景四161 } else if (is_sense_four == true && currentPage == 3) {162 // 当前页是3且是解锁了场景四163 sense_three.style.left = "-5000px"; // 移除场景三164 removeAnimation(sense_three);165 sense_three.classList.add("animationLeft");166 removeDisplay(sense_four);167 sense_four.classList.add("displayBlock"); // 显示场景四168 currentPage = 4; //当前页是第4169 }170 } else {171 people.style.left = people.offsetLeft + 10 + "px";172 }173 }174 // if (isMove["bottom"] == true) {175 // people.style.top = people.offsetTop + 10 + "px";176 // }177}, 30);178// 第一场景的样式179function sense_one_init() {180 console.log(sense_one.children[1].children[2]);181 // 一开始隐藏所有的元素182 sense_one.children[0].children[1].classList.add("displayNone"); // 关于我的挂牌183 sense_one.children[1].children[0].children[0].classList.add("displayNone"); // 标签一184 sense_one.children[1].children[0].children[1].classList.add("displayNone"); // 标签二185 sense_one.children[1].children[1].children[0].classList.add("displayNone"); // 标签三186 sense_one.children[1].children[1].children[1].classList.add("displayNone"); // 标签四187 sense_one.children[1].children[2].classList.add("opacity0"); // 标签五188 sense_one.children[0].children[0].classList.add("lineAnimation"); // 页面一打开就添加线条样式189 sense_one.children[0].children[0].addEventListener(190 "animationend",191 function() {192 // 线条动画结束title出来193 display(sense_one.children[0].children[1]);194 excutedAnimation(195 sense_one.children[1].children[0].children[0],196 sense_one.children[1].children[0].children[1],197 sense_one.children[1].children[1].children[0],198 sense_one.children[1].children[1].children[1],199 sense_one.children[1].children[2]200 );201 }202 );203 sense_one.children[0].children[1].addEventListener(204 "animationend",205 function() {206 display(sense_one.children[1].children[0].children[0]); // 把挂牌显示出来207 }208 );209}210function removeDisplay(obj) {211 // 删除场景原有的样式212 if (obj.className.indexOf("displayNone") > -1) {213 obj.classList.remove("displayNone"); // 有这个样式首先移除214 }215 if (obj.className.indexOf("displayBlock") > -1) {216 obj.classList.remove("displayBlock");217 }218}219function removeAnimation(obj) { // 移除场景之前的动画220 if (obj.className.indexOf("animationLeft") > -1) {221 obj.classList.remove("animationLeft");222 }223 if (obj.className.indexOf("animationRight") > -1) {224 obj.classList.remove("animationRight");225 }226}227function display(obj) { // 显示标签出来228 let classs = obj.getAttribute("class").replace("displayNone", "displayBlock");229 obj.setAttribute("class", classs);230}231function addAnimation(obj,animation) { // 添加动画232 obj.classList.add(animation);233}234 // 异步执行每帧动画(第一场景)235async function excutedAnimation(label1,label2,label3,label4,label5) {236 new Promise(resolve=>{237 display(label1); // 把标签一显示出来238 addAnimation(label1,'leftIn'); // 给第一个标签添加动画239 label1.addEventListener('animationend',function(){240 resolve('ok');241 });242 }).then(resolve => {243 display(label2); // 把标签二显示出来244 addAnimation(label2,'rightIn'); // 把第二个标签添加动画245 label2.addEventListener('animationend',function(){246 display(label3); // 把标签三显示出来247 addAnimation(label3, 'leftIn'); // 把第三个标签添加动画248 label3.addEventListener('animationend', function () {249 display(label4); // 把标签四显示出来250 addAnimation(label4, 'rightIn'); // 把第四个标签添加动画251 label4.addEventListener('animationend',function(){252 let classs = label5.getAttribute("class").replace("opacity0", "opacity1");253 label5.setAttribute("class", classs);254 });255 });256 });257 })258}259// 异步执行每帧动画(第二场景)260async function excutedAnimationTwo261(line,262 title,263 lable1_line,264 label1_content,265 label1_content_star1,266 label1_content_star2,267 label1_content_star3,268 label2_line,269 label2_content,270 label2_content_star1,271 label2_content_star2,272 label2_content_star3,273 label3_line,274 label3_content,275 label3_content_star1,276 label3_content_star2,277 label3_content_star3278 ){279 new Promise(resolve => {280 // 一开始隐藏我的挂牌281 title.classList.add("displayNone");282 // 线条动画283 addAnimation(line, 'lineAnimation');284 line.addEventListener('animationend', function () {285 // 挂牌显示出来并添加动画286 removeDisplay(title);287 addAnimation(title,'content');288 resolve('ok');289 });290 }).then(res=>{291 addAnimation(lable1_line, 'animationLineFormLeft');292 lable1_line.addEventListener('animationend',function(){293 addAnimation(label1_content,'opacity11');294 addAnimation(label1_content_star1, 'animationStarMoveLeft');295 addAnimation(label1_content_star2, 'animationStarMoveRight');296 addAnimation(label1_content_star3, 'animationStarMoveLeft');297 label1_content.addEventListener('animationend',function(){298 addAnimation(label2_line,'animationLineFormRight');299 addAnimation(label2_content_star1, 'animationStarMoveLeft');300 addAnimation(label2_content_star2, 'animationStarMoveRight');301 addAnimation(label2_content_star3, 'animationStarMoveLeft');302 label2_line.addEventListener('animationend',function(){303 addAnimation(label2_content, 'opacity11');304 label2_content.addEventListener('animationend',function(){305 addAnimation(label3_line,'animationLineFormLeft');306 addAnimation(label3_content_star1, 'animationStarMoveLeft');307 addAnimation(label3_content_star2, 'animationStarMoveRight');308 addAnimation(label3_content_star3, 'animationStarMoveLeft');309 label3_line.addEventListener('animationend',function(){310 addAnimation(label3_content, 'opacity11');311 });312 });313 });314 });315 })316 317 })318 319 320}321// 异步执行每帧动画(第三场景)322async function excutedAnimationThree(323 left_line,324 right_line,325 language,326 label1_line,327 label1_content,328 label2_line,329 label2_content,330 label3_line,331 label3_content,332 label4_line,333 label4_content,334 label5_line,335 label5_content,336 label6_line,337 label6_content,338 label7_line,339 label7_content){340 // new Promise(resolve=>{341 addAnimation(left_line,'three_lineFormLeft');342 addAnimation(right_line, 'three_lineFormRight');343 left_line.addEventListener('animationend',function(){344 addAnimation(language, 'opacity11');345 language.addEventListener('animationend',function(){346 addAnimation(label1_line,'three_fontLine');347 label1_line.addEventListener('animationend',function(){348 addAnimation(label1_content,'opacity11');349 label1_content.addEventListener('animationend', function () {350 addAnimation(label2_line, 'three_fontLine');351 label2_line.addEventListener('animationend',function(){352 addAnimation(label2_content, 'opacity11');353 label2_content.addEventListener('animationend',function(){354 addAnimation(label3_line,'three_fontLine');355 label3_line.addEventListener('animationend',function(){356 addAnimation(label3_content,'opacity11');357 label3_content.addEventListener('animationend', function () {358 addAnimation(label4_line, 'three_fontLine');359 label4_line.addEventListener('animationend', function () {360 addAnimation(label4_content, 'opacity11');361 label4_content.addEventListener('animationend', function () {362 addAnimation(label5_line, 'three_fontLine');363 label5_line.addEventListener('animationend', function () {364 addAnimation(label5_content, 'opacity11');365 label5_content.addEventListener('animationend', function () {366 addAnimation(label6_line, 'three_fontLine');367 label6_line.addEventListener('animationend', function () {368 addAnimation(label6_content, 'opacity11');369 label6_content.addEventListener('animationend', function () {370 addAnimation(label7_line, 'three_fontLine');371 label7_line.addEventListener('animationend', function () {372 addAnimation(label7_content, 'opacity11');373 });374 })375 });376 });377 });378 });379 });380 });381 });382 });383 });384 })385 });386 });387 // resolve('ok')388 });389 // })390}391// console.log(sense_three.children[1].children[0]);392console.log(sense_three.children[1].children[1].children[0].children[0].children[0]);393// console.log(sense_two.children[1].children[2].children[1].children[3].children[1]);...

Full Screen

Full Screen

consulterClient.js

Source:consulterClient.js Github

copy

Full Screen

...41 42 43 $(".afficher").on("click", function(){44 // prendre la valeur l'id qui se trouve dans la page hidden45 var index = $(this).parent().parent().parent().children().eq(1).text();46 $(".search").each(function(){47 // each : fonctionne comme une boucle il fait la fonction dans tous les balise qui contiennent balise search48 if($(this).children().children().val() == index){49 $("#affichage").show();50 $(".000").show();51 $("#tab").hide();52 $(this).show();53 54 }else{55 $(this).hide()56 }57 })58 59 60 });61 62 $("#prev").on("click",function(){63 $("#affichage").hide();64 $("#tab").show();65 $(".000").hide();66 })67 68 69 70 71 /* 72 $("#btnClose").on("click", function(){73 $("#overlay").hide();74 })75 76 $("#btnClos").on("click", function(){77 $("#over").hide(); 78 })*/79 80 81 $(".modifier").on("click", function(){82 var index = $(this).parent().parent().parent().children().eq(1).text();83 $("#modifierCl").unbind();84 $(".update").each(function(){85 if($(this).children().children().val() == index){86 $(this).show();87 $("#mod").show();88 $("#tab").hide();89 $(".001").show();90 nom = $(this).children().eq(1).children().eq(0).children().children().eq(1).val();91 prenom = $(this).children().eq(1).children().eq(1).children().children().eq(1).val();92 email = $(this).children().eq(1).children().eq(2).children().children().eq(1).val();93 adresse = $(this).children().eq(1).children().eq(3).children().children().eq(1).val();94 municipale = $(this).children().eq(1).children().eq(4).children().children().eq(1).val();95 lieunais = $(this).children().eq(1).children().eq(5).children().children().eq(1).val();96 tel = $(this).children().eq(1).children().eq(6).children().children().eq(1).val();97 datenais = $(this).children().eq(1).children().eq(7).children().children().eq(1).val();98 emailclient = $(this).children().eq(1).children().eq(8).children().children().eq(1).val();99 password = $(this).children().eq(1).children().eq(9).children().children().eq(1).val();100 statut = $(this).children().eq(1).children().eq(10).children().children().eq(1).val();101 that = this;102 nomNV = $(that).children().eq(1).children().eq(0).children().children().eq(1);103 prenomNV = $(that).children().eq(1).children().eq(1).children().children().eq(1);104 emailNV = $(that).children().eq(1).children().eq(2).children().children().eq(1);105 adresseNV = $(that).children().eq(1).children().eq(3).children().children().eq(1);106 municipaleNV = $(that).children().eq(1).children().eq(4).children().children().eq(1);107 lieunaisNV = $(that).children().eq(1).children().eq(5).children().children().eq(1);108 telNV = $(that).children().eq(1).children().eq(6).children().children().eq(1);109 datenaisNV = $(that).children().eq(1).children().eq(7).children().children().eq(1);110 emailclientNV = $(that).children().eq(1).children().eq(8).children().children().eq(1);111 passwordNV = $(that).children().eq(1).children().eq(9).children().children().eq(1);112 statutNV = $(that).children().eq(1).children().eq(10).children().children().eq(1);113 $("input").keyup(function(){114 if(nomRegex.test(nomNV.val())==false) {nomNV.css("color","red")} else {nomNV.css("color","#333")}115 if(nomRegex.test(prenomNV.val())==false) {prenomNV.css("color","red")} else {prenomNV.css("color","#333")}116 if(emailRegex.test(emailNV.val())==false) {emailNV.css("color","red")} else {emailNV.css("color","#333")}117 if(adresseRegex.test(adresseNV.val())==false) {adresseNV.css("color","red")} else {adresseNV.css("color","#333")}118 if(adresseRegex.test(municipaleNV.val())==false) {municipaleNV.css("color","red")} else {municipaleNV.css("color","#333")}119 if(adresseRegex.test(lieunaisNV.val())==false) {lieunaisNV.css("color","red")} else {lieunaisNV.css("color","#333")}120 if(phoneRegex.test(telNV.val())==false) {telNV.css("color","red")} else {telNV.css("color","#333")}121 if(emailRegex.test(emailclientNV.val())==false) {emailclientNV.css("color","red")} else {emailclientNV.css("color","#333")}122 if(passRegex.test(passwordNV.val())==false) {passwordNV.css("color","red")} else {passwordNV.css("color","#333")}123 if(statutNV.val()!=0 && statutNV.val()!=1) {statutNV.css("color","red")} else {statutNV.css("color","#333")}124 125 })126 $("#previous").on("click",function(){127 $("#mod").hide();128 $("#tab").show();129 $(".001").hide();130 nomNV.val(nom)131 prenomNV.val(prenom)132 adresseNV.val(adresse)133 datenaisNV.val(datenais)134 emailclientNV.val(emailclient)135 emailNV.val(email)136 municipaleNV.val(municipale)137 lieunaisNV.val(lieunais)138 telNV.val(tel)139 passwordNV.val(password)140 statutNV.val(statut)141 }) 142 143 $("#modifierCl").bind("click", function(){144 if(nomRegex.test(nomNV.val()) && nomRegex.test(prenomNV.val()) && adresseRegex.test(lieunaisNV.val()) && adresseRegex.test(municipaleNV.val()) && adresseRegex.test(adresseNV.val()) && emailRegex.test(emailNV.val()) && phoneRegex.test(telNV.val()) && ( emailRegex.test(emailclientNV.val()) ) && ( passRegex.test(passwordNV.val()) ) && (statutNV.val() == 1 || statutNV.val() == 0 ) && (nomNV.val() != nom || prenomNV.val() != prenom || emailNV.val() != email || adresseNV.val() != adresse || emailclientNV.val() != emailclient || municipaleNV.val() != municipale || passwordNV.val() != password || statutNV.val()!= statut || telNV.val() != tel || lieunais != lieunaisNV.val() || datenais != datenaisNV.val()) ){145 if(confirm('voulez vous vraiment modifier les donnes')){146 $.post("ConsulterClient",{"id":index,"datenais":datenaisNV.val(),"nom":nomNV.val(),"prenom":prenomNV.val(),"email":emailNV.val(),"adresse":adresseNV.val(),"municipale":municipaleNV.val(),"lieunais":lieunaisNV.val(),"telephone":telNV.val(),"emailCl":emailclientNV.val(),"password":passwordNV.val(),"statut":statutNV.val(),"operation":"modifier"}, function(data){147 if(data==1){148 $("#mod").hide();149 $("#tab").show();150 $(".001").hide();151 $(".search").each(function(){ 152 if($(this).children().children().val() == index){153 154 // change affichage155 $(this).children().eq(1).children().eq(0).children().eq(1).text(nomNV.val())156 $(this).children().eq(1).children().eq(1).children().eq(1).text(prenomNV.val())157 $(this).children().eq(1).children().eq(3).children().eq(1).text(emailNV.val())158 $(this).children().eq(1).children().eq(4).children().eq(1).text(adresseNV.val())159 $(this).children().eq(1).children().eq(5).children().eq(1).text(municipaleNV.val())160 $(this).children().eq(1).children().eq(6).children().eq(1).text(lieunaisNV.val())161 $(this).children().eq(1).children().eq(8).children().eq(1).text(telNV.val())162 $(this).children().eq(1).children().eq(9).children().eq(1).text(datenaisNV.val())163 $(this).children().eq(1).children().eq(10).children().eq(1).text(emailclientNV.val())164 $(this).children().eq(1).children().eq(11).children().eq(1).text(passwordNV.val())165 $(this).children().eq(1).children().eq(12).children().eq(1).text(statutNV.val())166 167 }168 })169 $(".afficher").each(function(){170 171 if(index == $(this).parent().parent().parent().children().eq(1).text()){172 173 $(this).parent().parent().parent().children().eq(2).text(nomNV.val())174 $(this).parent().parent().parent().children().eq(3).text(prenomNV.val())175 $(this).parent().parent().parent().children().eq(5).children().text(emailNV.val())176 $(this).parent().parent().parent().children().eq(6).children().text(adresseNV.val())177 $(this).parent().parent().parent().children().eq(7).text(telNV.val())178 } 179 })180 }else {181 alert('un erreur est du lors du modification');182 }183 })}else{184 $("#mod").hide();185 $("#tab").show();186 $(".001").hide();187 nomNV.val(nom)188 prenomNV.val(prenom)189 adresseNV.val(adresse)190 datenaisNV.val(datenais)191 emailclientNV.val(emailclient)192 emailNV.val(email)193 municipaleNV.val(municipale)194 lieunaisNV.val(lieunais)195 telNV.val(tel)196 passwordNV.val(password)197 statutNV.val(statut)198 199 200 }201 202 }else if( nomNV.val() == nom && prenomNV.val() == prenom && emailNV.val() == email && adresseNV.val() == adresse && emailclientNV.val() == emailclient && municipaleNV.val() == municipale && passwordNV.val() == password && statutNV.val()== statut && telNV.val() == tel && lieunais == lieunaisNV.val() && datenais == datenaisNV.val() ){203 $("#mod").hide();204 $("#tab").show();205 $(".001").hide();206 207 }else if(nomRegex.test(nomNV.val()) && nomRegex.test(prenomNV.val()) && adresseRegex.test(lieunaisNV.val()) && adresseRegex.test(municipaleNV.val()) && adresseRegex.test(adresseNV.val()) && emailRegex.test(emailNV.val()) && phoneRegex.test(telNV.val()) && emailclient == undefined && password == undefined && statut == undefined && (nomNV.val() != nom || prenomNV.val() != prenom || emailNV.val() != email || adresseNV.val() != adresse || municipaleNV.val() != municipale || telNV.val() != tel || lieunais != lieunaisNV.val() || datenais != datenaisNV.val()) ){208 if(confirm('voulez vous vraiment modifier les donnes')){209 $.post("ConsulterClient",{"id":index,"datenais":datenaisNV.val(),"nom":nomNV.val(),"prenom":prenomNV.val(),"email":emailNV.val(),"adresse":adresseNV.val(),"municipale":municipaleNV.val(),"lieunais":lieunaisNV.val(),"telephone":telNV.val(),"operation":"mod"}, function(data){210 if(data==1){211 $("#mod").hide();212 $("#tab").show();213 $(".search").each(function(){ 214 if($(this).children().children().val() == index){215 216 // change affichage217 $(this).children().eq(1).children().eq(0).children().eq(1).text(nomNV.val())218 $(this).children().eq(1).children().eq(1).children().eq(1).text(prenomNV.val())219 $(this).children().eq(1).children().eq(3).children().eq(1).text(emailNV.val())220 $(this).children().eq(1).children().eq(4).children().eq(1).text(adresseNV.val())221 $(this).children().eq(1).children().eq(5).children().eq(1).text(municipaleNV.val())222 $(this).children().eq(1).children().eq(6).children().eq(1).text(lieunaisNV.val())223 $(this).children().eq(1).children().eq(8).children().eq(1).text(telNV.val())224 $(this).children().eq(1).children().eq(9).children().eq(1).text(datenaisNV.val())225 226 }227 })228 $(".afficher").each(function(){229 230 if(index == $(this).parent().parent().parent().children().eq(1).text()){231 232 $(this).parent().parent().parent().children().eq(2).text(nomNV.val())233 $(this).parent().parent().parent().children().eq(3).text(prenomNV.val())234 $(this).parent().parent().parent().children().eq(5).children().text(emailNV.val())235 $(this).parent().parent().parent().children().eq(6).children().text(adresseNV.val())236 $(this).parent().parent().parent().children().eq(7).text(telNV.val())237 } 238 })239 }else {240 alert('un erreur est du lors du modification');241 }242 })}else{243 $("#mod").hide();244 $("#tab").show();245 $(".001").hide();246 247 nomNV.val(nom)248 prenomNV.val(prenom)249 adresseNV.val(adresse)250 datenaisNV.val(datenais)251 emailclientNV.val(emailclient)252 emailNV.val(email)253 municipaleNV.val(municipale)254 lieunaisNV.val(lieunais)255 telNV.val(tel)256 passwordNV.val(password)257 statutNV.val(statut)258 }259 260 }})261 }else{262 $(this).hide()263 264 }265 })266 267 268 269 });270 271 272 273 274 275 276 $(".supprimer").on("click", function(){277 var index = $(this).parent().parent().parent().children().eq(1).text();278 var supp = this;279 if(confirm('voulez vous vraiment supprimer ce client')){280 $.post("ConsulterClient",{"id":index,"operation":"delete"}, function(data){281 if(data==1){282 $(supp).parent().parent().parent().remove();283 }else {284 alert('un erreur est du lors dans suppression');285 }286 })}287 288 });289 ...

Full Screen

Full Screen

template.config.js

Source:template.config.js Github

copy

Full Screen

1import component from './index';2import less from '!raw-loader!./index.less';3import templateStr from '!raw-loader!./index';4export default {5 component,6 templateStr,7 less,8 dataSource: {9 wrapper: {10 className: 'home-page-wrapper pricing2-wrapper',11 },12 page: {13 className: 'home-page pricing2',14 },15 OverPack: {16 playScale: 0.3,17 className: 'pricing2-content-wrapper',18 },19 titleWrapper: {20 className: 'pricing2-title-wrapper',21 children: [22 {23 name: 'title',24 children: '价目表',25 className: 'pricing2-title-h1',26 },27 ],28 },29 Table: {30 name: 'tabsTitle',31 size: 'default',32 className: 'pricing2-table',33 columns: {34 children: [35 {36 dataIndex: 'name',37 key: 'name',38 name: 'empty',39 childWrapper: {40 children: [41 {42 name: 'name',43 children: ' ',44 },45 {46 name: 'content',47 children: ' ',48 },49 ],50 },51 },52 {53 dataIndex: 'free',54 key: 'free',55 name: 'free',56 childWrapper: {57 className: 'pricing2-table-name-block',58 children: [59 {60 name: 'name',61 className: 'pricing2-table-name',62 children: 'Free',63 },64 {65 name: 'content',66 className: 'pricing2-table-money',67 children: '¥0',68 },69 {70 name: 'button',71 children: {72 href: '#',73 children: '免费试用',74 },75 },76 ],77 },78 },79 {80 dataIndex: 'basic',81 key: 'basic',82 name: 'basic',83 childWrapper: {84 className: 'pricing2-table-name-block',85 children: [86 {87 name: 'name',88 className: 'pricing2-table-name',89 children: 'Basic',90 },91 {92 name: 'content',93 className: 'pricing2-table-money',94 children: '¥550',95 },96 {97 name: 'button',98 children: {99 href: '#',100 children: '立即购买',101 },102 },103 ],104 },105 },106 {107 dataIndex: 'pro',108 key: 'pro',109 name: 'pro',110 childWrapper: {111 className: 'pricing2-table-name-block',112 children: [113 {114 name: 'name',115 className: 'pricing2-table-name',116 children: 'Pro',117 },118 {119 name: 'content',120 className: 'pricing2-table-money',121 children: '¥2,200',122 },123 {124 name: 'button',125 children: {126 href: '#',127 type: 'primary',128 children: '立即购买',129 },130 },131 ],132 },133 },134 {135 dataIndex: 'unlimited',136 key: 'unlimited',137 name: 'unlimited',138 childWrapper: {139 className: 'pricing2-table-name-block',140 children: [141 {142 name: 'name',143 className: 'pricing2-table-name',144 children: 'Unlimited',145 },146 {147 name: 'content',148 className: 'pricing2-table-money',149 children: '¥5,600',150 },151 {152 name: 'button',153 children: {154 href: '#',155 children: '立即购买',156 },157 },158 ],159 },160 },161 ],162 },163 dataSource: {164 children: [165 {166 name: 'list0',167 children: [168 {169 className: 'pricing2-table-content-name',170 name: 'name',171 children: '实例系列1',172 },173 {174 children: 'Limited',175 name: 'content0',176 className: 'pricing2-table-content',177 },178 {179 children: 'Unlimited',180 name: 'content1',181 className: 'pricing2-table-content',182 },183 {184 children: 'Unlimited',185 name: 'content2',186 className: 'pricing2-table-content',187 },188 {189 children: 'Unlimited',190 name: 'content3',191 className: 'pricing2-table-content',192 },193 ],194 },195 {196 name: 'list1',197 children: [198 {199 className: 'pricing2-table-content-name',200 name: 'name',201 children: '实例系列2',202 },203 {204 children: 'Limited',205 name: 'content0',206 className: 'pricing2-table-content',207 },208 {209 children: 'Unlimited',210 name: 'content1',211 className: 'pricing2-table-content',212 },213 {214 children: 'Unlimited',215 name: 'content2',216 className: 'pricing2-table-content',217 },218 {219 children: 'Unlimited',220 name: 'content3',221 className: 'pricing2-table-content',222 },223 ],224 },225 {226 name: 'list2',227 children: [228 {229 className: 'pricing2-table-content-name',230 name: 'name',231 children: '固定宽带计费',232 },233 {234 name: 'content0',235 children: '50GB',236 className: 'pricing2-table-content',237 },238 {239 name: 'content1',240 children: '250GB',241 className: 'pricing2-table-content',242 },243 {244 name: 'content2',245 children: '600GB',246 className: 'pricing2-table-content',247 },248 {249 name: 'content3',250 children: 'Unlimited',251 className: 'pricing2-table-content',252 },253 ],254 },255 {256 name: 'list3',257 children: [258 {259 className: 'pricing2-table-content-name',260 name: 'name',261 children: '闲置负载均衡',262 },263 {264 children: '-',265 name: 'content0',266 className: 'pricing2-table-content',267 },268 {269 name: 'content1',270 children: 'https://gw.alipayobjects.com/zos/basement_prod/14ce3060-34e6-4b30-9a45-1a6b95542310.svg',271 className: 'pricing2-table-content',272 },273 {274 name: 'content2',275 children: 'https://gw.alipayobjects.com/zos/basement_prod/14ce3060-34e6-4b30-9a45-1a6b95542310.svg',276 className: 'pricing2-table-content',277 },278 {279 name: 'content3',280 children: 'https://gw.alipayobjects.com/zos/basement_prod/14ce3060-34e6-4b30-9a45-1a6b95542310.svg',281 className: 'pricing2-table-content',282 },283 ],284 },285 {286 name: 'list4',287 children: [288 {289 className: 'pricing2-table-content-name',290 name: 'name',291 children: '4核',292 },293 {294 name: 'content0',295 children: '-',296 className: 'pricing2-table-content',297 },298 {299 name: 'content1',300 children: '-',301 className: 'pricing2-table-content',302 },303 {304 name: 'content2',305 children: 'https://gw.alipayobjects.com/zos/basement_prod/14ce3060-34e6-4b30-9a45-1a6b95542310.svg',306 className: 'pricing2-table-content',307 },308 {309 name: 'content3',310 children: 'https://gw.alipayobjects.com/zos/basement_prod/14ce3060-34e6-4b30-9a45-1a6b95542310.svg',311 className: 'pricing2-table-content',312 },313 ],314 },315 {316 name: 'list5',317 children: [318 {319 className: 'pricing2-table-content-name',320 name: 'name',321 children: '系统盘(线性计费)',322 },323 {324 name: 'content0',325 children: '-',326 className: 'pricing2-table-content',327 },328 {329 name: 'content1',330 children: '-',331 className: 'pricing2-table-content',332 },333 {334 name: 'content2',335 children: '-',336 className: 'pricing2-table-content',337 },338 {339 name: 'content3',340 children: 'https://gw.alipayobjects.com/zos/basement_prod/14ce3060-34e6-4b30-9a45-1a6b95542310.svg',341 className: 'pricing2-table-content',342 },343 ],344 },345 ],346 },347 },348 },...

Full Screen

Full Screen

zz.js

Source:zz.js Github

copy

Full Screen

1//左右箭头显示、隐藏2 //电脑数码3 $(".section_dnsm_gun").hover(function() {4 $(this).children().children('.section_dnsm_you').stop().show()5 $(this).children().children('.section_dnsm_zuo').stop().show()6 }, function() {7 $(this).children().children('.section_dnsm_you').stop().hide()8 $(this).children().children('.section_dnsm_zuo').stop().hide()9 });10 //玩3c11 $(".section_w3c_gun").hover(function() {12 $(this).children().children('.section_w3c_you').stop().show()13 $(this).children().children('.section_w3c_zuo').stop().show()14 }, function() {15 $(this).children().children('.section_w3c_you').stop().hide()16 $(this).children().children('.section_w3c_zuo').stop().hide()17 });18 //爱运动19 $(".section_ayd_gun").hover(function() {20 $(this).children().children('.section_ayd_you').stop().show()21 $(this).children().children('.section_ayd_zuo').stop().show()22 }, function() {23 $(this).children().children('.section_ayd_you').stop().hide()24 $(this).children().children('.section_ayd_zuo').stop().hide()25 });26 //爱吃27 $(".section_ac_gun").hover(function() {28 $(this).children().children('.section_ac_you').stop().show()29 $(this).children().children('.section_ac_zuo').stop().show()30 }, function() {31 $(this).children().children('.section_ac_you').stop().hide()32 $(this).children().children('.section_ac_zuo').stop().hide()33 });34//左右箭头变色35 $(".section_dnsm_zuo,.section_w3c_zuo,.section_ayd_zuo,.section_ac_zuo").hover(function() {36 $(this).children('img').attr('src', './img/left-active.png');37 }, function() {38 $(this).children('img').attr('src', './img/left.png');39 });40 $(".section_dnsm_you,.section_w3c_you,.section_ayd_you,.section_ac_you").hover(function() {41 $(this).children('img').attr('src', './img/right-active.png');42 }, function() {43 $(this).children('img').attr('src', './img/right.png');44 });45//左右滑动46 //电脑数码47 $(".section_dnsm_zuo").click(function() {48 // $(".section_dnsm_xian ul").animate({"left":"+=1140px"},600);49 $(".section_dnsm_xian ul").animate({"left":"-1140px"},600);50 });51 $(".section_dnsm_you").click(function() {52 $(".section_dnsm_xian ul").animate({"left":"-2280px"},600);53 });54 //爱吃55 $(".section_ac_zuo").click(function() {56 $(".section_ac_xian ul").animate({"left":"-1140px"},600)57 });58 $(".section_ac_you").click(function() {59 $(".section_ac_xian ul").animate({"left":"-2280px"},600);60 });61 //玩3c62 $(".section_w3c_zuo").click(function() {63 $(".section_w3c_xian ul").animate({"left":"-570px"}, 600);64 });65 $(".section_w3c_you").click(function() {66 $(".section_w3c_xian ul").animate({"left":"-1140"}, 600);67 });68 //爱运动69 $(".section_ayd_zuo").click(function() {70 $(".section_ayd_xian ul").animate({"left":"-570px"}, 600);71 });72 $(".section_ayd_you").click(function() {73 $(".section_ayd_xian ul").animate({"left":"-1140px"}, 600);74 });75//图片滑动效果76 //电脑数码77 $(".section_dnsm_left>div:first-child").hover(function(){78 $(".section_dnsm_left>div:first-child>img").stop().animate({79 left:"-10px"80 },300)81 },function(){82 $(".section_dnsm_left>div:first-child>img").stop().animate({83 left:084 },300)85 })86 $(".section_dnsm_right>div:first-child").hover(function(){87 $(".section_dnsm_right>div:first-child>img").stop().animate({88 left:"-10px"89 },300)90 },function(){91 $(".section_dnsm_right>div:first-child>img").stop().animate({92 left:093 },300)94 })95 //玩3C96 $(".section_w3c_left>div:first-child").hover(function(){97 $(".section_w3c_left>.section_w3c_er>img").stop().animate({98 left:"-10px"99 },300)100 },function(){101 $(".section_w3c_left>.section_w3c_er>img").stop().animate({102 left:0103 },300)104 })105 //爱运动106 $(".section_ayd_left div:first-child").hover(function(){107 $(".section_ayd_left div:first-child img").stop().animate({108 left:"-10px"109 },300)110 },function(){111 $(".section_ayd_left div:first-child img").stop().animate({112 left:0113 },300)114 })115 //爱吃116 $(".section_ac_left div:first-child").hover(function(){117 $(".section_ac_left div:first-child img").stop().animate({118 left:"-10px"119 },300)120 },function(){121 $(".section_ac_left div:first-child img").stop().animate({122 left:0123 },300)124 })125 $(".section_ac_right div:not(:last-child)").hover(function(){126 $(this).children('img').stop().animate({127 left:"-10px"128 },300)129 },function(){130 $(this).children('img').stop().animate({131 left:0132 },300)133 })134//小图滑动效果135 //电脑数码136 $(".section_dnsm_box li").hover(function() {137 $(this).children().children('.section_dnsm_tu').children('img').stop().animate({138 left:"-5px"139 }, 300)140 }, function() {141 $(this).children().children('.section_dnsm_tu').children('img').stop().animate({142 left:0143 }, 300)144 });145 $(".section_dnsm_di a").hover(function() {146 $(this).children("img").stop().animate({147 left:"-10px"148 }, 300)149 }, function() {150 $(this).children("img").stop().animate({151 left:0152 }, 300)153 });154 //玩3c155 $(".section_w3c_box li").hover(function() {156 $(this).children().children('.section_w3c_tu').children('img').stop().animate({157 left:"-5px"158 }, 300)159 }, function() {160 $(this).children().children('.section_w3c_tu').children('img').stop().animate({161 left:0162 }, 300)163 });164 $(".section_w3c_di a").hover(function() {165 $(this).children("img").stop().animate({166 left:"-10px"167 }, 300)168 }, function() {169 $(this).children("img").stop().animate({170 left:0171 }, 300)172 });173 //爱运动174 $(".section_ayd_box li").hover(function() {175 $(this).children().children('.section_ayd_tu').children('img').stop().animate({176 left:"-5px"177 }, 300)178 }, function() {179 $(this).children().children('.section_ayd_tu').children('img').stop().animate({180 left:0181 }, 300)182 });183 $(".section_ayd_di a").hover(function() {184 $(this).children("img").stop().animate({185 left:"-10px"186 }, 300)187 }, function() {188 $(this).children("img").stop().animate({189 left:0190 }, 300)191 });192 //爱吃193 $(".section_ac_box li").hover(function() {194 $(this).children().children('.section_ac_tu').children('img').stop().animate({195 left:"-5px"196 }, 300)197 }, function() {198 $(this).children().children('.section_ac_tu').children('img').stop().animate({199 left:0200 }, 300)201 });202 $(".section_ac_di a").hover(function() {203 $(this).children("img").stop().animate({204 left:"-10px"205 }, 300)206 }, function() {207 $(this).children("img").stop().animate({208 left:0209 }, 300)...

Full Screen

Full Screen

ReactPersistent-test.js

Source:ReactPersistent-test.js Github

copy

Full Screen

1/**2 * Copyright (c) Facebook, Inc. and its affiliates.3 *4 * This source code is licensed under the MIT license found in the5 * LICENSE file in the root directory of this source tree.6 *7 * @emails react-core8 * @jest-environment node9 */10'use strict';11let React;12let ReactNoopPersistent;13let Scheduler;14describe('ReactPersistent', () => {15 beforeEach(() => {16 jest.resetModules();17 React = require('react');18 ReactNoopPersistent = require('react-noop-renderer/persistent');19 Scheduler = require('scheduler');20 });21 // Inlined from shared folder so we can run this test on a bundle.22 function createPortal(children, containerInfo, implementation, key) {23 return {24 $$typeof: Symbol.for('react.portal'),25 key: key == null ? null : String(key),26 children,27 containerInfo,28 implementation,29 };30 }31 function render(element) {32 ReactNoopPersistent.render(element);33 }34 function div(...children) {35 children = children.map(c =>36 typeof c === 'string' ? {text: c, hidden: false} : c,37 );38 return {type: 'div', children, prop: undefined, hidden: false};39 }40 function span(prop) {41 return {type: 'span', children: [], prop, hidden: false};42 }43 function getChildren() {44 return ReactNoopPersistent.getChildren();45 }46 it('can update child nodes of a host instance', () => {47 function Bar(props) {48 return <span>{props.text}</span>;49 }50 function Foo(props) {51 return (52 <div>53 <Bar text={props.text} />54 {props.text === 'World' ? <Bar text={props.text} /> : null}55 </div>56 );57 }58 render(<Foo text="Hello" />);59 expect(Scheduler).toFlushWithoutYielding();60 const originalChildren = getChildren();61 expect(originalChildren).toEqual([div(span())]);62 render(<Foo text="World" />);63 expect(Scheduler).toFlushWithoutYielding();64 const newChildren = getChildren();65 expect(newChildren).toEqual([div(span(), span())]);66 expect(originalChildren).toEqual([div(span())]);67 });68 it('can reuse child nodes between updates', () => {69 function Baz(props) {70 return <span prop={props.text} />;71 }72 class Bar extends React.Component {73 shouldComponentUpdate(newProps) {74 return false;75 }76 render() {77 return <Baz text={this.props.text} />;78 }79 }80 function Foo(props) {81 return (82 <div>83 <Bar text={props.text} />84 {props.text === 'World' ? <Bar text={props.text} /> : null}85 </div>86 );87 }88 render(<Foo text="Hello" />);89 expect(Scheduler).toFlushWithoutYielding();90 const originalChildren = getChildren();91 expect(originalChildren).toEqual([div(span('Hello'))]);92 render(<Foo text="World" />);93 expect(Scheduler).toFlushWithoutYielding();94 const newChildren = getChildren();95 expect(newChildren).toEqual([div(span('Hello'), span('World'))]);96 expect(originalChildren).toEqual([div(span('Hello'))]);97 // Reused node should have reference equality98 expect(newChildren[0].children[0]).toBe(originalChildren[0].children[0]);99 });100 it('can update child text nodes', () => {101 function Foo(props) {102 return (103 <div>104 {props.text}105 <span />106 </div>107 );108 }109 render(<Foo text="Hello" />);110 expect(Scheduler).toFlushWithoutYielding();111 const originalChildren = getChildren();112 expect(originalChildren).toEqual([div('Hello', span())]);113 render(<Foo text="World" />);114 expect(Scheduler).toFlushWithoutYielding();115 const newChildren = getChildren();116 expect(newChildren).toEqual([div('World', span())]);117 expect(originalChildren).toEqual([div('Hello', span())]);118 });119 it('supports portals', () => {120 function Parent(props) {121 return <div>{props.children}</div>;122 }123 function BailoutSpan() {124 return <span />;125 }126 class BailoutTest extends React.Component {127 shouldComponentUpdate() {128 return false;129 }130 render() {131 return <BailoutSpan />;132 }133 }134 function Child(props) {135 return (136 <div>137 <BailoutTest />138 {props.children}139 </div>140 );141 }142 const portalContainer = {rootID: 'persistent-portal-test', children: []};143 const emptyPortalChildSet = portalContainer.children;144 render(<Parent>{createPortal(<Child />, portalContainer, null)}</Parent>);145 expect(Scheduler).toFlushWithoutYielding();146 expect(emptyPortalChildSet).toEqual([]);147 const originalChildren = getChildren();148 expect(originalChildren).toEqual([div()]);149 const originalPortalChildren = portalContainer.children;150 expect(originalPortalChildren).toEqual([div(span())]);151 render(152 <Parent>153 {createPortal(<Child>Hello {'World'}</Child>, portalContainer, null)}154 </Parent>,155 );156 expect(Scheduler).toFlushWithoutYielding();157 const newChildren = getChildren();158 expect(newChildren).toEqual([div()]);159 const newPortalChildren = portalContainer.children;160 expect(newPortalChildren).toEqual([div(span(), 'Hello ', 'World')]);161 expect(originalChildren).toEqual([div()]);162 expect(originalPortalChildren).toEqual([div(span())]);163 // Reused portal children should have reference equality164 expect(newPortalChildren[0].children[0]).toBe(165 originalPortalChildren[0].children[0],166 );167 // Deleting the Portal, should clear its children168 render(<Parent />);169 expect(Scheduler).toFlushWithoutYielding();170 const clearedPortalChildren = portalContainer.children;171 expect(clearedPortalChildren).toEqual([]);172 // The original is unchanged.173 expect(newPortalChildren).toEqual([div(span(), 'Hello ', 'World')]);174 });...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1import React from 'react';2import { storiesOf, action, linkTo } from '@kadira/storybook';3import { withKnobs, text, boolean, number } from '@kadira/storybook-addon-knobs';4storiesOf('Button', module)5 .addDecorator(withKnobs)6 .add('with text', () => (7 <button onClick={action('clicked')}>{text('Label', 'Hello Button')}</button>8 .add('with some emoji', () => (9 <button onClick={action('clicked')}>{text('Label', '😀 😎 👍 💯')}</button>10 ));11import React from 'react';12import { storiesOf, action, linkTo } from '@kadira/storybook';13import { withKnobs, text, boolean, number } from '@kadira/storybook-addon-knobs';14storiesOf('Button2', module)15 .addDecorator(withKnobs)16 .add('with text', () => (17 <button onClick={action('clicked')}>{text('Label', 'Hello Button')}</button>18 .add('with some emoji', () => (19 <button onClick={action('clicked')}>{text('Label', '😀 😎 👍 💯')}</button>20 ));21import React from 'react';22import { storiesOf, action, linkTo } from '@kadira/storybook';23import { withKnobs, text, boolean, number } from '@kadira/storybook-addon-knobs';24storiesOf('Button3', module)25 .addDecorator(withKnobs)26 .add('with text', () => (27 <button onClick={action('clicked')}>{text('Label', 'Hello Button')}</button>28 .add('with some emoji', () => (29 <button onClick={action('clicked')}>{text('Label', '😀 😎 👍 💯')}</button>30 ));31import React from 'react';32import { storiesOf, action, linkTo } from '@kadira/storybook';33import { withKnobs, text, boolean, number } from '@kadira/storybook-addon-knobs

Full Screen

Using AI Code Generation

copy

Full Screen

1const component = await getComponent('storybook-root');2const children = await component.children();3console.log(children);4const component = await getComponent('storybook-root');5const children = await component.children();6console.log(children);7const component = await getComponent('storybook-root');8const children = await component.children();9const child = children[0];10console.log(child);11const component = await getComponent('storybook-root');12const children = await component.children();13const child = children[0];14const parent = await child.parent();15console.log(parent);16const component = await getComponent('storybook-root');17const children = await component.children();18const child = children[0];19const id = await child.id();20console.log(id);

Full Screen

Using AI Code Generation

copy

Full Screen

1const storybookRoot = document.querySelector('storybook-root');2const storybookRootChildren = storybookRoot.children;3const storybookRootFirstChild = storybookRootChildren[0];4const storybookRootFirstChildChildren = storybookRootFirstChild.children;5const storybookRootFirstChildSecondChild = storybookRootFirstChildChildren[1];6const storybookRootFirstChildSecondChildChildren = storybookRootFirstChildSecondChild.children;7const storybookRootFirstChildSecondChildFirstChild = storybookRootFirstChildSecondChildChildren[0];8const storybookRootFirstChildSecondChildFirstChildChildren = storybookRootFirstChildSecondChildFirstChild.children;9const storybookRootFirstChildSecondChildFirstChildFirstChild = storybookRootFirstChildSecondChildFirstChildChildren[0];10const storybookRootFirstChildSecondChildFirstChildFirstChildChildren = storybookRootFirstChildSecondChildFirstChildFirstChild.children;11const storybookRootFirstChildSecondChildFirstChildSecondChild = storybookRootFirstChildSecondChildFirstChildChildren[1];12const storybookRootFirstChildSecondChildFirstChildSecondChildChildren = storybookRootFirstChildSecondChildFirstChildSecondChild.children;13const storybookRootFirstChildSecondChildFirstChildSecondChildFirstChild = storybookRootFirstChildSecondChildFirstChildSecondChildChildren[0];

Full Screen

Using AI Code Generation

copy

Full Screen

1const {children} = require('storybook-root');2const {render} = require('react-dom');3const {createElement} = require('react');4const stories = children(require.context('./stories', true, /\.js$/));5stories.forEach(story => {6 render(createElement(story), document.getElementById('root'));7});8module.exports = require('storybook-root')({9 component: require('./MyComponent'),10 props: {11 }12});13module.exports = require('storybook-root')({14 component: require('./MyOtherComponent'),15 props: {16 }17});18const React = require('react');19const PropTypes = require('prop-types');20const MyComponent = ({name}) => <div>Hello {name}!</div>;21MyComponent.propTypes = {22};23module.exports = MyComponent;24const React = require('react');25const PropTypes = require('prop-types');26const MyOtherComponent = ({name}) => <div>Hello {name}!</div>;27MyOtherComponent.propTypes = {28};29module.exports = MyOtherComponent;30.root {31 color: red;32}33.root {34 color: blue;35}36 Hello {{name}}!37 Hello {{name}}!38const React = require('react');39const PropTypes = require('prop-types');40const MyComponent = ({name}) => <div>Hello {name}!</div>;41MyComponent.propTypes = {42};43module.exports = MyComponent;44const React = require('react');45const PropTypes = require('prop-types');46const MyOtherComponent = ({name}) => <div>Hello {name}!</div>;

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run storybook-root automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful