Skip to content

PR #165

PR #165 #143

GitHub Actions / Xcode test results failed Apr 10, 2024 in 0s

Xcode test results

Testing workspace klaviyo-swift-sdk with scheme klaviyo-swift-sdk-Package

Summary

TotalSuccess PassedFailure FailedSkipped SkippedExpected Failure Expected Failure⏱️ Time
1211138003.87s

Test Summary

KlaviyoSwiftTests

  • Device: iPhone 14, 17.2 (21C62)
  • SDK: Simulator - iOS 16.4, 16.4
TestTotalSuccessFailureSkippedExpected Failure
test-class APIRequestErrorHandlingTests1515000
test-class AppLifeCycleEventsTests1111000
test-class ArchivalSystemTest11000
test-class ArchivalUtilsTests88000
test-class EncodableTests77000
test-class FileUtilsTests22000
test-class KlaviyoAPITests74300
test-class KlaviyoSwiftTests.xctest00000
test-class KlaviyoSDKTests1111000
test-class KlaviyoStateTests84400
test-class NetworkSessionTests33000
test-class StateChangePublisherTests33000
test-class StateManagementEdgeCaseTests2424000
test-class StateManagementTests2120100

Failure Failures

KlaviyoSwiftTests/KlaviyoAPITests/testSuccessfulResponseWithEvent()

File
Issue TypeAssertion Failure
MessageTest crashed with signal abrt.

KlaviyoSwiftTests/KlaviyoAPITests/testSuccessfulResponseWithProfile()

File
Issue TypeAssertion Failure
MessageTest crashed with signal abrt.

KlaviyoSwiftTests/KlaviyoAPITests/testSuccessfulResponseWithStoreToken()

File
Issue TypeAssertion Failure
MessageTest crashed with signal abrt.

KlaviyoSwiftTests/KlaviyoStateTests/testLoadNewKlaviyoState()

File/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift:78
Issue TypeAssertion Failure
Messagefailed - Snapshot does not match reference.

@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/Snapshots/KlaviyoStateTests/testLoadNewKlaviyoState.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testLoadNewKlaviyoState.1.txt"

To configure output for a custom diff tool, like Kaleidoscope:

SnapshotTesting.diffTool = "ksdiff"

@@ −14,6 +14,6 @@
  - pushTokenData: Optional.none
  - queue: 0 elements
  - requestsInFlight: 0 elements
  ▿ retryInfo: RetryInfo
− - retry: 0

    • retry: 1

KlaviyoSwiftTests/KlaviyoStateTests/testStateFileExistsInvalidData()

File/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift:94
Issue TypeAssertion Failure
Messagefailed - Snapshot does not match reference.

@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/Snapshots/KlaviyoStateTests/testStateFileExistsInvalidData.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testStateFileExistsInvalidData.1.txt"

To configure output for a custom diff tool, like Kaleidoscope:

SnapshotTesting.diffTool = "ksdiff"

@@ −14,6 +14,6 @@
  - pushTokenData: Optional.none
  - queue: 0 elements
  - requestsInFlight: 0 elements
  ▿ retryInfo: RetryInfo
− - retry: 0

    • retry: 1

KlaviyoSwiftTests/KlaviyoStateTests/testStateFileExistsInvalidJSON()

File/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift:109
Issue TypeAssertion Failure
Messagefailed - Snapshot does not match reference.

@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/Snapshots/KlaviyoStateTests/testStateFileExistsInvalidJSON.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testStateFileExistsInvalidJSON.1.txt"

To configure output for a custom diff tool, like Kaleidoscope:

SnapshotTesting.diffTool = "ksdiff"

@@ −14,6 +14,6 @@
  - pushTokenData: Optional.none
  - queue: 0 elements
  - requestsInFlight: 0 elements
  ▿ retryInfo: RetryInfo
− - retry: 0

    • retry: 1

KlaviyoSwiftTests/KlaviyoStateTests/testValidStateFileExists()

File/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift:122
Issue TypeAssertion Failure
Messagefailed - Snapshot does not match reference.

@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/Snapshots/KlaviyoStateTests/testValidStateFileExists.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testValidStateFileExists.1.txt"

