aionnetwork / AVM

Enabling Java code to run in a blockchain environment
https://theoan.com/
MIT License
49 stars 25 forks source link

Tests for address fail to differentiate wrapping #398

Open fulldecent opened 5 years ago

fulldecent commented 5 years ago

The tests for wrapping are identical to the tests for not wrapping

https://github.com/aionnetwork/AVM/blob/cd2e8d4fbe5b5098a74486a23bb45107f3b39912/org.aion.avm.core/test/org/aion/avm/kernel/AddressTest.java#L54

jeff-aion commented 5 years ago

I don't understand this issue. What do you mean by "wrapping"?

That test is just verifying a zero address (an internal type) has a correct .equals() implementation and agrees with a constant we use through some tests. Really, the test is probably redundant now that these types are implemented elsewhere (they used to be AVM-resident).

fulldecent commented 5 years ago

I was just reviewing the code and am pointing out duplicate code in the test. The same assertions are used across different tests.