""" Authors: Peter Mawhorter Consulted: Date: 2022-5-1 Purpose: Testing code for fruitful recursion lab exercises. """ import fruitful import optimism testSUT = optimism.testFunctionMaybe(fruitful, "sumUpTo") testSUT.case(0).checkReturnValue(0) testSUT.case(3).checkReturnValue(6) testSUT.case(10).checkReturnValue(55) testSUT.case(83).checkReturnValue(3486) testSUT.case(500).checkReturnValue(125250) testATE = optimism.testFunctionMaybe(fruitful, "addToEach") testATE.case([1, 2, 3], 3).checkReturnValue([4, 5, 6]) testATE.case([], 5).checkReturnValue([]) testATE.case([1, 1], 1).checkReturnValue([2, 2]) testCL = optimism.testFunctionMaybe(fruitful, "countLs") testCL.case("").checkReturnValue(0) testCL.case("apple").checkReturnValue(1) testCL.case("Lollipop").checkReturnValue(3) testCL.case("win").checkReturnValue(0)