PDOMFuzzer¶
Overview¶
Runs PDOM-tree-related scenery operations randomly (with assertions) to try to find any bugs.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class PDOMFuzzer¶
Constructor¶
new PDOMFuzzer( nodeCount, logToConsole, seed )¶
Instance Methods¶
step()¶
Runs one action randomly (printing out the action and result). @public
enumerateActions()¶
Find all of the possible actions that are legal. @private
@returns {Array.<Object>} - like { text: {string}, execute: {function} }
isAddChildLegal( parent, child )¶
Checks whether the child can be added (as a child) to the parent. @private
@param {Node} parent @param {Node} child @returns {boolean}
powerSet( list )¶
Returns the power set of a set (all subsets). @private
@param {Array.<>} list @returns {Array.<Array.<>>}
isPDOMOrderChangeLegal( node, order )¶
Returns whether an accessible order change is legal. @private
@param {Node} node @param {Array.<Node|null>|null} order
isAcyclic( parent, child, hasConnection )¶
Checks whether a connection (parent-child or accessible order) is legal (doesn't cause a cycle). @private
@param {Node} parent @param {Node} child @param {function} hasConnection - determines whether there is a parent-child-style relationship between params @returns {boolean}
dispose()¶
Releases references @public
Source Code¶
See the source for PDOMFuzzer.js in the scenery repository.