summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/LoggingSpecs
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-03-09 13:50:45 -0500
committerJoel Fischer <joeljfischer@gmail.com>2017-03-09 13:50:45 -0500
commited6b571e7cb202ad0f017c81d52f44f4f0f1d9d9 (patch)
treeed26eabc4ef8e616af2af6d18441fcef0db297e1 /SmartDeviceLinkTests/LoggingSpecs
parente1e8441d4c48e4acf9ae7c909621584e1824a305 (diff)
downloadsdl_ios-ed6b571e7cb202ad0f017c81d52f44f4f0f1d9d9.tar.gz
Fix logging tests
Diffstat (limited to 'SmartDeviceLinkTests/LoggingSpecs')
-rw-r--r--SmartDeviceLinkTests/LoggingSpecs/SDLLogConfigurationSpec.m15
1 files changed, 13 insertions, 2 deletions
diff --git a/SmartDeviceLinkTests/LoggingSpecs/SDLLogConfigurationSpec.m b/SmartDeviceLinkTests/LoggingSpecs/SDLLogConfigurationSpec.m
index 6499873bc..700e2af16 100644
--- a/SmartDeviceLinkTests/LoggingSpecs/SDLLogConfigurationSpec.m
+++ b/SmartDeviceLinkTests/LoggingSpecs/SDLLogConfigurationSpec.m
@@ -2,6 +2,7 @@
#import <Nimble/Nimble.h>
#import "SDLLogTargetASL.h"
+#import "SDLLogTargetOSLog.h"
#import "SDLLogConfiguration.h"
QuickSpecBegin(SDLLogConfigurationSpec)
@@ -16,11 +17,16 @@ describe(@"a log configuration", ^{
expect(testConfiguration.modules).toNot(beEmpty());
expect(testConfiguration.filters).to(beEmpty());
expect(@(testConfiguration.targets.count)).to(equal(@1));
- expect([testConfiguration.targets anyObject].class).to(equal([SDLLogTargetASL class]));
expect(@(testConfiguration.formatType)).to(equal(@(SDLLogFormatTypeDefault)));
expect(@(testConfiguration.asynchronous)).to(equal(@YES));
expect(@(testConfiguration.errorsAsynchronous)).to(equal(@NO));
expect(@(testConfiguration.globalLogLevel)).to(equal(@(SDLLogLevelError)));
+
+ if ([NSProcessInfo processInfo].operatingSystemVersion.majorVersion >= 10) {
+ expect([testConfiguration.targets anyObject].class).to(equal([SDLLogTargetOSLog class]));
+ } else {
+ expect([testConfiguration.targets anyObject].class).to(equal([SDLLogTargetASL class]));
+ }
});
});
@@ -31,11 +37,16 @@ describe(@"a log configuration", ^{
expect(testConfiguration.modules).toNot(beEmpty());
expect(testConfiguration.filters).to(beEmpty());
expect(@(testConfiguration.targets.count)).to(equal(@1));
- expect([testConfiguration.targets anyObject].class).to(equal([SDLLogTargetASL class]));
expect(@(testConfiguration.formatType)).to(equal(@(SDLLogFormatTypeDetailed)));
expect(@(testConfiguration.asynchronous)).to(equal(@YES));
expect(@(testConfiguration.errorsAsynchronous)).to(equal(@NO));
expect(@(testConfiguration.globalLogLevel)).to(equal(@(SDLLogLevelDebug)));
+
+ if ([NSProcessInfo processInfo].operatingSystemVersion.majorVersion >= 10) {
+ expect([testConfiguration.targets anyObject].class).to(equal([SDLLogTargetOSLog class]));
+ } else {
+ expect([testConfiguration.targets anyObject].class).to(equal([SDLLogTargetASL class]));
+ }
});
});
});