Ad
  • Custom User Avatar

    Yes sorry for the slow response the issue is resolved!

  • Custom User Avatar

    I've seen another one, but missed the one linked by you.
    I wanted to have this issue confirmed by OP, but they don;t seem to be interested anymore :) I will mark it as resolved too, because I think it should be OK now.

  • Default User Avatar

    can this issue be closed then ?

  • Custom User Avatar

    I changed the function signature to func calculate1RM(_ weight: Int, _ reps: Int) -> Int? so I think the labels are not needed anymore at a call site?

  • Custom User Avatar
       func sampleTests() {
            XCTAssertEqual(calculate1RM(320, 7)!, 395)
            XCTAssertEqual(calculate1RM(220, 10)!, 295)
            XCTAssertEqual(calculate1RM(120, 2)!,  129)
        }
    

    Above is the supplied test cases, in order to get the tests to even run it has to be changed to the following

        func sampleTests() {
            XCTAssertEqual(calculate1RM(weight: 320, reps: 7)!, 395)
            XCTAssertEqual(calculate1RM(weight: 220, reps: 10)!, 295)
            XCTAssertEqual(calculate1RM(weight: 120, reps: 2)!,  129)
        }
    

    The random test cases have the same issue and need the labels added to the calculate1RM functions within the testing framework.

  • Default User Avatar
  • Custom User Avatar

    Should be fixed, could you please verify?
    Remember to click RESET to restore initial solution stub. Thanks!

  • Custom User Avatar

    swift error when running tests error: missing argument labels