class Test def main is shared # CobraCore.typeName(t) returns a Cobra style type name as opposed to the library names such as Int32 and Bool. # TODO: woops, can't pass primitive types yet #assert CobraCore.typeName(int) == 'int' #assert CobraCore.typeName(decimal) == 'decimal' assert CobraCore.typeName(Test) == 'Test' # TODO: woops can't do this one either! # assert CobraCore.typeName(List) == 'List' # CobraCore.toTechString(x) returns a programmer-friendly string representation of x assert CobraCore.toTechString(1) == '1' assert CobraCore.toTechString('aoeu') == "'aoeu'" assert CobraCore.toTechString([1, 2]) == ns"List[1, 2]" assert CobraCore.toTechString({'x': 1}) == "Dictionary{'x': 1}"