Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 52 lines (40 sloc) 1.051 kb
212985b @gabriel Reversing the stderr redirect. Should handle that in the Makefile
gabriel authored
1 //
2 // GHTestMacrosTest.m
3 // GHUnit
4 //
5 // Created by Gabriel Handford on 7/30/09.
d4110e1 @gabriel Flexible layout, working with iPad.
gabriel authored
6 // Copyright 2009. All rights reserved.
212985b @gabriel Reversing the stderr redirect. Should handle that in the Makefile
gabriel authored
7 //
8
9
10 #import "GHTestCase.h"
11
12 @interface GHTestMacrosTest : GHTestCase { }
13 @end
14
15 @implementation GHTestMacrosTest
16
17 - (void)testEquals {
e771172 @gabriel Tabs to spaces:
gabriel authored
18 GHAssertEqualsWithAccuracy(15.0, 15.000001, 0.001, nil);
efee86b @gabriel Updating test
gabriel authored
19 }
20
21 - (void)testEqualsAccuracyMessage {
e771172 @gabriel Tabs to spaces:
gabriel authored
22 GHAssertThrows({
23 GHAssertEqualsWithAccuracy(15.0, 16.0, 0.001, nil);
24 }, nil);
212985b @gabriel Reversing the stderr redirect. Should handle that in the Makefile
gabriel authored
25 }
26
9d2bf8a @gabriel Updating build & target
gabriel authored
27 - (void)testEqualsCGFloat {
28 CGFloat expectedX = 100;
29 CGFloat actualX = 200;
30 GHAssertThrows({
31 GHAssertEquals(actualX, expectedX, @"Expected failure");
32 }, nil);
33 }
34
56c0c22 @gabriel Sanity check for NSLog
gabriel authored
35 - (void)testNSLog {
e771172 @gabriel Tabs to spaces:
gabriel authored
36 NSLog(@"Testing NSLog");
37 // TODO(gabe): Test this was output
56c0c22 @gabriel Sanity check for NSLog
gabriel authored
38 }
39
609c954 @gabriel Updating examples
gabriel authored
40 - (void)testGHAssertNotEqualStrings_EXPECTED {
41 GHAssertNotEqualStrings(@"a", @"a", nil);
42 }
43
f626583 @gabriel Updating documentation for Doxygen
gabriel authored
44 - (void)testGHAssertNotEqualStrings {
45 GHAssertNotEqualStrings(@"a", @"b", nil);
46 GHAssertNotEqualStrings(@"a", nil, nil);
47 GHAssertNotEqualStrings(nil, @"a", nil);
48 GHAssertThrows({ GHAssertNotEqualStrings(@"a", @"a", nil); }, nil);
49 }
50
514edfa @gabriel Adding new lines at EOF.
gabriel authored
51 @end
Something went wrong with that request. Please try again.