From d2e5e6ff1abec8b3b1579f122b7dcc89a35dbba4 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 14 Nov 2019 10:31:18 -0500 Subject: Tests: Organize Objective C/C++ test directories Move them all under `Tests/ObjC` and `Tests/ObjCXX`. --- Tests/CMakeLists.txt | 88 +--------------------- Tests/ObjC++/CMakeLists.txt | 6 -- Tests/ObjC++/objc++.mm | 23 ------ Tests/ObjC/CMakeLists.txt | 4 + Tests/ObjC/c-file-extension-test/CMakeLists.txt | 5 ++ Tests/ObjC/c-file-extension-test/main.m | 8 ++ Tests/ObjC/cxx-file-extension-test/CMakeLists.txt | 8 ++ Tests/ObjC/cxx-file-extension-test/main.m | 8 ++ Tests/ObjC/objc-file-extension-test/CMakeLists.txt | 6 ++ Tests/ObjC/objc-file-extension-test/main.m | 12 +++ Tests/ObjC/simple-build-test/CMakeLists.txt | 11 +++ Tests/ObjC/simple-build-test/foo.h | 9 +++ Tests/ObjC/simple-build-test/foo.m | 7 ++ Tests/ObjC/simple-build-test/main.m | 12 +++ Tests/ObjCXX/CMakeLists.txt | 4 + Tests/ObjCXX/ObjC++/CMakeLists.txt | 5 ++ Tests/ObjCXX/ObjC++/objc++.mm | 23 ++++++ .../ObjCXX/cxx-file-extension-test/CMakeLists.txt | 5 ++ Tests/ObjCXX/cxx-file-extension-test/main.mm | 8 ++ .../objcxx-file-extension-test/CMakeLists.txt | 6 ++ Tests/ObjCXX/objcxx-file-extension-test/main.mm | 14 ++++ Tests/ObjCXX/simple-build-test/CMakeLists.txt | 11 +++ Tests/ObjCXX/simple-build-test/foo.h | 9 +++ Tests/ObjCXX/simple-build-test/foo.mm | 7 ++ Tests/ObjCXX/simple-build-test/main.mm | 14 ++++ .../cxx-file-extension-test/CMakeLists.txt | 5 -- .../Objective-C++/cxx-file-extension-test/main.mm | 8 -- .../objcxx-file-extension-test/CMakeLists.txt | 6 -- .../objcxx-file-extension-test/main.mm | 14 ---- .../Objective-C++/simple-build-test/CMakeLists.txt | 11 --- Tests/Objective-C++/simple-build-test/foo.h | 9 --- Tests/Objective-C++/simple-build-test/foo.mm | 7 -- Tests/Objective-C++/simple-build-test/main.mm | 14 ---- .../c-file-extension-test/CMakeLists.txt | 5 -- Tests/Objective-C/c-file-extension-test/main.m | 8 -- .../cxx-file-extension-test/CMakeLists.txt | 8 -- Tests/Objective-C/cxx-file-extension-test/main.m | 8 -- .../objc-file-extension-test/CMakeLists.txt | 6 -- Tests/Objective-C/objc-file-extension-test/main.m | 12 --- Tests/Objective-C/simple-build-test/CMakeLists.txt | 11 --- Tests/Objective-C/simple-build-test/foo.h | 9 --- Tests/Objective-C/simple-build-test/foo.m | 7 -- Tests/Objective-C/simple-build-test/main.m | 12 --- 43 files changed, 198 insertions(+), 275 deletions(-) delete mode 100644 Tests/ObjC++/CMakeLists.txt delete mode 100644 Tests/ObjC++/objc++.mm create mode 100644 Tests/ObjC/CMakeLists.txt create mode 100644 Tests/ObjC/c-file-extension-test/CMakeLists.txt create mode 100644 Tests/ObjC/c-file-extension-test/main.m create mode 100644 Tests/ObjC/cxx-file-extension-test/CMakeLists.txt create mode 100644 Tests/ObjC/cxx-file-extension-test/main.m create mode 100644 Tests/ObjC/objc-file-extension-test/CMakeLists.txt create mode 100644 Tests/ObjC/objc-file-extension-test/main.m create mode 100644 Tests/ObjC/simple-build-test/CMakeLists.txt create mode 100644 Tests/ObjC/simple-build-test/foo.h create mode 100644 Tests/ObjC/simple-build-test/foo.m create mode 100644 Tests/ObjC/simple-build-test/main.m create mode 100644 Tests/ObjCXX/CMakeLists.txt create mode 100644 Tests/ObjCXX/ObjC++/CMakeLists.txt create mode 100644 Tests/ObjCXX/ObjC++/objc++.mm create mode 100644 Tests/ObjCXX/cxx-file-extension-test/CMakeLists.txt create mode 100644 Tests/ObjCXX/cxx-file-extension-test/main.mm create mode 100644 Tests/ObjCXX/objcxx-file-extension-test/CMakeLists.txt create mode 100644 Tests/ObjCXX/objcxx-file-extension-test/main.mm create mode 100644 Tests/ObjCXX/simple-build-test/CMakeLists.txt create mode 100644 Tests/ObjCXX/simple-build-test/foo.h create mode 100644 Tests/ObjCXX/simple-build-test/foo.mm create mode 100644 Tests/ObjCXX/simple-build-test/main.mm delete mode 100644 Tests/Objective-C++/cxx-file-extension-test/CMakeLists.txt delete mode 100644 Tests/Objective-C++/cxx-file-extension-test/main.mm delete mode 100644 Tests/Objective-C++/objcxx-file-extension-test/CMakeLists.txt delete mode 100644 Tests/Objective-C++/objcxx-file-extension-test/main.mm delete mode 100644 Tests/Objective-C++/simple-build-test/CMakeLists.txt delete mode 100644 Tests/Objective-C++/simple-build-test/foo.h delete mode 100644 Tests/Objective-C++/simple-build-test/foo.mm delete mode 100644 Tests/Objective-C++/simple-build-test/main.mm delete mode 100644 Tests/Objective-C/c-file-extension-test/CMakeLists.txt delete mode 100644 Tests/Objective-C/c-file-extension-test/main.m delete mode 100644 Tests/Objective-C/cxx-file-extension-test/CMakeLists.txt delete mode 100644 Tests/Objective-C/cxx-file-extension-test/main.m delete mode 100644 Tests/Objective-C/objc-file-extension-test/CMakeLists.txt delete mode 100644 Tests/Objective-C/objc-file-extension-test/main.m delete mode 100644 Tests/Objective-C/simple-build-test/CMakeLists.txt delete mode 100644 Tests/Objective-C/simple-build-test/foo.h delete mode 100644 Tests/Objective-C/simple-build-test/foo.m delete mode 100644 Tests/Objective-C/simple-build-test/main.m diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index b29638b..57fa7fc 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2327,92 +2327,8 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CFBundleTest") - ADD_TEST_MACRO(ObjC++ ObjC++) - - add_test(Objective-C.simple-build-test ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/Objective-C/simple-build-test" - "${CMake_BINARY_DIR}/Tests/Objective-C/simple-build-test" - --build-two-config - ${build_generator_args} - --build-project simple-build-test - --build-options ${build_options} - --test-command simple-build-test - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Objective-C/simple-build-test") - - add_test(Objective-C.c-file-extension-test ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/Objective-C/c-file-extension-test" - "${CMake_BINARY_DIR}/Tests/Objective-C/c-file-extension-test" - --build-two-config - ${build_generator_args} - --build-project c-file-extension-test - --build-options ${build_options} - --test-command c-file-extension-test - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Objective-C/c-file-extension-test") - - add_test(Objective-C.cxx-file-extension-test ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/Objective-C/cxx-file-extension-test" - "${CMake_BINARY_DIR}/Tests/Objective-C/cxx-file-extension-test" - --build-two-config - ${build_generator_args} - --build-project cxx-file-extension-test - --build-options ${build_options} - --test-command cxx-file-extension-test - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Objective-C/cxx-file-extension-test") - - add_test(Objective-C.objc-file-extension-test ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/Objective-C/objc-file-extension-test" - "${CMake_BINARY_DIR}/Tests/Objective-C/objc-file-extension-test" - --build-two-config - ${build_generator_args} - --build-project objc-file-extension-test - --build-options ${build_options} - --test-command objc-file-extension-test - ) - list(APPEND TEST_BUILD_DIRS "${CMAKE_BINARY_DIR}/Tests/Objective-C/objc-file-extension-test") - - add_test(Objective-CXX.simple-build-test ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/Objective-C++/simple-build-test" - "${CMake_BINARY_DIR}/Tests/Objective-C++/simple-build-test" - --build-two-config - ${build_generator_args} - --build-project simple-build-test - --build-options ${build_options} - --test-command simple-build-test - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Objective-C++/simple-build-test") - - add_test(Objective-CXX.cxx-file-extension-test ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/Objective-C++/cxx-file-extension-test" - "${CMake_BINARY_DIR}/Tests/Objective-C++/cxx-file-extension-test" - --build-two-config - ${build_generator_args} - --build-project cxx-file-extension-test - --build-options ${build_options} - --test-command cxx-file-extension-test - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Objective-C++/cxx-file-extension-test") - - add_test(Objective-CXX.objcxx-file-extension-test ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/Objective-C++/objcxx-file-extension-test" - "${CMake_BINARY_DIR}/Tests/Objective-C++/objcxx-file-extension-test" - --build-two-config - ${build_generator_args} - --build-project objcxx-file-extension-test - --build-options ${build_options} - --test-command objcxx-file-extension-test - ) - list(APPEND TEST_BUILD_DIRS "${CMAKE_BINARY_DIR}/Tests/Objective-C++/objcxx-file-extension-test") - + add_subdirectory(ObjC) + add_subdirectory(ObjCXX) endif () endif () diff --git a/Tests/ObjC++/CMakeLists.txt b/Tests/ObjC++/CMakeLists.txt deleted file mode 100644 index 8b1563e..0000000 --- a/Tests/ObjC++/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# a simple objc++ test case that uses Cocoa framework -project (ObjC++) - -add_executable (ObjC++ objc++.mm) -target_link_libraries(ObjC++ "-framework Cocoa") - diff --git a/Tests/ObjC++/objc++.mm b/Tests/ObjC++/objc++.mm deleted file mode 100644 index 258ebaa..0000000 --- a/Tests/ObjC++/objc++.mm +++ /dev/null @@ -1,23 +0,0 @@ -#import -#import -using namespace std; - -int main() -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - NSMutableSet *mySet = [NSMutableSet set]; - cout<<"Adding values to the set."< + +int main() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + [pool release]; + return 0; +} diff --git a/Tests/ObjC/simple-build-test/CMakeLists.txt b/Tests/ObjC/simple-build-test/CMakeLists.txt new file mode 100644 index 0000000..5ab46ac --- /dev/null +++ b/Tests/ObjC/simple-build-test/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.15) + +set(CMAKE_MACOSX_RPATH OFF) + +project(simple-build-test OBJC) + +add_library(foo SHARED foo.m) +target_link_libraries(foo "-framework Foundation") + +add_executable(simple-build-test main.m) +target_link_libraries(simple-build-test "-framework Foundation" foo) diff --git a/Tests/ObjC/simple-build-test/foo.h b/Tests/ObjC/simple-build-test/foo.h new file mode 100644 index 0000000..b3fb084 --- /dev/null +++ b/Tests/ObjC/simple-build-test/foo.h @@ -0,0 +1,9 @@ +#import + +@interface Foo : NSObject { + NSNumber* age; +} + +@property (nonatomic, retain) NSNumber* age; + +@end diff --git a/Tests/ObjC/simple-build-test/foo.m b/Tests/ObjC/simple-build-test/foo.m new file mode 100644 index 0000000..2d452a8 --- /dev/null +++ b/Tests/ObjC/simple-build-test/foo.m @@ -0,0 +1,7 @@ +#import "foo.h" + +@implementation Foo + +@synthesize age; + +@end diff --git a/Tests/ObjC/simple-build-test/main.m b/Tests/ObjC/simple-build-test/main.m new file mode 100644 index 0000000..970d554 --- /dev/null +++ b/Tests/ObjC/simple-build-test/main.m @@ -0,0 +1,12 @@ +#import +#import "foo.h" + +int main(int argc, char **argv) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + Foo *theFoo = [[Foo alloc] init]; + theFoo.age = [NSNumber numberWithInt:argc]; + NSLog(@"%d\n",[theFoo.age intValue]); + [pool release]; + return 0; +} diff --git a/Tests/ObjCXX/CMakeLists.txt b/Tests/ObjCXX/CMakeLists.txt new file mode 100644 index 0000000..a2a907a --- /dev/null +++ b/Tests/ObjCXX/CMakeLists.txt @@ -0,0 +1,4 @@ +ADD_TEST_MACRO(ObjCXX.ObjC++ ObjC++) +ADD_TEST_MACRO(ObjCXX.simple-build-test simple-build-test) +ADD_TEST_MACRO(ObjCXX.cxx-file-extension-test cxx-file-extension-test) +ADD_TEST_MACRO(ObjCXX.objcxx-file-extension-test objcxx-file-extension-test) diff --git a/Tests/ObjCXX/ObjC++/CMakeLists.txt b/Tests/ObjCXX/ObjC++/CMakeLists.txt new file mode 100644 index 0000000..5ba5db2 --- /dev/null +++ b/Tests/ObjCXX/ObjC++/CMakeLists.txt @@ -0,0 +1,5 @@ +# a simple objc++ test case that uses Cocoa framework +project (ObjC++) + +add_executable (ObjC++ objc++.mm) +target_link_libraries(ObjC++ "-framework Cocoa") diff --git a/Tests/ObjCXX/ObjC++/objc++.mm b/Tests/ObjCXX/ObjC++/objc++.mm new file mode 100644 index 0000000..258ebaa --- /dev/null +++ b/Tests/ObjCXX/ObjC++/objc++.mm @@ -0,0 +1,23 @@ +#import +#import +using namespace std; + +int main() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + NSMutableSet *mySet = [NSMutableSet set]; + cout<<"Adding values to the set."< +#include + +int main() +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + std::cout << "Hello World" << std::endl; + [pool release]; + return 0; +} diff --git a/Tests/ObjCXX/simple-build-test/CMakeLists.txt b/Tests/ObjCXX/simple-build-test/CMakeLists.txt new file mode 100644 index 0000000..cf27683 --- /dev/null +++ b/Tests/ObjCXX/simple-build-test/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.15) + +set(CMAKE_MACOSX_RPATH OFF) + +project(simple-build-test OBJCXX) + +add_library(foo SHARED foo.mm) +target_link_libraries(foo "-framework Foundation") + +add_executable(simple-build-test main.mm) +target_link_libraries(simple-build-test "-framework Foundation" foo) diff --git a/Tests/ObjCXX/simple-build-test/foo.h b/Tests/ObjCXX/simple-build-test/foo.h new file mode 100644 index 0000000..b3fb084 --- /dev/null +++ b/Tests/ObjCXX/simple-build-test/foo.h @@ -0,0 +1,9 @@ +#import + +@interface Foo : NSObject { + NSNumber* age; +} + +@property (nonatomic, retain) NSNumber* age; + +@end diff --git a/Tests/ObjCXX/simple-build-test/foo.mm b/Tests/ObjCXX/simple-build-test/foo.mm new file mode 100644 index 0000000..2d452a8 --- /dev/null +++ b/Tests/ObjCXX/simple-build-test/foo.mm @@ -0,0 +1,7 @@ +#import "foo.h" + +@implementation Foo + +@synthesize age; + +@end diff --git a/Tests/ObjCXX/simple-build-test/main.mm b/Tests/ObjCXX/simple-build-test/main.mm new file mode 100644 index 0000000..7c85551 --- /dev/null +++ b/Tests/ObjCXX/simple-build-test/main.mm @@ -0,0 +1,14 @@ +#import +#import "foo.h" +#include + +int main(int argc, char **argv) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + Foo *theFoo = [[Foo alloc] init]; + theFoo.age = [NSNumber numberWithInt:argc]; + NSLog(@"%d\n",[theFoo.age intValue]); + std::cout << [theFoo.age intValue] << std::endl; + [pool release]; + return 0; +} diff --git a/Tests/Objective-C++/cxx-file-extension-test/CMakeLists.txt b/Tests/Objective-C++/cxx-file-extension-test/CMakeLists.txt deleted file mode 100644 index 0b33875..0000000 --- a/Tests/Objective-C++/cxx-file-extension-test/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -project(cxx-file-extension-test CXX) - -add_executable(cxx-file-extension-test main.mm) diff --git a/Tests/Objective-C++/cxx-file-extension-test/main.mm b/Tests/Objective-C++/cxx-file-extension-test/main.mm deleted file mode 100644 index 1c159a9..0000000 --- a/Tests/Objective-C++/cxx-file-extension-test/main.mm +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __OBJC__ -# error "Compiler cannot compile Objective-C" -#endif - -int main() -{ - return 0; -} diff --git a/Tests/Objective-C++/objcxx-file-extension-test/CMakeLists.txt b/Tests/Objective-C++/objcxx-file-extension-test/CMakeLists.txt deleted file mode 100644 index eda7bba..0000000 --- a/Tests/Objective-C++/objcxx-file-extension-test/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -project(objcxx-file-extension-test OBJCXX CXX) - -add_executable(objcxx-file-extension-test main.mm) -target_link_libraries(objcxx-file-extension-test "-framework Foundation") diff --git a/Tests/Objective-C++/objcxx-file-extension-test/main.mm b/Tests/Objective-C++/objcxx-file-extension-test/main.mm deleted file mode 100644 index d4aa1bb..0000000 --- a/Tests/Objective-C++/objcxx-file-extension-test/main.mm +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __OBJC__ -# error "Compiler is not an Objective-C compiler." -#endif - -#import -#include - -int main() -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - std::cout << "Hello World" << std::endl; - [pool release]; - return 0; -} diff --git a/Tests/Objective-C++/simple-build-test/CMakeLists.txt b/Tests/Objective-C++/simple-build-test/CMakeLists.txt deleted file mode 100644 index cf27683..0000000 --- a/Tests/Objective-C++/simple-build-test/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -set(CMAKE_MACOSX_RPATH OFF) - -project(simple-build-test OBJCXX) - -add_library(foo SHARED foo.mm) -target_link_libraries(foo "-framework Foundation") - -add_executable(simple-build-test main.mm) -target_link_libraries(simple-build-test "-framework Foundation" foo) diff --git a/Tests/Objective-C++/simple-build-test/foo.h b/Tests/Objective-C++/simple-build-test/foo.h deleted file mode 100644 index b3fb084..0000000 --- a/Tests/Objective-C++/simple-build-test/foo.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@interface Foo : NSObject { - NSNumber* age; -} - -@property (nonatomic, retain) NSNumber* age; - -@end diff --git a/Tests/Objective-C++/simple-build-test/foo.mm b/Tests/Objective-C++/simple-build-test/foo.mm deleted file mode 100644 index 2d452a8..0000000 --- a/Tests/Objective-C++/simple-build-test/foo.mm +++ /dev/null @@ -1,7 +0,0 @@ -#import "foo.h" - -@implementation Foo - -@synthesize age; - -@end diff --git a/Tests/Objective-C++/simple-build-test/main.mm b/Tests/Objective-C++/simple-build-test/main.mm deleted file mode 100644 index 7c85551..0000000 --- a/Tests/Objective-C++/simple-build-test/main.mm +++ /dev/null @@ -1,14 +0,0 @@ -#import -#import "foo.h" -#include - -int main(int argc, char **argv) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Foo *theFoo = [[Foo alloc] init]; - theFoo.age = [NSNumber numberWithInt:argc]; - NSLog(@"%d\n",[theFoo.age intValue]); - std::cout << [theFoo.age intValue] << std::endl; - [pool release]; - return 0; -} diff --git a/Tests/Objective-C/c-file-extension-test/CMakeLists.txt b/Tests/Objective-C/c-file-extension-test/CMakeLists.txt deleted file mode 100644 index e091448..0000000 --- a/Tests/Objective-C/c-file-extension-test/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -project(c-file-extension-test C) - -add_executable(c-file-extension-test main.m) diff --git a/Tests/Objective-C/c-file-extension-test/main.m b/Tests/Objective-C/c-file-extension-test/main.m deleted file mode 100644 index 1c159a9..0000000 --- a/Tests/Objective-C/c-file-extension-test/main.m +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __OBJC__ -# error "Compiler cannot compile Objective-C" -#endif - -int main() -{ - return 0; -} diff --git a/Tests/Objective-C/cxx-file-extension-test/CMakeLists.txt b/Tests/Objective-C/cxx-file-extension-test/CMakeLists.txt deleted file mode 100644 index eb065e4..0000000 --- a/Tests/Objective-C/cxx-file-extension-test/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -project(cxx-file-extension-test) - -string(APPEND CMAKE_CXX_FLAGS " -std=c++11") -set(CMAKE_CXX_STANDARD 14) - -add_executable(cxx-file-extension-test main.m) diff --git a/Tests/Objective-C/cxx-file-extension-test/main.m b/Tests/Objective-C/cxx-file-extension-test/main.m deleted file mode 100644 index 1c159a9..0000000 --- a/Tests/Objective-C/cxx-file-extension-test/main.m +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __OBJC__ -# error "Compiler cannot compile Objective-C" -#endif - -int main() -{ - return 0; -} diff --git a/Tests/Objective-C/objc-file-extension-test/CMakeLists.txt b/Tests/Objective-C/objc-file-extension-test/CMakeLists.txt deleted file mode 100644 index 27e88be..0000000 --- a/Tests/Objective-C/objc-file-extension-test/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -project(objc-file-extension-test OBJC CXX) - -add_executable(objc-file-extension-test main.m) -target_link_libraries(objc-file-extension-test "-framework Foundation") diff --git a/Tests/Objective-C/objc-file-extension-test/main.m b/Tests/Objective-C/objc-file-extension-test/main.m deleted file mode 100644 index 2ec3917..0000000 --- a/Tests/Objective-C/objc-file-extension-test/main.m +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __OBJC__ -# error "Compiler is not an Objective-C compiler." -#endif - -#import - -int main() -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - [pool release]; - return 0; -} diff --git a/Tests/Objective-C/simple-build-test/CMakeLists.txt b/Tests/Objective-C/simple-build-test/CMakeLists.txt deleted file mode 100644 index 5ab46ac..0000000 --- a/Tests/Objective-C/simple-build-test/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -set(CMAKE_MACOSX_RPATH OFF) - -project(simple-build-test OBJC) - -add_library(foo SHARED foo.m) -target_link_libraries(foo "-framework Foundation") - -add_executable(simple-build-test main.m) -target_link_libraries(simple-build-test "-framework Foundation" foo) diff --git a/Tests/Objective-C/simple-build-test/foo.h b/Tests/Objective-C/simple-build-test/foo.h deleted file mode 100644 index b3fb084..0000000 --- a/Tests/Objective-C/simple-build-test/foo.h +++ /dev/null @@ -1,9 +0,0 @@ -#import - -@interface Foo : NSObject { - NSNumber* age; -} - -@property (nonatomic, retain) NSNumber* age; - -@end diff --git a/Tests/Objective-C/simple-build-test/foo.m b/Tests/Objective-C/simple-build-test/foo.m deleted file mode 100644 index 2d452a8..0000000 --- a/Tests/Objective-C/simple-build-test/foo.m +++ /dev/null @@ -1,7 +0,0 @@ -#import "foo.h" - -@implementation Foo - -@synthesize age; - -@end diff --git a/Tests/Objective-C/simple-build-test/main.m b/Tests/Objective-C/simple-build-test/main.m deleted file mode 100644 index 970d554..0000000 --- a/Tests/Objective-C/simple-build-test/main.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import "foo.h" - -int main(int argc, char **argv) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - Foo *theFoo = [[Foo alloc] init]; - theFoo.age = [NSNumber numberWithInt:argc]; - NSLog(@"%d\n",[theFoo.age intValue]); - [pool release]; - return 0; -} -- cgit v0.12