diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2017-03-09 13:50:45 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2017-03-09 13:50:45 -0500 |
commit | ed6b571e7cb202ad0f017c81d52f44f4f0f1d9d9 (patch) | |
tree | ed26eabc4ef8e616af2af6d18441fcef0db297e1 /SmartDeviceLinkTests/LoggingSpecs | |
parent | e1e8441d4c48e4acf9ae7c909621584e1824a305 (diff) | |
download | sdl_ios-ed6b571e7cb202ad0f017c81d52f44f4f0f1d9d9.tar.gz |
Fix logging tests
Diffstat (limited to 'SmartDeviceLinkTests/LoggingSpecs')
-rw-r--r-- | SmartDeviceLinkTests/LoggingSpecs/SDLLogConfigurationSpec.m | 15 |
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])); + } }); }); }); |