aboutsummaryrefslogtreecommitdiff
path: root/AppKit
diff options
context:
space:
mode:
authorGravatar thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-01-29 19:57:52 +0000
committerGravatar thomasvl <thomasvl@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-01-29 19:57:52 +0000
commit038074fa41a100c52f98536b1c4f47e5e748d8eb (patch)
tree317ea9cdc19c26bb883ca6394598e4640767fc49 /AppKit
parent2a5219567634ab7ab74314ff3615132becadff4a (diff)
use the better testing macro so failures log
Diffstat (limited to 'AppKit')
-rw-r--r--AppKit/GTMLinearRGBShadingTest.m12
-rw-r--r--AppKit/GTMNSWorkspace+ThemeTest.m3
2 files changed, 8 insertions, 7 deletions
diff --git a/AppKit/GTMLinearRGBShadingTest.m b/AppKit/GTMLinearRGBShadingTest.m
index 6407e71..70b67b7 100644
--- a/AppKit/GTMLinearRGBShadingTest.m
+++ b/AppKit/GTMLinearRGBShadingTest.m
@@ -17,10 +17,10 @@
//
#import <SenTestingKit/SenTestingKit.h>
+#import "GTMSenTestCase.h"
#import "GTMLinearRGBShading.h"
#import "GTMNSColor+Theme.h"
-
@interface GTMLinearRGBShadingTest : SenTestCase
@end
@@ -35,7 +35,7 @@
toColor:blue
fromSpaceNamed:NSDeviceRGBColorSpace];
STAssertNotNil(theShading,nil);
- STAssertTrue([theShading stopCount] == 2, nil);
+ STAssertEquals([theShading stopCount], 2U, nil);
float *theColor = (float*)[theShading valueAtPosition: 0.5];
STAssertTrue(theColor[0] == [purple redComponent] &&
theColor[1] == [purple greenComponent] &&
@@ -77,8 +77,8 @@
atPositions:nil
count:0];
CGFunctionRef theFunction = [theShading shadeFunction];
- STAssertTrue(nil != theFunction, nil);
- STAssertTrue(CFGetTypeID(theFunction) == CGFunctionGetTypeID(), nil);
+ STAssertNotNULL(theFunction, nil);
+ STAssertEquals(CFGetTypeID(theFunction), CGFunctionGetTypeID(), nil);
}
- (void)testColorSpace {
@@ -88,7 +88,7 @@
atPositions:nil
count:0];
CGColorSpaceRef theColorSpace = [theShading colorSpace];
- STAssertTrue(nil != theColorSpace, nil);
- STAssertTrue(CFGetTypeID(theColorSpace) == CGColorSpaceGetTypeID(), nil);
+ STAssertNotNULL(theColorSpace, nil);
+ STAssertEquals(CFGetTypeID(theColorSpace), CGColorSpaceGetTypeID(), nil);
}
@end
diff --git a/AppKit/GTMNSWorkspace+ThemeTest.m b/AppKit/GTMNSWorkspace+ThemeTest.m
index 213de22..ae1cb66 100644
--- a/AppKit/GTMNSWorkspace+ThemeTest.m
+++ b/AppKit/GTMNSWorkspace+ThemeTest.m
@@ -17,6 +17,7 @@
//
#import <SenTestingKit/SenTestingKit.h>
+#import "GTMSenTestCase.h"
#import "GTMNSWorkspace+Theme.h"
@interface GTMNSWorkspace_ThemeTest : SenTestCase
@@ -32,6 +33,6 @@
- (void)testThemeScrollBarArrowStyle {
ThemeScrollBarArrowStyle style = [[NSWorkspace sharedWorkspace] gtm_themeScrollBarArrowStyle];
- STAssertTrue(style <= kThemeScrollBarArrowsDouble, nil);
+ STAssertLessThanOrEqual(style, (ThemeScrollBarArrowStyle)kThemeScrollBarArrowsDouble, nil);
}
@end