Catch/Test/Xcode/OCTest/CatchOCTestCase.mm

44 lines
625 B
Plaintext
Raw Normal View History

2010-11-14 17:47:30 -05:00
//
// CatchOCTestCase.mm
// OCTest
//
// Created by Phil Nash on 13/11/2010.
// Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
//
#import "CatchOCTestCase.h"
@implementation TestFixture
2010-11-16 02:00:08 -05:00
-(void) setUp
2010-11-14 17:47:30 -05:00
{
2010-11-16 02:00:08 -05:00
obj = [[TestObj alloc] init];
2010-11-14 17:47:30 -05:00
}
2010-11-16 02:00:08 -05:00
-(void) tearDown
2010-11-14 17:47:30 -05:00
{
[obj release];
}
OC_TEST_CASE( "OCTest/test1", "This is a test case" )
{
REQUIRE( obj.int_val == 0 );
2010-11-14 17:47:30 -05:00
obj.int_val = 1;
REQUIRE( obj.int_val == 1 );
2010-11-14 17:47:30 -05:00
}
OC_TEST_CASE( "OCTest/test2", "This is another test case" )
{
REQUIRE( obj.int_val == 0 );
2010-11-14 17:47:30 -05:00
obj.int_val = 2;
REQUIRE( obj.int_val == 2 );
2010-11-14 17:47:30 -05:00
}
@end