Solidity test invoking function in ABI order instead of original source order
See original GitHub issue- I’ve asked for help in the Truffle Gitter before filing this issue.
Issue
The order of function calls in a Solidity test file doesn’t necessarily match the original file.
Steps to Reproduce
I don’t know exactly how to reproduce this. For example, I created another file with several functions, and they all execute in the order expected.
Expected Behavior
The first function in the test contract should be called, then the second, and so on.
Actual Results
In my case, the first function is called, then the third, then the fourth, and finally the second.
Environment
- Operating System: Ubuntu 16.04
- Ethereum client: ganache: installed: X-AppImage-BuildId=4bc085d0-f4f6-11a7-2bf2-7146c546a2c0 image: X-AppImage-BuildId=4bc085d0-f4f6-11a7-2bf2-7146c546a2c0
- Truffle version (
truffle version
): Running truffle via node doesn’t offer that option. It was built from a clean download of the truffle git as of 2-23-18. - node version (
node --version
): v6.11.0 - npm version (
npm --version
): 3.10.10
I verified that the version I was previously using does invoke the functions in the expected order.:
Solidity v0.4.18 (solc-js)
I discussed this with @gnidan in the gitter. We discussed some related changes: https://github.com/trufflesuite/truffle-compile/pull/42 … I verified that OrderABI was being called in my code. Yet the order was still fubared. Suggestions?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
@fdouglis Believe this is fixed in
4.1.3
. Please re-open if not. Thanks again.@cgewecke How about that … The whole reason I had it in its own contract was that I wanted to include Debuggable, but in the test directory, I muffed the syntax to include it. I could have sworn I tried the simple import “./XXX” you suggested, and failed. But it worked here, anyway, and it did run the tests in the correct order. Thanks.