Test Cases - mixbytes/icoplate_ico GitHub Wiki

Legend

:white_check_mark: done

:red_circle: failed

:white_large_square: need to code

Written Tests

| :fire: :fire: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond: :small_blue_diamond: | - 10%

Contracts

PLTToken :link:

startCirculation

:white_check_mark: Circulation disable at start, m_isCirculating == false

:white_check_mark: If start circulation from owner, token raise error

:white_check_mark: If start circulation from owner, m_isCirculating not changed

:white_check_mark: m_isCirculating = true, if start circulation from owner, token raise error

:white_check_mark: m_isCirculating = true, if start circulation from owner, m_isCirculating not changed

:white_check_mark: If start circulation from controller, m_isCirculating == true

:white_check_mark: If start circulation from controller, token doesn't raise error

:white_check_mark: m_isCirculating = true, if start circulation from controller, m_isCirculating not changed

:white_check_mark: m_isCirculating = true, if start circulation from controller, token raise error

:white_check_mark: If start circulation from nobody, token raise error

:white_check_mark: If start circulation from nobody, m_isCirculating not changed

:white_check_mark: m_isCirculating = true, if start circulation from nobody, token raise error

:white_check_mark: m_isCirculating = true, if start circulation from nobody, m_isCirculating not changed

mint

:white_check_mark: If mint from controller, token doesn't raise error

:white_check_mark: If mint from controller, amount>0, balance _to increase on _amount

:white_check_mark: If mint from controller, amount=0, balance _to doesn't increase

:white_check_mark: If mint from controller, amount>0, totalSuply increase on _amount

:white_check_mark: If mint from controller, amount=0, totalSuply doesn't increase

:red_circle: If mint from controller, amount<0, token raise error

:red_circle: If mint from controller, amount<0, balance _to doesn't change

:red_circle: If mint from controller, amount<0, totalSuply doesn't change

:white_check_mark: If mint from owner, token raise error

:white_check_mark: If mint from owner, token raise error

:white_check_mark: If mint from owner, _to balance not changed

:white_check_mark: If mint from owner, totalSuply not changed

:white_check_mark: If mint from nobody, token raise error

:white_check_mark: If mint from nobody, _to balance not changed

:white_check_mark: If mint from nobody, totalSuply not changed

burn

:white_check_mark: If burn from controller, _amount < 0 , token raise error

:white_check_mark: If burn from controller, _amount < _from balance, token doesn't raise error

:white_check_mark: If burn from controller, _amount < _from balance, _from balance reduced by _amount

:white_check_mark: If burn from controller, _amount < _from balance, totalSuply reduced by _amount

:white_check_mark: If burn from controller, _amount = _from balance, token doesn't raise error

:white_check_mark: If burn from controller, _amount = _from balance, _from balance = 0

:white_check_mark: If burn from controller, _amount = _from balance, totalSuply reduced by _amount

:white_check_mark: If burn from controller, _amount > _from balance, token raise error

:white_check_mark: If burn from controller, _amount > _from balance, _from balance not changed

:white_check_mark: If burn from controller, _amount > _from balance, totalSuply not changed

:white_large_square: If burn from owner, token raise error

:white_large_square: If burn from owner, _to balance not changed

:white_large_square: If burn from owner, totalSuply not changed

:white_large_square: If burn from nobody, token raise error

:white_large_square: If burn from nobody, _to balance not changed

:white_large_square: If burn from nobody, totalSuply not changed

ICOPPreSale

createMorePaymentChannels

buyInternal

calculateTokens

amIOwner

wcOnCrowdsaleSuccess

wcOnCrowdsaleFailure

ICOPreICO

ICOPICO

buy

withdrawPayments

amIOwner

calculateTokens

wcOnCrowdsaleSuccess

wcOnCrowdsaleFailure

Mixins

MultiControlledMixin

addController

:white_check_mark: Controllers array empty at start

:white_large_square: If owner addController, controller added

:white_large_square:

detachController

detachControllerByOwner

detachControllerInternal

isController

StatefulMixin

pause

unpause

fail

changeState