# This script contains tests of the functions defined in other script files.
# These are not used during normal execution, they are only used for development.
# When everything is right, all these tests pass.

##############################################################
# card_color_color_count
##############################################################

assert(card_color_color_count("")               == 0)
assert(card_color_color_count("asdf")           == 0)
assert(card_color_color_count("white")          == 1)
assert(card_color_color_count("artifact,white") == 2)

##############################################################
# converted mana cost
##############################################################

assert(cmc("")        == 0)
assert(cmc("0")       == 0)
assert(cmc("1/2")     == 0.5)
assert(cmc("2/R3/W")  == 5)
assert(cmc("W/UW")    == 2)
assert(cmc("RRR")     == 3)
assert(cmc("2X")      == 2)
assert(cmc("22")      == 22)
assert(cmc("20WUBRG") == 25)

