Module:Sandbox/isaacl/ColourSpace/Tuple/testcases

-- Unit test cases for Module:Sandbox/isaacl/ColourSpace/Tuple. -- Click on talk page to run tests.

local me = require('Module:UnitTests') local Tuple = require('Module:Sandbox/isaacl/ColourSpace/Tuple')

me.Tuple = Tuple

function me:test_tuple local a = { 'a', 'b', 'c' } local b = Tuple.clone(a) b[1] = 'a prime' self:equals('Tuple a', Tuple.display(a), 'a, b, c') self:equals('Tuple b', Tuple.display(b), 'a prime, b, c') self:equals('Tuple a with custom separator', Tuple.display(a, '-'), 'a-b-c') self:equals('Tuple b with custom separator', Tuple.display(b, ':'), 'a prime:b:c') end

return me