To configure output for a custom diff tool, like Kaleidoscope:

SnapshotTesting.diffTool = "ksdiff"

@@ −14,6 +14,6 @@
  - pushTokenData: Optional.none
  - queue: 0 elements
  - requestsInFlight: 0 elements
  ▿ retryInfo: RetryInfo
− - retry: 0

    • retry: 1

KlaviyoSwiftTests/StateManagementTests/testFlushQueueExponentialBackoffGoesToSize()

File/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/StateManagementTests.swift:294
Issue TypeAssertion Failure
MessageA state change does not match expectation: …
  KlaviyoState(
    apiKey: "fake-key",
    email: nil,
    anonymousId: "00000000-0000-0000-0000-000000000001",
    phoneNumber: nil,
    externalId: nil,
    pushTokenData: KlaviyoState.PushTokenData(…),
    queue: [],
    requestsInFlight: [],
    initalizationState: KlaviyoState.InitializationState.initialized,
    flushing: false,
    flushInterval: 10.0,
−   retryInfo: RetryInfo.retry(0)
+   retryInfo: RetryInfo.retry(1)
    pendingRequests: [],
    pendingProfile: nil
  )

(Expected: −, Actual: +)


Code Coverage

Coverage Covered Executable
KlaviyoSwift 65.04 % 2392 3678
  NetworkSession.swift 61.33 % 46 75
  Misc.swift 34.93 % 51 146
  Store.swift 59.63 % 192 322
  Cancellation.swift 86.18 % 212 246
  ConcurrencySupport.swift 3.03 % 4 132
  APIRequestErrorHandling.swift 97.12 % 101 104
  StateManagement.swift 93.12 % 433 465
  ArchivalUtils.swift 100.00 % 42 42
  KlaviyoModels.swift 100.00 % 70 70
  KlaviyoEnvironment.swift 41.76 % 38 91
  AppContextInfo.swift 53.25 % 41 77
  ReachabilitySwift.swift 18.94 % 43 227
  Publisher.swift 46.15 % 66 143
  Klaviyo.swift 86.78 % 105 121
  InternalAPIModels.swift 97.56 % 160 164
  AppLifeCycleEvents.swift 100.00 % 76 76
  KlaviyoState.swift 77.75 % 325 418
  Effect.swift 39.86 % 116 291
  StateChangePublisher.swift 43.18 % 19 44
  Create.swift 90.21 % 129 143
  KlaviyoAPI.swift 92.66 % 101 109
  FileUtils.swift 95.65 % 22 23
  LoggerClient.swift 0.00 % 0 1
  SDKRequestIterator.swift 0.00 % 0 148
KlaviyoSwiftExtension 0.00 % 0 0
KlaviyoSwiftTests 73.52 % 5679 7724
  Klaviyo.swift 86.78 % 105 121
  SDKRequestIterator.swift 0.00 % 0 148
  Cancellation.swift 86.18 % 212 246
  KlaviyoModels.swift 100.00 % 70 70
  AppContextInfo.swift 53.25 % 41 77
  KlaviyoTestUtils.swift 84.40 % 92 109
  StateChangePublisher.swift 43.18 % 19 44
  FileUtils.swift 95.65 % 22 23
  ArchivalUtilsTests.swift 100.00 % 128 128
  StateManagement.swift 93.12 % 433 465
  InternalAPIModels.swift 97.56 % 160 164
  StateChangePublisherTests.swift 99.18 % 242 244
  AppLifeCycleEvents.swift 100.00 % 76 76
  KlaviyoAPITests.swift 83.86 % 187 223
  Publisher.swift 46.15 % 66 143
  KlaviyoState.swift 77.75 % 325 418
  Effect.swift 39.86 % 116 291
  StateManagementTests.swift 99.85 % 671 672
  ConcurrencySupport.swift 3.03 % 4 132
  Create.swift 90.21 % 129 143
  TestData.swift 100.00 % 50 50
  TestStore.swift 36.69 % 390 1063
  LoggerClient.swift 0.00 % 0 1
  KlaviyoAPI.swift 92.66 % 101 109
  StateManagementEdgeCaseTests.swift 100.00 % 403 403
  ArchivalUtils.swift 100.00 % 42 42
  SimpleMockURLProtocol.swift 100.00 % 12 12
  ReachabilitySwift.swift 18.94 % 43 227
  Store.swift 59.63 % 192 322
  NetworkSessionTests.swift 100.00 % 22 22
  AppLifeCycleEventsTests.swift 96.03 % 242 252
  FileUtilsTests.swift 84.78 % 39 46
  EncodableTests.swift 100.00 % 68 68
  KlaviyoStateTests.swift 95.05 % 192 202
  KlaviyoEnvironment.swift 41.76 % 38 91
  NetworkSession.swift 61.33 % 46 75
  KlaviyoSDKTests.swift 98.00 % 147 150
  Misc.swift 34.93 % 51 146
  APIRequestErrorHandling.swift 97.12 % 101 104
  APIRequestErrorHandlingTests.swift 100.00 % 402 402
