Skip to content

Instantly share code, notes, and snippets.

@Fahrni
Last active November 20, 2016 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fahrni/423d34cc900679ff35f4bf99c9d0a778 to your computer and use it in GitHub Desktop.
Save Fahrni/423d34cc900679ff35f4bf99c9d0a778 to your computer and use it in GitHub Desktop.
Using Objective-C++ from Swift
func testCreateDeleteMaleCalculate() {
guard let cc = PKMCreatinineClearance(40, height: 75, weight: 70, scr: 1.0, gender: PKMMale) else {
XCTFail("Create Creatinine Clearance Male Instance failed")
return
}
let clcr = cc.calculate()
XCTAssertEqualWithAccuracy(clcr, 97.2, accuracy: 0.2, "Male clcr should be around 97.2, range allowed to be +/- 0.2")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment