Skip to content

Commit

Permalink
[libpy] refs skycoin#169 Finish write testing `SKY_Handle_Strings_Get…
Browse files Browse the repository at this point in the history
…Count`
  • Loading branch information
Maykel Arias Torres committed Sep 18, 2019
1 parent db30d0a commit 86e3db7
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions tests/test_util_param_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@
def test_TestDistributionAddressArrays():
err, dist = skycoin.SKY_params_Distribution_GetMainNetDistribution()
assert err == skycoin.SKY_OK
err, handle_addr = skycoin.SKY_params_Distribution_GetAddresses(dist)
err, addr = skycoin.SKY_params_Distribution_GetAddresses(dist)
assert err == skycoin.SKY_OK
err, length_addr = skycoin.SKY_Handle_Strings_GetCount(handle_addr)
err, length_addr = skycoin.SKY_Handle_Strings_GetCount(addr)
assert err == skycoin.SKY_OK

assert length_addr == 100
# At the time of this writing, there should be 25 addresses in the
# unlocked pool and 75 in the locked pool.
# unlocked = skycoin.SKY_params_GetUnlockedDistributionAddresses()
# assert len(unlocked) == 25
# locked = skycoin.SKY_params_GetLockedDistributionAddresses()
# assert len(locked) == 75
err, unlocked = skycoin.SKY_params_Distribution_UnlockedAddresses(dist)
assert err == skycoin.SKY_OK
err, countUnlocked = skycoin.SKY_Handle_Strings_GetCount(unlocked)
assert err == skycoin.SKY_OK
assert countUnlocked == 25
err, locked = skycoin.SKY_params_Distribution_LockedAddresses(dist)
assert err == skycoin.SKY_OK
err, countLocked = skycoin.SKY_Handle_Strings_GetCount(locked)
assert err == skycoin.SKY_OK
assert countLocked == 75
# err, string = skycoin.SKY_Handle_Strings_GetAt(unlocked, 1)
# assert err == skycoin.SKY_OK
# for i in range(len(addrs)):
# iStr = addrs[i]
# for j in range(i + 1):
Expand Down

0 comments on commit 86e3db7

Please sign in to comment.