Skip to content

Commit

Permalink
Fixes spelling: recieve -> receive (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Pasetto authored Apr 16, 2021
1 parent 1b21985 commit 56dddaa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Loop/Managers/DeviceDataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ final class DeviceDataManager {
}
}
case .unreliableData:
loopManager.recievedUnreliableCGMReading()
loopManager.receivedUnreliableCGMReading()
case .noData:
log.default("CGMManager:%{public}@ did update with no data", String(describing: type(of: manager)))
pumpManager?.ensureCurrentPumpData(completion: nil)
Expand Down
2 changes: 1 addition & 1 deletion Loop/Managers/LoopAlertsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class LoopAlertsManager {
private func onBluetoothPoweredOff() {
log.default("Bluetooth powered off")
let title = NSLocalizedString("Bluetooth Off Alert", comment: "Bluetooth off alert title")
let bgBody = NSLocalizedString("Loop will not work successfully until Bluetooth is enabled. You will not recieve glucose readings, or be able to bolus.", comment: "Bluetooth off background alert body.")
let bgBody = NSLocalizedString("Loop will not work successfully until Bluetooth is enabled. You will not receive glucose readings, or be able to bolus.", comment: "Bluetooth off background alert body.")
let bgcontent = Alert.Content(title: title,
body: bgBody,
acknowledgeActionButtonLabel: NSLocalizedString("Dismiss", comment: "Default alert dismissal"))
Expand Down
2 changes: 1 addition & 1 deletion Loop/Managers/LoopDataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ extension LoopDataManager {
/// Take actions to address how insulin is delivered when the CGM data is unreliable
///
/// An active high temp basal (greater than the basal schedule) is cancelled when the CGM data is unreliable.
func recievedUnreliableCGMReading() {
func receivedUnreliableCGMReading() {
guard case .tempBasal(let tempBasal) = basalDeliveryState,
let scheduledBasalRate = basalRateSchedule?.value(at: now()),
tempBasal.unitsPerHour > scheduledBasalRate else
Expand Down
24 changes: 12 additions & 12 deletions LoopTests/Managers/CGMStalenessMonitorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class CGMStalenessMonitorTests: XCTestCase {
fetchExpectation = expectation(description: "Fetch latest cgm glucose")
latestCGMGlucose = storedGlucoseSample

var recievedValues = [Bool]()
var receivedValues = [Bool]()
let exp = expectation(description: "expected values")

let cancelable = monitor.$cgmDataIsStale.sink { value in
recievedValues.append(value)
if recievedValues.count == 2 {
receivedValues.append(value)
if receivedValues.count == 2 {
exp.fulfill()
}
}
Expand All @@ -49,20 +49,20 @@ class CGMStalenessMonitorTests: XCTestCase {
waitForExpectations(timeout: 2)

XCTAssertNotNil(cancelable)
XCTAssertEqual(recievedValues, [true, false])
XCTAssertEqual(receivedValues, [true, false])
}

func testStalenessWithNoRecentCGMData() {
let monitor = CGMStalenessMonitor()
fetchExpectation = expectation(description: "Fetch latest cgm glucose")
latestCGMGlucose = nil

var recievedValues = [Bool]()
var receivedValues = [Bool]()
let exp = expectation(description: "expected values")

let cancelable = monitor.$cgmDataIsStale.sink { value in
recievedValues.append(value)
if recievedValues.count == 2 {
receivedValues.append(value)
if receivedValues.count == 2 {
exp.fulfill()
}
}
Expand All @@ -71,20 +71,20 @@ class CGMStalenessMonitorTests: XCTestCase {
waitForExpectations(timeout: 2)

XCTAssertNotNil(cancelable)
XCTAssertEqual(recievedValues, [true, true])
XCTAssertEqual(receivedValues, [true, true])
}

func testStalenessNewReadingsArriving() {
let monitor = CGMStalenessMonitor()
fetchExpectation = expectation(description: "Fetch latest cgm glucose")
latestCGMGlucose = nil

var recievedValues = [Bool]()
var receivedValues = [Bool]()
let exp = expectation(description: "expected values")

let cancelable = monitor.$cgmDataIsStale.sink { value in
recievedValues.append(value)
if recievedValues.count == 2 {
receivedValues.append(value)
if receivedValues.count == 2 {
exp.fulfill()
}
}
Expand All @@ -96,7 +96,7 @@ class CGMStalenessMonitorTests: XCTestCase {
waitForExpectations(timeout: 2)

XCTAssertNotNil(cancelable)
XCTAssertEqual(recievedValues, [true, false])
XCTAssertEqual(receivedValues, [true, false])
}
}

Expand Down

0 comments on commit 56dddaa

Please sign in to comment.