You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add OPTLYEventMetricNameValue
* Promote OPTLYEventMetric 'long value' to 'NSNumber *value'
* Factor out revenueValue:value:
* Add numericValue:value: and 3 new NSString constants to OPTLYLoggerMessages.m+.h
* kEventValue --> kEventRevenue in OPTLYEventBuilderTest.m
* Adding more '#pragma mark's to OPTLYEventBuilderTest.m
* Add testBuildEventTicketWithValue
* Clarify purpose of 3 'revenue' tests with comments and better names
* Add testBuildEventTicketWithStringValue . Fix numericValue:value: bug.
* Add testBuildEventTicketWithNANValue and testBuildEventTicketWithINFINITYValue
* Add testBuildEventTicketWithTooLargeDoubleRevenue and improve revenueValue:value:
* Add testBuildEventTicketWithInvalidObjectValue
* Improve 3 tests and fix 2 mistakes in numericValue:value:
* Add 'Check eventMatrics details' to 2 tests and update createEventMetrics:eventTags:
* Add testBuildEventTicketWithHugeUnsignedLongLongRevenue . Wax and shine revenueValue:value: .
* Use 'for (NSDictionary *eventMetric in eventMetrics)' in checkEventTicket:...
* Refactor similar code into checkEventMetricsDetails:... subroutine.
* Improve test rigor with 4 more calls to checkEventMetricsDetails:...
* Improve flexibility of checkEventMetricsDetails:...
* Improve test rigor with 6 more calls to checkEventMetricsDetails:...
* Improve test rigor with 3 more calls to checkEventMetricsDetails:...
* Add commonBuildEventTicketTest:sentEventTags: and refactor many testBuildEventXxx
* Add 8 more test methods to allowed and disallowed boundary cases.
* NSAssert --> XCTAssert in OPTLYEventBuilderTest.m
* Add testBuildEventTicketWithRevenueAndValue
* OASIS-1706 Numeric metrics support in SDK
Summary:
Numeric metrics support in SDK
The shortest summary possible is "Add new 'value' event key that allows 'double'
values similar to the preexisting 'revenue' event key that allows 'long long'
values and 'revenue' is retained."
Add OPTLYEventMetricNameValue
Promote OPTLYEventMetric 'long value' to 'NSNumber *value'
Factor out revenueValue:value:
Add numericValue:value: and 3 new NSString constants to OPTLYLoggerMessages.m+.h
kEventValue --> kEventRevenue in OPTLYEventBuilderTest.m
Adding more '#pragma mark's to OPTLYEventBuilderTest.m
Add testBuildEventTicketWithValue
Clarify purpose of 3 'revenue' tests with comments and better names
Add testBuildEventTicketWithStringValue . Fix numericValue:value: bug.
Add testBuildEventTicketWithNANValue and testBuildEventTicketWithINFINITYValue
Add testBuildEventTicketWithTooLargeDoubleRevenue and improve revenueValue:value:
Add testBuildEventTicketWithInvalidObjectValue
Improve 3 tests and fix 2 mistakes in numericValue:value:
Add 'Check eventMatrics details' to 2 tests and update createEventMetrics:eventTags:
Add testBuildEventTicketWithHugeUnsignedLongLongRevenue . Wax and shine revenueValue:value: .
Merge branch 'master' into kroach/OASIS-1706-numeric
Use 'for (NSDictionary *eventMetric in eventMetrics)' in checkEventTicket:...
Refactor similar code into checkEventMetricsDetails:... subroutine.
Improve test rigor with 4 more calls to checkEventMetricsDetails:...
Improve flexibility of checkEventMetricsDetails:...
Improve test rigor with 6 more calls to checkEventMetricsDetails:...
Improve test rigor with 3 more calls to checkEventMetricsDetails:...
Add commonBuildEventTicketTest:sentEventTags: and refactor many testBuildEventXxx
Add 8 more test methods to allowed and disallowed boundary cases.
NSAssert --> XCTAssert in OPTLYEventBuilderTest.m
Add testBuildEventTicketWithRevenueAndValue
Rebuild 2 universal frameworks
Test Plan:
* 8 iOS test suites PASSED [from (10) above]
* OptimizelySDKiOSUniversalTests PASSED
* OptimizelySDKiOS Product > Analyze PASSED
* OptimizelyiOSDemoApp PASSED
* 7 tvOS test suites PASSED
* OptimizelySDKTVOSUniversalTests PASSED
* OptimizelyTVOSDemoApp PASSED
* sh ./Scripts/local_travis.sh PASSED
Reviewers: alda
JIRA Issues: OASIS-1706
Differential Revision: https://phabricator.optimizely.com/D17497
* ARM 'IEEE 754 arithmetic' comment
* Add 'char' and 'unsigned char' cases to 'if' test in OPTLYEventBuilder.m
* Add OPTLYLoggerMessagesRevenueValueIntegerOverflow and OPTLYLoggerMessagesRevenueValueFloatOverflow
* OPTLYEventBuilder.m comments
* Cast should have been to (NSString*)
* Add OPTLYLoggerMessagesNumericValueString
* Adopt testRevenueMetricXxx and testValueMetricXxx method names
* Add 'bool' type to 'if' test
* Disallow 'boolean' NSNumber's. Add testObjectiveCBooleans and testValueMetricWithBoolean .
* Add testObjectiveCCharNSNumbers
Copy file name to clipboardExpand all lines: OptimizelySDKCore/OptimizelySDKCore/OPTLYLoggerMessages.m
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -97,11 +97,18 @@
97
97
NSString *const OPTLYLoggerMessagesUserIdInvalid = @"[EVENT BUILDER] User ID cannot be an empty string.";
98
98
NSString *const OPTLYLoggerMessagesVariationIdInvalid = @"[EVENT BUILDER] Variation ID cannot be an empty string.";
99
99
NSString *const OPTLYLoggerMessagesEventNotPassAudienceEvaluation = @"[EVENT BUILDER] None of the experiments of %@ pass audience evaluation.";
100
-
NSString *const OPTLYLoggerMessagesReveneuValueInvalidInteger = @"[EVENT BUILDER] Provided revenue value is an invalid integer type and will be cast to the integer: %llu.";
101
-
NSString *const OPTLYLoggerMessagesRevenueValueString = @"[EVENT BUILDER] Provided revenue value is a string and will be cast to the integer: %llu.";
100
+
NSString *const OPTLYLoggerMessagesRevenueValueFloat = @"[EVENT BUILDER] Provided float revenue value %@ will be cast to integer %@.";
101
+
NSString *const OPTLYLoggerMessagesRevenueValueString = @"[EVENT BUILDER] Provided string revenue value will be cast to integer %@.";
102
+
NSString *const OPTLYLoggerMessagesRevenueValueIntegerOverflow = @"[EVENT BUILDER] Provided unsigned long long revenue value %@ overflows long long type and will not be sent to results.";
103
+
NSString *const OPTLYLoggerMessagesRevenueValueFloatOverflow = @"[EVENT BUILDER] Provided float revenue value %@ overflows long long type and will not be sent to results.";
104
+
NSString *const OPTLYLoggerMessagesRevenueValueInvalidBoolean = @"[EVENT BUILDER] Provided revenue value %@ is an invalid boolean type and will not be sent to results.";
102
105
NSString *const OPTLYLoggerMessagesRevenueValueInvalid = @"[EVENT BUILDER] Provided revenue value is in an invalid format and will not be sent to results.";
103
-
NSString *const OPTLYLoggerMessagesEventTagValueInvalid = @"[EVENT BUILDER] Provided event tag %@ is neither an integer nor a string; skipping.";
104
-
106
+
NSString *const OPTLYLoggerMessagesNumericValueString = @"[EVENT BUILDER] Provided string numeric value will be cast to float %@.";
107
+
NSString *const OPTLYLoggerMessagesNumericValueInvalidBoolean = @"[EVENT BUILDER] Provided numeric value %@ is an invalid boolean type and will not be sent to results.";
108
+
NSString *const OPTLYLoggerMessagesNumericValueInvalidFloat = @"[EVENT BUILDER] Provided numeric value %@ is an invalid float type and will not be sent to results.";
109
+
NSString *const OPTLYLoggerMessagesNumericValueInvalidString = @"[EVENT BUILDER] Provided numeric value is a string %@ that could not be cast to a valid float.";
110
+
NSString *const OPTLYLoggerMessagesNumericValueInvalid = @"[EVENT BUILDER] Provided numeric value is in an invalid format and will not be sent to results.";
111
+
NSString *const OPTLYLoggerMessagesEventTagValueInvalid = @"[EVENT BUILDER] Provided event tag %@ is neither an integer nor a string and will not be sent to results.";
0 commit comments