test_DominatorTree_03.js (664B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 "use strict"; 4 5 // Test that we can get the root of dominator trees. 6 7 function run_test() { 8 const dominatorTree = saveHeapSnapshotAndComputeDominatorTree(); 9 equal(typeof dominatorTree.root, "number", "root should be a number"); 10 equal( 11 Math.floor(dominatorTree.root), 12 dominatorTree.root, 13 "root should be an integer" 14 ); 15 Assert.greaterOrEqual(dominatorTree.root, 0, "root should be positive"); 16 Assert.lessOrEqual( 17 dominatorTree.root, 18 Math.pow(2, 48), 19 "root should be less than or equal to 2^48" 20 ); 21 do_test_finished(); 22 }