mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 13:25:41 +02:00
Added tests to iOStest
Currently fails to build for ARM due to Github issue #61
This commit is contained in:
27
projects/XCode4/iOSTest/iOSTest/OCTest.mm
Normal file
27
projects/XCode4/iOSTest/iOSTest/OCTest.mm
Normal 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];
|
||||
}
|
21
projects/XCode4/iOSTest/iOSTest/TestObj.h
Normal file
21
projects/XCode4/iOSTest/iOSTest/TestObj.h
Normal 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
|
18
projects/XCode4/iOSTest/iOSTest/TestObj.m
Normal file
18
projects/XCode4/iOSTest/iOSTest/TestObj.m
Normal 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
|
Reference in New Issue
Block a user