Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1089 from ethereum/LianaHus-patch-1
Browse files Browse the repository at this point in the history
Update tests.sol.js
  • Loading branch information
0mkara authored Dec 5, 2018
2 parents 1e6560e + 55357f1 commit 6703fcf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions remix-tests/sol/tests.sol.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = `
pragma solidity >=0.4.22 <0.6.0;
library Assert {
event AssertionEvent(
Expand Down Expand Up @@ -27,13 +29,13 @@ library Assert {
}
// TODO: only for certain versions of solc
//function equal(fixed a, fixed b, string memory message) public returns (bool result) {
//function equal(fixed a, fixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function equal(ufixed a, ufixed b, string memory message) public returns (bool result) {
//function equal(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a == b);
// emit AssertionEvent(result, message);
//}
Expand All @@ -49,7 +51,7 @@ library Assert {
}
function equal(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encode(a)) == keccak256(abi.encode(b)));
result = (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)));
emit AssertionEvent(result, message);
}
Expand All @@ -69,13 +71,13 @@ library Assert {
}
// TODO: only for certain versions of solc
//function notEqual(fixed a, fixed b, string memory message) public returns (bool result) {
//function notEqual(fixed a, fixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
// TODO: only for certain versions of solc
//function notEqual(ufixed a, ufixed b, string memory message) public returns (bool result) {
//function notEqual(ufixed a, ufixed b, string message) public returns (bool result) {
// result = (a != b);
// emit AssertionEvent(result, message);
//}
Expand All @@ -91,7 +93,7 @@ library Assert {
}
function notEqual(string memory a, string memory b, string memory message) public returns (bool result) {
result = (keccak256(abi.encode(a)) != keccak256(abi.encode(b)));
result = (keccak256(abi.encodePacked(a)) != keccak256(abi.encodePacked(b)));
emit AssertionEvent(result, message);
}
Expand Down

0 comments on commit 6703fcf

Please sign in to comment.