solidity endToEnd testing gets equivalent CPP contracts

- Just testing the waters of our codebase by introducing C++
  version of the contract functions in the end to end solidity tests

- This way there is no need to check for some specific output but
  instead strive for consistency between the C++ and solidity code.
Bit horrible - expression is always true and you're conditionally assigning.
Better to write as:
```
return n ? 8 : 0;
```