---
# System prepended metadata

title: Untitled

---

```
const CalcHistory = artifacts.require("CalcHistory");

contract("CalcHistory", accounts => {
  
    it("sum 1 + 2 == 3", async () => {
        let instance = await CalcHistory.deployed();
        let result = await instance.sum.call(1, 2);

        assert.equal(result.valueOf(), 3, "1 + 2 == 3");
    });


});
```

```
const CalcHistory = artifacts.require("CalcHistory");

module.exports = function (deployer) {
  deployer.deploy(CalcHistory);
};
```


```
pragma solidity >=0.4.25 <0.6.0;

import "truffle/Assert.sol";
import "truffle/DeployedAddresses.sol";
import "../contracts/CalcHistory.sol";

contract TestCalcHistory {
  function test1plus2() public {
    CalcHistory calc = CalcHistory(DeployedAddresses.CalcHistory());

    uint expected = 3;

    Assert.equal(calc.sum(1, 2), expected, "1 + 2 == 3");
  }
}
```

