failing test case for redefineWithObjectArgs

This commit is contained in:
2024-03-11 11:59:25 +01:00
parent 2509b53ba6
commit 73af20b7a6
2 changed files with 19 additions and 1 deletions

View File

@@ -457,6 +457,10 @@ class BasicTestCase extends Test {
_testObjectWith();
}
function testRedefineWithObjectArgs() {
_testRedefineWithObjectArgs();
}
var aNullToPrint = null;
}

View File

@@ -990,4 +990,18 @@ From:[(assert false (+ \"false \" \"should \" \"have \" \"been \" \"true\"))]" m
(let [stream (Stream.fromString " , , , ,abababababcab.ccab.")]
(Assert.equals " , , , ," (stream.expect "" ->(stream.takeWhileOneOf (.split ", " ""))))
(Assert.equals "ababababab" (stream.expect "" ->(stream.takeWhileOneOf (.split "ab" ""))))
(Assert.equals "cab.ccab" (stream.expect "" ->(stream.takeWhileOneOf ["cab" ".c"])))))
(Assert.equals "cab.ccab" (stream.expect "" ->(stream.takeWhileOneOf ["cab" ".c"])))))
(function funcWithMultipleArgs [:Int num :String str :Float num2]
(+ str (+ num num2)))
(function :Void voidFuncWithMultipleArgs [:Int num :String str :Float num2]
(+ str (+ num num2)))
(redefineWithObjectArgs funcWithMultipleArgs funcWithObjectArgs [str])
(redefineWithObjectArgs voidFuncWithMultipleArgs voidFuncWithObjectArgs [str])
(function _testRedefineWithObjectArgs []
(voidFuncWithObjectArgs "hey" (object num 5 num2 0.5))
(Assert.equals "hey5.5" (funcWithObjectArgs "hey" (object num 5 num2 0.5)))
(Assert.equals "hey5.5" (funcWithObjectArgs "hey" (object num2 4.5 num 1))))