Fix tab/space format

This commit is contained in:
2020-11-14 17:26:54 -07:00
parent 3e074776d6
commit fadd9d32e2
11 changed files with 454 additions and 449 deletions

View File

@@ -6,72 +6,72 @@ import kiss.Prelude;
@:build(kiss.Kiss.build("src/test/cases/BasicTestCase.kiss"))
class BasicTestCase extends Test {
function testStaticVar() {
Assert.equals("Howdy", BasicTestCase.message);
}
function testStaticVar() {
Assert.equals("Howdy", BasicTestCase.message);
}
function testHaxeInsertion() {
Assert.equals(23, BasicTestCase.mathResult);
}
function testHaxeInsertion() {
Assert.equals(23, BasicTestCase.mathResult);
}
function testStaticFunction() {
Assert.equals(6, BasicTestCase.myFloor(6.5));
}
function testStaticFunction() {
Assert.equals(6, BasicTestCase.myFloor(6.5));
}
function testFuncall() {
Assert.equals(7, BasicTestCase.funResult);
}
function testFuncall() {
Assert.equals(7, BasicTestCase.funResult);
}
function testField() {
Assert.equals(5, new BasicTestCase().myField);
}
function testField() {
Assert.equals(5, new BasicTestCase().myField);
}
function testMethod() {
Assert.equals(5, new BasicTestCase().myMethod());
}
function testMethod() {
Assert.equals(5, new BasicTestCase().myMethod());
}
function testArray() {
var arr = BasicTestCase.myArray;
Assert.equals(3, arr.length);
Assert.equals(1, arr[0]);
Assert.equals(2, arr[1]);
Assert.equals(3, arr[2]);
function testArray() {
var arr = BasicTestCase.myArray;
Assert.equals(3, arr.length);
Assert.equals(1, arr[0]);
Assert.equals(2, arr[1]);
Assert.equals(3, arr[2]);
// Kiss arrays can be negatively indexed like Python
Assert.equals(3, arr[-1]);
Assert.equals(2, arr[-2]);
Assert.equals(1, arr[-3]);
}
// Kiss arrays can be negatively indexed like Python
Assert.equals(3, arr[-1]);
Assert.equals(2, arr[-2]);
Assert.equals(1, arr[-3]);
}
function testArrayAccess() {
Assert.equals(3, BasicTestCase.myArrayLast);
}
function testArrayAccess() {
Assert.equals(3, BasicTestCase.myArrayLast);
}
function testVariadicAdd() {
Assert.equals(6, BasicTestCase.mySum);
}
function testVariadicAdd() {
Assert.equals(6, BasicTestCase.mySum);
}
function testVariadicSubtract() {
Assert.equals(-2, BasicTestCase.myDifference);
}
function testVariadicSubtract() {
Assert.equals(-2, BasicTestCase.myDifference);
}
function testVariadicMultiply() {
Assert.equals(60, BasicTestCase.myProduct);
}
function testVariadicMultiply() {
Assert.equals(60, BasicTestCase.myProduct);
}
function testVariadicDivide() {
Assert.equals(0.5, BasicTestCase.myQuotient);
}
function testVariadicDivide() {
Assert.equals(0.5, BasicTestCase.myQuotient);
}
function testMod() {
Assert.equals(4, BasicTestCase.myRemainder);
}
function testMod() {
Assert.equals(4, BasicTestCase.myRemainder);
}
function testPow() {
Assert.equals(256, BasicTestCase.myPower);
}
function testPow() {
Assert.equals(256, BasicTestCase.myPower);
}
function testUnop() {
Assert.equals(7, BasicTestCase.myInc);
}
function testUnop() {
Assert.equals(7, BasicTestCase.myInc);
}
}