From 97f9e513e5420cf5702193869e2cea8d4b005ec5 Mon Sep 17 00:00:00 2001 From: Steven Sheldon Date: Sat, 30 Apr 2016 13:24:38 -0700 Subject: [PATCH] Remove now-unnecessary ios-tests and xtests. --- Cargo.toml | 2 - ios-tests/.gitignore | 24 -- ios-tests/RustObjC/AppDelegate.h | 13 - ios-tests/RustObjC/AppDelegate.m | 26 -- ios-tests/RustObjC/Info.plist | 43 --- ios-tests/RustObjC/main.m | 16 - .../RustObjCTests.xcodeproj/project.pbxproj | 339 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/xcschemes/RustObjC.xcscheme | 101 ------ ios-tests/RustObjCTests/Info.plist | 24 -- ios-tests/RustObjCTests/RustObjCTests.m | 28 -- xtests/.gitignore | 2 - xtests/Cargo.toml | 19 - xtests/Makefile | 18 - xtests/build.rs | 95 ----- xtests/export.rs | 20 -- xtests/objc_tests.h | 9 - 17 files changed, 786 deletions(-) delete mode 100644 ios-tests/.gitignore delete mode 100644 ios-tests/RustObjC/AppDelegate.h delete mode 100644 ios-tests/RustObjC/AppDelegate.m delete mode 100644 ios-tests/RustObjC/Info.plist delete mode 100644 ios-tests/RustObjC/main.m delete mode 100644 ios-tests/RustObjCTests.xcodeproj/project.pbxproj delete mode 100644 ios-tests/RustObjCTests.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 ios-tests/RustObjCTests.xcodeproj/xcshareddata/xcschemes/RustObjC.xcscheme delete mode 100644 ios-tests/RustObjCTests/Info.plist delete mode 100644 ios-tests/RustObjCTests/RustObjCTests.m delete mode 100644 xtests/.gitignore delete mode 100644 xtests/Cargo.toml delete mode 100644 xtests/Makefile delete mode 100644 xtests/build.rs delete mode 100644 xtests/export.rs delete mode 100644 xtests/objc_tests.h diff --git a/Cargo.toml b/Cargo.toml index 69f0289cb..9927f8b26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,8 +17,6 @@ exclude = [ "travis_install.sh", "travis_test.sh", "tests-ios/**", - "ios-tests/**", - "xtests/**", ] [features] diff --git a/ios-tests/.gitignore b/ios-tests/.gitignore deleted file mode 100644 index 0872a4b90..000000000 --- a/ios-tests/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -## Build generated -build/ -DerivedData - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata - -## Other -*.xccheckout -*.moved-aside -*.xcuserstate -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa diff --git a/ios-tests/RustObjC/AppDelegate.h b/ios-tests/RustObjC/AppDelegate.h deleted file mode 100644 index 51d940dd4..000000000 --- a/ios-tests/RustObjC/AppDelegate.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// AppDelegate.h -// RustObjCTests -// -// Created by Steven Sheldon on 7/5/15. -// -// - -#import - -@interface AppDelegate : UIResponder - -@end diff --git a/ios-tests/RustObjC/AppDelegate.m b/ios-tests/RustObjC/AppDelegate.m deleted file mode 100644 index 4d19ebf15..000000000 --- a/ios-tests/RustObjC/AppDelegate.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// AppDelegate.m -// RustObjCTests -// -// Created by Steven Sheldon on 7/5/15. -// -// - -#import "AppDelegate.h" -#import "objc_tests.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - for (size_t i = 0; i < tests_count(); i++) { - size_t name_len; - const char *c_name = test_name(i, &name_len); - NSString *name = [[NSString alloc] initWithBytes:c_name length:name_len encoding:NSUTF8StringEncoding]; - - NSLog(@"Running test: %@", name); - run_test(i); - } - return YES; -} - -@end diff --git a/ios-tests/RustObjC/Info.plist b/ios-tests/RustObjC/Info.plist deleted file mode 100644 index 7c961f866..000000000 --- a/ios-tests/RustObjC/Info.plist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/ios-tests/RustObjC/main.m b/ios-tests/RustObjC/main.m deleted file mode 100644 index 1723cd8cf..000000000 --- a/ios-tests/RustObjC/main.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// main.m -// RustObjCTests -// -// Created by Steven Sheldon on 7/5/15. -// -// - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/ios-tests/RustObjCTests.xcodeproj/project.pbxproj b/ios-tests/RustObjCTests.xcodeproj/project.pbxproj deleted file mode 100644 index 16c5c8e0a..000000000 --- a/ios-tests/RustObjCTests.xcodeproj/project.pbxproj +++ /dev/null @@ -1,339 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 13CB968B1B4A50DD0091BEB9 /* libobjc_tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13CB968A1B4A50DD0091BEB9 /* libobjc_tests.a */; }; - 13E8B3EC1B4A4B6F000FAD36 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E8B3EB1B4A4B6F000FAD36 /* main.m */; }; - 13E8B3EF1B4A4B6F000FAD36 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13E8B3EE1B4A4B6F000FAD36 /* AppDelegate.m */; }; - 13F535FC1C66C6FB00C4A6C6 /* RustObjCTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 13F535FB1C66C6FB00C4A6C6 /* RustObjCTests.m */; }; - 13F536001C66C9B700C4A6C6 /* libobjc_tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13CB968A1B4A50DD0091BEB9 /* libobjc_tests.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 13CB96891B4A50CD0091BEB9 /* objc_tests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = objc_tests.h; path = ../xtests/objc_tests.h; sourceTree = ""; }; - 13CB968A1B4A50DD0091BEB9 /* libobjc_tests.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libobjc_tests.a; path = ../xtests/libobjc_tests.a; sourceTree = ""; }; - 13E8B3E61B4A4B6F000FAD36 /* RustObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RustObjC.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13E8B3EA1B4A4B6F000FAD36 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 13E8B3EB1B4A4B6F000FAD36 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 13E8B3ED1B4A4B6F000FAD36 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 13E8B3EE1B4A4B6F000FAD36 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 13F535F91C66C6FB00C4A6C6 /* RustObjCTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RustObjCTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 13F535FB1C66C6FB00C4A6C6 /* RustObjCTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RustObjCTests.m; sourceTree = ""; }; - 13F535FD1C66C6FB00C4A6C6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 13E8B3E31B4A4B6F000FAD36 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 13CB968B1B4A50DD0091BEB9 /* libobjc_tests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13F535F61C66C6FB00C4A6C6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 13F536001C66C9B700C4A6C6 /* libobjc_tests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 13E8B3A01B4A49D7000FAD36 = { - isa = PBXGroup; - children = ( - 13E8B3E81B4A4B6F000FAD36 /* RustObjC */, - 13F535FA1C66C6FB00C4A6C6 /* RustObjCTests */, - 13CB96891B4A50CD0091BEB9 /* objc_tests.h */, - 13CB968A1B4A50DD0091BEB9 /* libobjc_tests.a */, - 13E8B3E71B4A4B6F000FAD36 /* Products */, - ); - sourceTree = ""; - }; - 13E8B3E71B4A4B6F000FAD36 /* Products */ = { - isa = PBXGroup; - children = ( - 13E8B3E61B4A4B6F000FAD36 /* RustObjC.app */, - 13F535F91C66C6FB00C4A6C6 /* RustObjCTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 13E8B3E81B4A4B6F000FAD36 /* RustObjC */ = { - isa = PBXGroup; - children = ( - 13E8B3ED1B4A4B6F000FAD36 /* AppDelegate.h */, - 13E8B3EE1B4A4B6F000FAD36 /* AppDelegate.m */, - 13E8B3E91B4A4B6F000FAD36 /* Supporting Files */, - ); - path = RustObjC; - sourceTree = ""; - }; - 13E8B3E91B4A4B6F000FAD36 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 13E8B3EA1B4A4B6F000FAD36 /* Info.plist */, - 13E8B3EB1B4A4B6F000FAD36 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 13F535FA1C66C6FB00C4A6C6 /* RustObjCTests */ = { - isa = PBXGroup; - children = ( - 13F535FB1C66C6FB00C4A6C6 /* RustObjCTests.m */, - 13F535FD1C66C6FB00C4A6C6 /* Info.plist */, - ); - path = RustObjCTests; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 13E8B3E51B4A4B6F000FAD36 /* RustObjC */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13E8B40B1B4A4B6F000FAD36 /* Build configuration list for PBXNativeTarget "RustObjC" */; - buildPhases = ( - 13E8B3E21B4A4B6F000FAD36 /* Sources */, - 13E8B3E31B4A4B6F000FAD36 /* Frameworks */, - 13E8B3E41B4A4B6F000FAD36 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RustObjC; - productName = RustObjCTests; - productReference = 13E8B3E61B4A4B6F000FAD36 /* RustObjC.app */; - productType = "com.apple.product-type.application"; - }; - 13F535F81C66C6FB00C4A6C6 /* RustObjCTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13F535FE1C66C6FB00C4A6C6 /* Build configuration list for PBXNativeTarget "RustObjCTests" */; - buildPhases = ( - 13F535F51C66C6FB00C4A6C6 /* Sources */, - 13F535F61C66C6FB00C4A6C6 /* Frameworks */, - 13F535F71C66C6FB00C4A6C6 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RustObjCTests; - productName = RustObjCTests; - productReference = 13F535F91C66C6FB00C4A6C6 /* RustObjCTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 13E8B3A11B4A49D7000FAD36 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0700; - TargetAttributes = { - 13E8B3E51B4A4B6F000FAD36 = { - CreatedOnToolsVersion = 6.4; - }; - 13F535F81C66C6FB00C4A6C6 = { - CreatedOnToolsVersion = 7.2.1; - }; - }; - }; - buildConfigurationList = 13E8B3A41B4A49D7000FAD36 /* Build configuration list for PBXProject "RustObjCTests" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 13E8B3A01B4A49D7000FAD36; - productRefGroup = 13E8B3E71B4A4B6F000FAD36 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 13E8B3E51B4A4B6F000FAD36 /* RustObjC */, - 13F535F81C66C6FB00C4A6C6 /* RustObjCTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 13E8B3E41B4A4B6F000FAD36 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13F535F71C66C6FB00C4A6C6 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 13E8B3E21B4A4B6F000FAD36 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13E8B3EF1B4A4B6F000FAD36 /* AppDelegate.m in Sources */, - 13E8B3EC1B4A4B6F000FAD36 /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13F535F51C66C6FB00C4A6C6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13F535FC1C66C6FB00C4A6C6 /* RustObjCTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 13E8B3A51B4A49D7000FAD36 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ENABLE_BITCODE = NO; - IPHONEOS_DEPLOYMENT_TARGET = 8.4; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/../xtests", - ); - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 13E8B4071B4A4B6F000FAD36 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = RustObjC/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.sasheldon.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 13F535FF1C66C6FB00C4A6C6 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = RustObjCTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.sasheldon.RustObjCTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 13E8B3A41B4A49D7000FAD36 /* Build configuration list for PBXProject "RustObjCTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13E8B3A51B4A49D7000FAD36 /* Debug */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 13E8B40B1B4A4B6F000FAD36 /* Build configuration list for PBXNativeTarget "RustObjC" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13E8B4071B4A4B6F000FAD36 /* Debug */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - 13F535FE1C66C6FB00C4A6C6 /* Build configuration list for PBXNativeTarget "RustObjCTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13F535FF1C66C6FB00C4A6C6 /* Debug */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - }; - rootObject = 13E8B3A11B4A49D7000FAD36 /* Project object */; -} diff --git a/ios-tests/RustObjCTests.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios-tests/RustObjCTests.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 486ca6351..000000000 --- a/ios-tests/RustObjCTests.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/ios-tests/RustObjCTests.xcodeproj/xcshareddata/xcschemes/RustObjC.xcscheme b/ios-tests/RustObjCTests.xcodeproj/xcshareddata/xcschemes/RustObjC.xcscheme deleted file mode 100644 index 326283c5e..000000000 --- a/ios-tests/RustObjCTests.xcodeproj/xcshareddata/xcschemes/RustObjC.xcscheme +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios-tests/RustObjCTests/Info.plist b/ios-tests/RustObjCTests/Info.plist deleted file mode 100644 index ba72822e8..000000000 --- a/ios-tests/RustObjCTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/ios-tests/RustObjCTests/RustObjCTests.m b/ios-tests/RustObjCTests/RustObjCTests.m deleted file mode 100644 index c22ab2ba8..000000000 --- a/ios-tests/RustObjCTests/RustObjCTests.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// RustObjCTests.m -// RustObjCTests -// -// Created by Steven Sheldon on 2/6/16. -// -// - -#import -#import "objc_tests.h" - -@interface RustObjCTests : XCTestCase -@end - -@implementation RustObjCTests - -- (void)test { - for (size_t i = 0; i < tests_count(); i++) { - size_t name_len; - const char *c_name = test_name(i, &name_len); - NSString *name = [[NSString alloc] initWithBytes:c_name length:name_len encoding:NSUTF8StringEncoding]; - - NSLog(@"Running test: %@", name); - run_test(i); - } -} - -@end diff --git a/xtests/.gitignore b/xtests/.gitignore deleted file mode 100644 index f5684a726..000000000 --- a/xtests/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/lib.rs -/libobjc_tests.a diff --git a/xtests/Cargo.toml b/xtests/Cargo.toml deleted file mode 100644 index d76b1ef4c..000000000 --- a/xtests/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "objc-tests" -version = "0.0.0" -authors = ["Steven Sheldon"] - -build = "build.rs" - -[lib] -name = "objc_tests" -path = "lib.rs" -crate-type = ["staticlib"] - -[dependencies.objc] -path = ".." -features = ["exception"] - -[build-dependencies] -regex = "0.1" -walkdir = "0.1" diff --git a/xtests/Makefile b/xtests/Makefile deleted file mode 100644 index e374daa98..000000000 --- a/xtests/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -ARCHS ?= i386 x86_64 armv7 armv7s arm64 -RUST_ARCHS = $(subst arm64,aarch64,$(ARCHS)) -TARGETS = $(addsuffix -apple-ios,$(RUST_ARCHS)) - -CARGO_MODE ?= debug -LIB = libobjc_tests.a -TARGET_LIBS = $(foreach target,$(TARGETS),target/$(target)/$(CARGO_MODE)/$(LIB)) - -all: $(LIB) - -.PHONY: $(TARGETS) -$(TARGETS): - cargo build --target $@ - -target/%/$(CARGO_MODE)/$(LIB): %; - -$(LIB): $(TARGET_LIBS) - lipo -create -output $@ $(TARGET_LIBS) diff --git a/xtests/build.rs b/xtests/build.rs deleted file mode 100644 index 2f6571631..000000000 --- a/xtests/build.rs +++ /dev/null @@ -1,95 +0,0 @@ -extern crate regex; -extern crate walkdir; - -use std::env; -use std::fs::{File, Metadata, self}; -use std::io::{ErrorKind, Read, Write}; -use std::os::unix::fs::MetadataExt; -use std::path::Path; - -use regex::Regex; -use walkdir::{DirEntry, WalkDir}; - -static TEST_REGEX: &'static str = - "#\\[test\\]\n( fn ([^\\{]*)\\(\\) \\{(?s:.)*?\n \\}\n)"; - -static TEMPLATE: &'static str = r##" -#[macro_use] -extern crate objc; - -pub use objc::*; -use objc::runtime::*; - -#[path = "../src/test_utils.rs"] -mod test_utils; -"##; - -fn has_rs_ext(path: &Path) -> bool { - path.extension().and_then(|x| x.to_str()).map_or(false, |x| x == "rs") -} - -fn modified_more_recently(m1: &Metadata, m2: &Metadata) -> bool { - m1.mtime() > m2.mtime() || - (m1.mtime() == m2.mtime() && m1.mtime_nsec() > m2.mtime_nsec()) -} - -fn should_build(output: &Path, src_files: &[DirEntry]) -> bool { - let output_metadata = match fs::metadata(output) { - Ok(m) => m, - Err(ref e) if e.kind() == ErrorKind::NotFound => return true, - Err(e) => panic!("Error getting output file metadata: {:?}", e), - }; - src_files.iter() - .map(|e| e.metadata().unwrap()) - .any(|m| modified_more_recently(&m, &output_metadata)) -} - -fn build_test_module>(src_contents: I) -> String { - use std::fmt::Write; - - let mut output = TEMPLATE.to_owned(); - let mut test_names = Vec::new(); - - let re = Regex::new(TEST_REGEX).unwrap(); - for buf in src_contents { - for capture in re.captures_iter(&buf) { - output.push_str("\n"); - output.push_str(&capture[1]); - - test_names.push(capture[2].to_owned()); - } - } - - output.push_str("\npub static TESTS: &'static [(&'static str, fn())] = &[\n"); - for test_name in &test_names { - write!(&mut output, "(\"{0}\", {0}),\n", test_name).unwrap(); - } - output.push_str("];\npub mod export;\n"); - output -} - -fn main() { - let cwd = env::current_dir().unwrap(); - let output_path = cwd.join("lib.rs"); - let src_dir = cwd.parent().unwrap().join("src"); - - let src_files: Vec = WalkDir::new(src_dir).into_iter() - .map(|e| e.unwrap()) - .filter(|e| e.file_type().is_file() && has_rs_ext(e.path())) - .collect(); - - if !should_build(&output_path, &src_files) { - return; - } - - let src_contents = src_files.iter().map(|entry| { - let mut f = File::open(entry.path()).unwrap(); - let mut buf = String::new(); - f.read_to_string(&mut buf).unwrap(); - buf - }); - let output = build_test_module(src_contents); - - let mut output_file = File::create(output_path).unwrap(); - output_file.write(output.as_bytes()).unwrap(); -} diff --git a/xtests/export.rs b/xtests/export.rs deleted file mode 100644 index 5ad3c2ba3..000000000 --- a/xtests/export.rs +++ /dev/null @@ -1,20 +0,0 @@ -use std::os::raw::c_char; -use super::TESTS; - -#[no_mangle] -pub extern fn tests_count() -> usize { - TESTS.len() -} - -#[no_mangle] -pub extern fn test_name(i: usize, len: &mut usize) -> *const c_char { - let (name, _) = TESTS[i as usize]; - *len = name.len(); - name.as_ptr() as *const c_char -} - -#[no_mangle] -pub extern fn run_test(i: usize) { - let (_, test_fn) = TESTS[i as usize]; - test_fn(); -} diff --git a/xtests/objc_tests.h b/xtests/objc_tests.h deleted file mode 100644 index 6b4d82e51..000000000 --- a/xtests/objc_tests.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include - -size_t tests_count(); - -const char *test_name(size_t i, size_t *len); - -void run_test(size_t i);