Catch/projects/XCode3/OCTest/CatchOCTestCase.mm
Phil Nash 458e5eec16 Xcode 4, warnings and MinGW
Added separate Xcode 4 project.
Fixed some warnings.
Fixed OutputDebugString decl for MinGW
2011-12-27 10:59:41 +00:00

46 lines
780 B
Plaintext

//
// CatchOCTestCase.mm
// OCTest
//
// Created by Phil Nash on 13/11/2010.
// Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#import "CatchOCTestCase.h"
@implementation TestFixture
-(void) setUp
{
obj = [[TestObj alloc] init];
}
-(void) tearDown
{
[obj release];
}
OC_TEST_CASE( "OCTest/test1", "This is a test case" )
{
REQUIRE( obj.int_val == 0 );
obj.int_val = 1;
REQUIRE( obj.int_val == 1 );
}
OC_TEST_CASE( "OCTest/test2", "This is another test case" )
{
REQUIRE( obj.int_val == 0 );
obj.int_val = 2;
REQUIRE( obj.int_val == 2 );
}
@end