Total 70.79 % 8071 11402

Details

Test Details

KlaviyoSwiftTestsback

APIRequestErrorHandlingTests back

SuccessFailureSkippedExpected Failure⏱️
15 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testMissingOrInvalidResponse()
Successtest-method testRateLimitErrorWithExistingBackoffRetry()
Successtest-method testRateLimitErrorWithExistingRetry()
Successtest-method testRetryWithRetryAfter()
Successtest-method testSendRequestDataDecodingError()
Successtest-method testSendRequestFailureIncrementsRetryCount()
Successtest-method testSendRequestFailureWithBackoff()
Successtest-method testSendRequestHttpFailureDequesRequest()
Successtest-method testSendRequestHttpFailureForEmailResetsStateAndDequesRequest()
Successtest-method testSendRequestHttpFailureForPhoneNumberResetsStateAndDequesRequest()
Successtest-method testSendRequestInternalError()
Successtest-method testSendRequestInternalRequestError()
Successtest-method testSendRequestInvalidData()
Successtest-method testSendRequestMaxRetries()
Successtest-method testSendRequestUnknownError()

AppLifeCycleEventsTests back

SuccessFailureSkippedExpected Failure⏱️
11 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testAppBackgroundGetsStopAction()
Successtest-method testAppBackgroundStopsReachability()
Successtest-method testAppBecomeActiveGetsStartAction()
Successtest-method testAppBecomesActiveStartsReachibility()
Successtest-method testAppTerminateGetsStopAction()
Successtest-method testAppTerminateStopsReachability()
Successtest-method testReachabilityNotificationStatusHandled()
Successtest-method testReachabilityStartFailureIsHandled()
Successtest-method testReachabilityStatusNilThenNotNil()
Successtest-method testReachaibilityNotificationGetsRightAction()
Successtest-method testStartReachabilityCalledOnSubscription()

ArchivalSystemTest back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testArchiveUnarchive()

ArchivalUtilsTests back

SuccessFailureSkippedExpected Failure⏱️
8 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testArchiveFails()
Successtest-method testArchiveUnarchive()
Successtest-method testArchiveWriteFails()
Successtest-method testUnarchive()
Successtest-method testUnarchiveInvalidData()
Successtest-method testUnarchiveUnableToRemoveFile()
Successtest-method testUnarchiveUnarchiveFails()
Successtest-method testUnarchiveWhereFileDoesNotExist()

EncodableTests back

SuccessFailureSkippedExpected Failure⏱️
7 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testEventPayloadWithMetadata()
Successtest-method testEventPayloadWithoutMetadata()
Successtest-method testKlaviyoRequest()
Successtest-method testKlaviyoState()
Successtest-method testProfilePayload()
Successtest-method testTokenPayload()
Successtest-method testUnregisterTokenPayload()

FileUtilsTests back

SuccessFailureSkippedExpected Failure⏱️
2 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testFilePathForData()
Successtest-method testRemoveItemWithError()

KlaviyoAPITests back

SuccessFailureSkippedExpected Failure⏱️
4 (57%)3 (43%)0 (0%)0 (0%)0.00s
Successtest-method testEncodingError()
Successtest-method testInvalidStatusCode()
Successtest-method testInvalidURL()
Successtest-method testNetworkError()
Failuretest-method testSuccessfulResponseWithEvent()back
Failuretest-method testSuccessfulResponseWithProfile()back
Failuretest-method testSuccessfulResponseWithStoreToken()back

