// // MultipleLoggerTests.m // SOLogger // // Copyright 2010 Standard Orbit Software, LLC. All rights reserved. // // $Revision$ // $Author$ // $Date$ #import "ASLConnection.h" #pragma mark - @interface MultipleLoggerTests : SenTestCase { SOLogger *logger1, *logger2; } @end @implementation MultipleLoggerTests #pragma mark - #pragma mark Tests - (void) testMultipleLoggersInSingleThreadHaveDistinctASLClients { // Test on main thread STAssertTrue ([NSThread isMainThread], @"precondition violated"); logger1 = [[SOLogger alloc] initWithFacility:@"Test Logger 1" options:SOLoggerDefaultASLOptions]; logger2 = [[SOLogger alloc] initWithFacility:@"Test Logger 2" options:SOLoggerDefaultASLOptions]; ASLConnection *connection1 = [logger1 ASLConnection]; ASLConnection *connection2 = [logger2 ASLConnection]; // logger1 and logger2 should have distinct ASL connections on any given thread. STAssertNotNil (connection1, @"postcondition violated"); STAssertNotNil (connection2, @"postcondition violated"); STAssertTrue (connection1 != connection2, @"postcondition violated"); STAssertTrue ([connection1 aslclientRef] != [connection2 aslclientRef], @"postcondition violated"); } #pragma mark - #pragma mark Fixture - (void) setUp; { [super setUp]; } - (void) tearDown; { ReleaseAndNil (logger1); ReleaseAndNil (logger2); [super tearDown]; } @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 20722 | jdputsch | initial branch, prep for -Zapp= support | ||
//guest/michael_bishop/MacMenu/src/SOLogger/UnitTests/MultipleLoggerTests.m | |||||
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |