test_DominatorTreeNode_insert_02.js (859B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 "use strict"; 4 5 // Test attempting to insert new children into an existing DominatorTreeNode 6 // tree with a bad path. 7 8 const tree = makeTestDominatorTreeNode({}, [ 9 makeTestDominatorTreeNode({}), 10 makeTestDominatorTreeNode({}, [ 11 makeTestDominatorTreeNode({}), 12 makeTestDominatorTreeNode({}), 13 makeTestDominatorTreeNode({}), 14 ]), 15 makeTestDominatorTreeNode({}), 16 ]); 17 18 const path = [111111, 222222, 333333]; 19 20 const newChildren = [ 21 makeTestDominatorTreeNode({ parentId: 333333 }), 22 makeTestDominatorTreeNode({ parentId: 333333 }), 23 ]; 24 25 const moreChildrenAvailable = false; 26 27 const expected = tree; 28 29 function run_test() { 30 assertDominatorTreeNodeInsertion( 31 tree, 32 path, 33 newChildren, 34 moreChildrenAvailable, 35 expected 36 ); 37 }