Added tests to iOStest

Currently fails to build for ARM due to Github issue #61
This commit is contained in:
Phil Nash
2012-02-28 08:36:00 +00:00
parent e1f1c6ca7e
commit 25db95816e
4 changed files with 77 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/*
* OCTest.mm
* OCTest
*
* Created by Phil 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)
*
*/
#include "catch.hpp"
#import "TestObj.h"
TEST_CASE( "OCTest/TestObj", "tests TestObj" )
{
TestObj* obj = [[TestObj alloc] init];
REQUIRE( obj.int_val == 0 );
obj.int_val = 1;
REQUIRE( obj.int_val == 1 );
[obj release];
}

View File

@@ -0,0 +1,21 @@
//
// TestObj.h
// OCTest
//
// Created by Phil 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 <Foundation/Foundation.h>
@interface TestObj : NSObject {
int int_val;
}
@property (nonatomic, assign ) int int_val;
@end

View File

@@ -0,0 +1,18 @@
//
// TestObj.m
// OCTest
//
// Created by Phil 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 "TestObj.h"
@implementation TestObj
@synthesize int_val;
@end