Skip to main content

Test cases

This reference implementation currently defines the following integration test cases.

Test cases are aggregated into the observeTraceTests variable:

/**
* collection of descriptions of tests that compile+deploy Solidity code,
* then step through the machine trace of that code's execution, watching
* and recording a pointer's value over the course of that trace.
*
* tests are described in terms of an expected sequence of values which the
* list of observed values should contain by the end of the trace, allowing
* for additional unexpected values in between and around the expected values.
*/
export const observeTraceTests = {
"struct storage": structStorageTest,
"string storage": stringStorageTest,
"uint256[] memory": uint256ArrayMemoryTest,
};

To see a brief introduction and the relevant code listings for each test case, please use the sidebar navigation or the hyperlinks included above.

This variable will be used to generate automated tests dynamically, as will be described in the next section Hooking up Jest.