KlaviyoSwiftTests.xctest back

SuccessFailureSkippedExpected Failure⏱️
0 (0%)0 (0%)0 (0%)0 (0%)0.00s

All tests passed 🎉

KlaviyoSDKTests back

SuccessFailureSkippedExpected Failure⏱️
11 (100%)0 (0%)0 (0%)0 (0%)3.72s
Successtest-method testCreateEvent()
Successtest-method testCreateEventFromDocumentation()
Successtest-method testHandlePushNotification()
Successtest-method testInitializeSDk()
Successtest-method testKlaviyoSDKInit()
Successtest-method testPropertyGetters()
Successtest-method testSetExternalId()
Successtest-method testSetFirstName()
Successtest-method testSetProfile()
Successtest-method testSetPushToken()
Successtest-method testUnhandlePushNotification()

KlaviyoStateTests back

SuccessFailureSkippedExpected Failure⏱️
4 (50%)4 (50%)0 (0%)0 (0%)0.02s
Successtest-method testBackgroundStates()
Successtest-method testFullKlaviyoStateEncodingDecodingIsEqual()
Failuretest-method testLoadNewKlaviyoState()back

Activities:
  • Attached Failure Diff
Successtest-method testPushEnablementStates()
Successtest-method testSaveKlaviyoStateWithMissingApiKeyLogsError()
Failuretest-method testStateFileExistsInvalidData()back

Activities:
  • Attached Failure Diff
Failuretest-method testStateFileExistsInvalidJSON()back

Activities:
  • Attached Failure Diff
Failuretest-method testValidStateFileExists()back

Activities:
  • Attached Failure Diff

NetworkSessionTests back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.08s
Successtest-method testCreateEmphemeralSesionHeaders()
Successtest-method testDefaultUserAgent()
Successtest-method testSessionDataTask()

StateChangePublisherTests back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testQuickStateUpdatesTriggerOnlyOneSaves()
Successtest-method testStateChangeDuplicateAreRemoved()
Successtest-method testStateChangePublisher()

StateManagementEdgeCaseTests back

SuccessFailureSkippedExpected Failure⏱️
24 (100%)0 (0%)0 (0%)0 (0%)0.02s
Successtest-method testCompleteInitializationWhileAlreadyInitialized()
Successtest-method testCompleteInitializationWithExistingIdentifiers()
Successtest-method testEnqueueEventUninitialized()
Successtest-method testInitializeAfterInitialized()
Successtest-method testInitializeWhileInitializing()
Successtest-method testNetworkStatusChangedUninitialized()
Successtest-method testSendRequestBeforeInitialization()
Successtest-method testSetEmailMissingAnonymousIdStillSetsEmail()
Successtest-method testSetEmailUninitialized()
Successtest-method testSetEmptyEmail()
Successtest-method testSetEmptyExternalId()
Successtest-method testSetEmptyPhoneNumber()
Successtest-method testSetExternalIdMissingAnonymousIdStillSetsExternalId()
Successtest-method testSetExternalIdUninitialized()
Successtest-method testSetPhoneNumberMissingApiKeyStillSetsPhoneNumber()
Successtest-method testSetPhoneNumberUninitialized()
Successtest-method testSetProfileUnitialized()
Successtest-method testSetProfileWithEmptyStringIdentifiers()
Successtest-method testSetPushTokenUninitialized()
Successtest-method testSetPushTokenWithMissingAnonymousId()
Successtest-method testStartUninitialized()
Successtest-method testStopInitializing()
Successtest-method testStopUninitialized()
Successtest-method testTokenRequestMissingApiKey()

StateManagementTests back

