NetworkTest
The NetworkTest
can be used for testing ScriptNode networks, mainly intended for internal usage.
Class methods
addRuntimeFunction
Sets a function that will be executed at the given time to simulate live user input. Edit on GitHub
NetworkTest.addRuntimeFunction(var f, int timestamp)
checkCompileHashCodes
Checks whether the hash code of all compiled nodes match their network file. Edit on GitHub
NetworkTest.checkCompileHashCodes()
createAsciiDiff
Creates a ASCII diff with 'X' as error when the datas don't match. Edit on GitHub
NetworkTest.createAsciiDiff(var data1, var data2, int numLines)
createBufferContentAsAsciiArt
Creates a string that vaguely represents the buffer data content. Edit on GitHub
NetworkTest.createBufferContentAsAsciiArt(var buffer, int numLines)
dumpNetworkAsXml
Creates a XML representation of the current network. Edit on GitHub
NetworkTest.dumpNetworkAsXml()
expectEquals
Compares the two data types and returns a error message if they don't match. Edit on GitHub
NetworkTest.expectEquals(var data1, var data2, float errorDb)
getDllInfo
Returns an object containing the information about the project dll. Edit on GitHub
NetworkTest.getDllInfo()
getLastTestException
Returns the exception that was caused by the last test run (or empty if fine). Edit on GitHub
NetworkTest.getLastTestException()
getListOfAllCompileableNodes
Returns the list of all nodes that can be compiled. Edit on GitHub
NetworkTest.getListOfAllCompileableNodes()
getListOfCompiledNodes
Returns the list of all compiled nodes. Edit on GitHub
NetworkTest.getListOfCompiledNodes()
runTest
runs the test and returns the buffer. Edit on GitHub
NetworkTest.runTest()
setProcessSpecs
Set the processing specifications for the test run. Edit on GitHub
NetworkTest.setProcessSpecs(int numChannels, double sampleRate, int blockSize)
setTestProperty
Sets a test property. Edit on GitHub
NetworkTest.setTestProperty(String id, var value)
setWaitingTime
Sets a time to wait between calling prepare and processing the data. Edit on GitHub
NetworkTest.setWaitingTime(int timeToWaitMs)