Open marionbarker opened 2 months ago
Got some feedback from @itsmojo.
This is not a blocking issue, so can deal with this later - just capturing the information here.
the issue seems to be that the expected values are only returned on the first Test run for a given iPhone simulator.
After the first run, the values seem to be a consistent values of 0.9500000000000307, 15.999999999996717, 91.99999999999918 & 2 (instead of the 0.8, 37, 101 & 1 in the initial run that are being tested for).
So this seems like this is a stateful test which really should be reworked to have consistent results on each run.
Also, using XCTAssertTrue() for these tests is not as helpful as using XCTAssertEqual() so that you can see both values on a failure and so an optional accuracy parameter can be used to deal with non exact floating point values like 15.999999999996717.
XCTAssertEqual(calibrationService.slope, 0.95, accuracy: 0.0001)
hey 👋 - silence for 30 days 🤐 ... anybody? triage is required!
Describe the bug
To Reproduce Steps to reproduce the behavior:
Expected behavior
The 4 XCTAssert line that fail are: lines 34, 36, 38 and 42 for
FreeAPSTests/CalibrationsTests.swift