SuccessFailureSkippedExpected Failure⏱️
20 (95%)1 (5%)0 (0%)0 (0%)0.01s
Successtest-method testEmptyQueueDoesNotFlush()
Successtest-method testEnqueueEventWhenInitilizingSendsEvent()
Successtest-method testEnqueueEvent()
Successtest-method testFlushQueueDuringExponentialBackoff()
Failuretest-method testFlushQueueExponentialBackoffGoesToSize()back
Successtest-method testFlushQueueWithMultipleRequests()
Successtest-method testFlushUninitializedQueueDoesNotFlush()
Successtest-method testFlushWithPendingProfile()
Successtest-method testInitializeSubscribesToAppropriatePublishers()
Successtest-method testInitialize()
Successtest-method testNetworkConnectivityChanges()
Successtest-method testQueueThatIsFlushingDoesNotFlush()
Successtest-method testSendRequestWhenNotFlushing()
Successtest-method testSendRequestWithNoRequestsInFlight()
Successtest-method testSetEmail()
Successtest-method testSetExternalId()
Successtest-method testSetPhoneNumber()
Successtest-method testSetProfileWithExistingProperties()
Successtest-method testSetPushTokenMultipleTimes()
Successtest-method testSetPushToken()
Successtest-method testStopWithRequestsInFlight()

Annotations

Check failure on line 78 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift

See this annotation in the file changed.

@github-actions github-actions / Xcode test results

Assertion Failure

failed - Snapshot does not match reference.

@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testLoadNewKlaviyoState.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testLoadNewKlaviyoState.1.txt"

To configure output for a custom diff tool, like Kaleidoscope:

    SnapshotTesting.diffTool = "ksdiff"

@@ −14,6 +14,6 @@
   - pushTokenData: Optional<PushTokenData>.none
   - queue: 0 elements
   - requestsInFlight: 0 elements
   ▿ retryInfo: RetryInfo
−    - retry: 0
+    - retry: 1

Check failure on line 94 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift

See this annotation in the file changed.

@github-actions github-actions / Xcode test results

Assertion Failure

failed - Snapshot does not match reference.

@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testStateFileExistsInvalidData.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testStateFileExistsInvalidData.1.txt"

To configure output for a custom diff tool, like Kaleidoscope:

    SnapshotTesting.diffTool = "ksdiff"

@@ −14,6 +14,6 @@
   - pushTokenData: Optional<PushTokenData>.none
   - queue: 0 elements
   - requestsInFlight: 0 elements
   ▿ retryInfo: RetryInfo
−    - retry: 0
+    - retry: 1

Check failure on line 109 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift

See this annotation in the file changed.

@github-actions github-actions / Xcode test results

Assertion Failure

failed - Snapshot does not match reference.

@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testStateFileExistsInvalidJSON.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testStateFileExistsInvalidJSON.1.txt"

To configure output for a custom diff tool, like Kaleidoscope:

    SnapshotTesting.diffTool = "ksdiff"

@@ −14,6 +14,6 @@
   - pushTokenData: Optional<PushTokenData>.none
   - queue: 0 elements
   - requestsInFlight: 0 elements
   ▿ retryInfo: RetryInfo
−    - retry: 0
+    - retry: 1

Check failure on line 122 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift

See this annotation in the file changed.

@github-actions github-actions / Xcode test results

Assertion Failure

failed - Snapshot does not match reference.

@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testValidStateFileExists.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testValidStateFileExists.1.txt"

To configure output for a custom diff tool, like Kaleidoscope:

    SnapshotTesting.diffTool = "ksdiff"

@@ −14,6 +14,6 @@
   - pushTokenData: Optional<PushTokenData>.none
   - queue: 0 elements
   - requestsInFlight: 0 elements
   ▿ retryInfo: RetryInfo
−    - retry: 0
+    - retry: 1

Check failure on line 294 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/StateManagementTests.swift

See this annotation in the file changed.

@github-actions github-actions / Xcode test results

Assertion Failure

A state change does not match expectation: …

      KlaviyoState(
        apiKey: "fake-key",
        email: nil,
        anonymousId: "00000000-0000-0000-0000-000000000001",
        phoneNumber: nil,
        externalId: nil,
        pushTokenData: KlaviyoState.PushTokenData(…),
        queue: [],
        requestsInFlight: [],
        initalizationState: KlaviyoState.InitializationState.initialized,
        flushing: false,
        flushInterval: 10.0,
    −   retryInfo: RetryInfo.retry(0)
    +   retryInfo: RetryInfo.retry(1)
        pendingRequests: [],
        pendingProfile: nil
      )

(Expected: −, Actual: +)