Skip to content

Commit

Permalink
fix: typo for infinite
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoweii committed Jun 2, 2024
1 parent 4c83ee4 commit f218f92
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ enum Event {
static let ATTRIBUTE_NAME_INVALID = 2_002
static let ATTRIBUTE_VALUE_LENGTH_EXCEED = 2_003
static let ATTRIBUTE_SIZE_EXCEED = 2_004
static let ATTRIBUTE_VALUE_NOT_FINITE = 2_005
static let ATTRIBUTE_VALUE_INFINITE = 2_005
static let USER_ATTRIBUTE_SIZE_EXCEED = 3_001
static let USER_ATTRIBUTE_NAME_LENGTH_EXCEED = 3_002
static let USER_ATTRIBUTE_NAME_INVALID = 3_003
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ class EventChecker {
}
} else if !checkFinite(value) {
errorMsg = """
the value for attribute : \(key), is not finite\
the value for attribute : \(key), is infinite\
and the attribute will not be recorded
"""
let errorString = "the value for attribute name: \(key) is not finite"
error.errorCode = Event.ErrorCode.ATTRIBUTE_VALUE_NOT_FINITE
let errorString = "the value for attribute name: \(key) is infinite"
error.errorCode = Event.ErrorCode.ATTRIBUTE_VALUE_INFINITE
error.errorMessage = getErrorMessage(errorString)
}
if errorMsg != nil {
Expand Down
4 changes: 2 additions & 2 deletions Tests/ClickstreamTests/Clickstream/ClickstreamEventTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ClickstreamEventTest: XCTestCase {
XCTAssertNil(clickstreamEvent.attribute(forKey: "testKey"))
let errorCode = clickstreamEvent.attribute(forKey: Event.ReservedAttribute.ERROR_CODE) as! Int
let errorValueString = clickstreamEvent.attribute(forKey: Event.ReservedAttribute.ERROR_MESSAGE) as! String
XCTAssertEqual(Event.ErrorCode.ATTRIBUTE_VALUE_NOT_FINITE, errorCode)
XCTAssertEqual(Event.ErrorCode.ATTRIBUTE_VALUE_INFINITE, errorCode)
XCTAssertTrue(errorValueString.contains("testKey"))
}

Expand All @@ -77,7 +77,7 @@ class ClickstreamEventTest: XCTestCase {
XCTAssertNil(clickstreamEvent.attribute(forKey: "testKey"))
let errorCode = clickstreamEvent.attribute(forKey: Event.ReservedAttribute.ERROR_CODE) as! Int
let errorValueString = clickstreamEvent.attribute(forKey: Event.ReservedAttribute.ERROR_MESSAGE) as! String
XCTAssertEqual(Event.ErrorCode.ATTRIBUTE_VALUE_NOT_FINITE, errorCode)
XCTAssertEqual(Event.ErrorCode.ATTRIBUTE_VALUE_INFINITE, errorCode)
XCTAssertTrue(errorValueString.contains("testKey"))
}

Expand Down

0 comments on commit f218f92

Please sign in to comment.