Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
TracyHesiCecil committed Jul 25, 2020
1 parent 6efb074 commit 198765f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions framework/src/test/java/org/tron/common/crypto/ECKeyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
Expand Down Expand Up @@ -31,7 +32,12 @@ public class ECKeyTest {
private byte[] pubKey = Hex.decode(pubString);
private byte[] compressedPubKey = Hex.decode(compressedPubString);
private String address = "cd2a3d9f938e13cd947ec05abc7fe734df8dd826";
String eventSign = "eventBytesL(address,bytes,bytes32,uint256,string)";

@Test
public void testSha3() {
assertNotEquals(Hash.sha3(eventSign.getBytes()).length, 0);
}

@Test
public void testHashCode() {
Expand Down

0 comments on commit 198765f

Please sign in to comment.