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.
as Chris said, I wanted to stay true to the original solidity contract. I would have preferred the ternary operator myself too. Want me to change it?