HelloWorld Program
A short program that tests creating test cases in solidity, following these tutorials:
- https://medium.com/etherereum-salon/eth-testing-472c2f73b4c3
- https://medium.com/etherereum-salon/hello-ethereum-solan-contract-4643118a6119
This code has been updated to work with Solidity 5.0.
Getting Started
Dependencies:
- Solidity 5.0
- Truffle v5.0.8
- Node v10.15.0
Installation
Download the Hello World
folder onto your machine locally and enter the folder through the command line. Then, run truffle test
.
Output
> truffle test
Using network 'test'.
Compiling your contracts...
===========================
> Compiling .\contracts\HelloEthSalon.sol
> Compiling .\contracts\Migrations.sol
> Artifacts written to C:\Users\nicol\AppData\Local\Temp\test-119317-15536-tdnu5h.aq1i
> Compiled successfully using:
- solc: 0.5.0+commit.1d4f565a.Emscripten.clang
Contract: HelloEthSalon
√ should return a correct string (120ms)
1 passing (235ms)