aionnetwork / aion_fastvm

Aion's FastVM implementation
MIT License
33 stars 15 forks source link

Java-side unit tests #15

Closed aionick closed 6 years ago

aionick commented 6 years ago

Adds in some java-side unit tests on the major classes of the vm. Some refactorings have been done for testing & some just for a bit of cleanup.

I did not delete any existing tests, though some may have been refactored. The Callback class uses FastVM and IPrecompiledContract instances that required some refactoring so that these could be mocked. Without them being mocked there was just too much detail to keep track of and it seemed beyond the scope of unit tests. All that the unit test cares about is the ExecutionResult of these classes.