package ixee.cryptopals.test import ixee.cryptopals.utils.ByteUtils import com.ixee.IxeeSpec class ByteUtilsSpec extends IxeeSpec { "ByteUtils" - { "SizedNumeric" - { ".liftedTo" - { "when the destination is >= the source in range" - { "losslessly converts to the destination type" in { } } "when the destination is smaller than the source" - { "throws an exception TODO: make it a Try?" in { } } } ".truncatedTo" - { "converts to the target type, truncating extra bytes" in { } } ".byteSize" - { "returns the size of a the type, in bytes" in { } } ".bitSize" - { "returns the size of a type, in bits" in { } } } "BitOps" - { "provides typed operations that don't upcast to Int" in { } } "toByteArray TODO: toByteSeq?" - { "returns the value as an array of bytes TODO: endianness?" in { } } "toBinaryString" - { "returns the value as a string of 1s and 0s, padded to the full size" in { } } } }