diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.pbxproj b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.pbxproj new file mode 100644 index 0000000..49eae0a --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.pbxproj @@ -0,0 +1,553 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + E38F8D97224A3CDE009EF306 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8D96224A3CDE009EF306 /* AppDelegate.m */; }; + E38F8D9A224A3CDE009EF306 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8D99224A3CDE009EF306 /* ViewController.m */; }; + E38F8D9F224A3CE0009EF306 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E38F8D9E224A3CE0009EF306 /* Assets.xcassets */; }; + E38F8DA2224A3CE0009EF306 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E38F8DA0224A3CE0009EF306 /* LaunchScreen.storyboard */; }; + E38F8DA5224A3CE0009EF306 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DA4224A3CE0009EF306 /* main.m */; }; + E38F8DBB224A3EF0009EF306 /* KidnapperNote.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DBA224A3EF0009EF306 /* KidnapperNote.m */; }; + E38F8DC0224A41A4009EF306 /* KidnapperNoteTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DBF224A41A4009EF306 /* KidnapperNoteTests.m */; }; + E38F8DC9224A4825009EF306 /* RomanTranslator.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DC8224A4825009EF306 /* RomanTranslator.m */; }; + E38F8DCA224A4825009EF306 /* RomanTranslator.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DC8224A4825009EF306 /* RomanTranslator.m */; }; + E38F8DCF224A7EE2009EF306 /* RomanTranslatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DCE224A7EE2009EF306 /* RomanTranslatorTests.m */; }; + E38F8DD2224A8AEA009EF306 /* DoomsdayMachine.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DD1224A8AEA009EF306 /* DoomsdayMachine.m */; }; + E38F8DD6224A8B08009EF306 /* DoomsdayMachineTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DD5224A8B08009EF306 /* DoomsdayMachineTests.m */; }; + E38F8DD7224B8A77009EF306 /* DoomsdayMachine.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DD1224A8AEA009EF306 /* DoomsdayMachine.m */; }; + E38F8DDA224BA508009EF306 /* MatrixHacker.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DD9224BA508009EF306 /* MatrixHacker.m */; }; + E38F8DDB224BA508009EF306 /* MatrixHacker.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DD9224BA508009EF306 /* MatrixHacker.m */; }; + E38F8DDE224BA528009EF306 /* MatrixHackerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DDD224BA528009EF306 /* MatrixHackerTests.m */; }; + E38F8DE1224D0B8F009EF306 /* TinyURL.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DE0224D0B8F009EF306 /* TinyURL.m */; }; + E38F8DE2224D0B8F009EF306 /* TinyURL.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DE0224D0B8F009EF306 /* TinyURL.m */; }; + E38F8DE5224D1296009EF306 /* TinyURLTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E38F8DE4224D1296009EF306 /* TinyURLTests.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E38F8DAB224A3CE0009EF306 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E38F8D8A224A3CDE009EF306 /* Project object */; + proxyType = 1; + remoteGlobalIDString = E38F8D91224A3CDE009EF306; + remoteInfo = RSSchool_T2; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + E38F8D92224A3CDE009EF306 /* RSSchool_T2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RSSchool_T2.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E38F8D95224A3CDE009EF306 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + E38F8D96224A3CDE009EF306 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + E38F8D98224A3CDE009EF306 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + E38F8D99224A3CDE009EF306 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + E38F8D9E224A3CE0009EF306 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E38F8DA1224A3CE0009EF306 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + E38F8DA3224A3CE0009EF306 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E38F8DA4224A3CE0009EF306 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + E38F8DAA224A3CE0009EF306 /* RSSchool_T2Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RSSchool_T2Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + E38F8DB0224A3CE0009EF306 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E38F8DB9224A3EF0009EF306 /* KidnapperNote.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KidnapperNote.h; sourceTree = ""; }; + E38F8DBA224A3EF0009EF306 /* KidnapperNote.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KidnapperNote.m; sourceTree = ""; }; + E38F8DBF224A41A4009EF306 /* KidnapperNoteTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KidnapperNoteTests.m; sourceTree = ""; }; + E38F8DC7224A4825009EF306 /* RomanTranslator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RomanTranslator.h; sourceTree = ""; }; + E38F8DC8224A4825009EF306 /* RomanTranslator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RomanTranslator.m; sourceTree = ""; }; + E38F8DCE224A7EE2009EF306 /* RomanTranslatorTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RomanTranslatorTests.m; sourceTree = ""; }; + E38F8DD0224A8AEA009EF306 /* DoomsdayMachine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DoomsdayMachine.h; sourceTree = ""; }; + E38F8DD1224A8AEA009EF306 /* DoomsdayMachine.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DoomsdayMachine.m; sourceTree = ""; }; + E38F8DD5224A8B08009EF306 /* DoomsdayMachineTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DoomsdayMachineTests.m; sourceTree = ""; }; + E38F8DD8224BA508009EF306 /* MatrixHacker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MatrixHacker.h; sourceTree = ""; }; + E38F8DD9224BA508009EF306 /* MatrixHacker.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MatrixHacker.m; sourceTree = ""; }; + E38F8DDD224BA528009EF306 /* MatrixHackerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MatrixHackerTests.m; sourceTree = ""; }; + E38F8DDF224D0B8F009EF306 /* TinyURL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TinyURL.h; sourceTree = ""; }; + E38F8DE0224D0B8F009EF306 /* TinyURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TinyURL.m; sourceTree = ""; }; + E38F8DE4224D1296009EF306 /* TinyURLTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TinyURLTests.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E38F8D8F224A3CDE009EF306 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E38F8DA7224A3CE0009EF306 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E38F8D89224A3CDE009EF306 = { + isa = PBXGroup; + children = ( + E38F8D94224A3CDE009EF306 /* RSSchool_T2 */, + E38F8DAD224A3CE0009EF306 /* RSSchool_T2Tests */, + E38F8D93224A3CDE009EF306 /* Products */, + ); + sourceTree = ""; + }; + E38F8D93224A3CDE009EF306 /* Products */ = { + isa = PBXGroup; + children = ( + E38F8D92224A3CDE009EF306 /* RSSchool_T2.app */, + E38F8DAA224A3CE0009EF306 /* RSSchool_T2Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + E38F8D94224A3CDE009EF306 /* RSSchool_T2 */ = { + isa = PBXGroup; + children = ( + E38F8DBD224A3EFD009EF306 /* 1 */, + E38F8DCB224A482C009EF306 /* 2 */, + E38F8DD4224A8AF0009EF306 /* 3 */, + E38F8DDC224BA510009EF306 /* 4 */, + E38F8DE3224D0B93009EF306 /* 5 */, + E38F8DBE224A3F0A009EF306 /* Irrelevant */, + ); + path = RSSchool_T2; + sourceTree = ""; + }; + E38F8DAD224A3CE0009EF306 /* RSSchool_T2Tests */ = { + isa = PBXGroup; + children = ( + E38F8DBF224A41A4009EF306 /* KidnapperNoteTests.m */, + E38F8DCE224A7EE2009EF306 /* RomanTranslatorTests.m */, + E38F8DD5224A8B08009EF306 /* DoomsdayMachineTests.m */, + E38F8DDD224BA528009EF306 /* MatrixHackerTests.m */, + E38F8DE4224D1296009EF306 /* TinyURLTests.m */, + E38F8DB0224A3CE0009EF306 /* Info.plist */, + ); + path = RSSchool_T2Tests; + sourceTree = ""; + }; + E38F8DBD224A3EFD009EF306 /* 1 */ = { + isa = PBXGroup; + children = ( + E38F8DB9224A3EF0009EF306 /* KidnapperNote.h */, + E38F8DBA224A3EF0009EF306 /* KidnapperNote.m */, + ); + path = 1; + sourceTree = ""; + }; + E38F8DBE224A3F0A009EF306 /* Irrelevant */ = { + isa = PBXGroup; + children = ( + E38F8D95224A3CDE009EF306 /* AppDelegate.h */, + E38F8D96224A3CDE009EF306 /* AppDelegate.m */, + E38F8D98224A3CDE009EF306 /* ViewController.h */, + E38F8D99224A3CDE009EF306 /* ViewController.m */, + E38F8D9E224A3CE0009EF306 /* Assets.xcassets */, + E38F8DA0224A3CE0009EF306 /* LaunchScreen.storyboard */, + E38F8DA3224A3CE0009EF306 /* Info.plist */, + E38F8DA4224A3CE0009EF306 /* main.m */, + ); + path = Irrelevant; + sourceTree = ""; + }; + E38F8DCB224A482C009EF306 /* 2 */ = { + isa = PBXGroup; + children = ( + E38F8DC7224A4825009EF306 /* RomanTranslator.h */, + E38F8DC8224A4825009EF306 /* RomanTranslator.m */, + ); + path = 2; + sourceTree = ""; + }; + E38F8DD4224A8AF0009EF306 /* 3 */ = { + isa = PBXGroup; + children = ( + E38F8DD0224A8AEA009EF306 /* DoomsdayMachine.h */, + E38F8DD1224A8AEA009EF306 /* DoomsdayMachine.m */, + ); + path = 3; + sourceTree = ""; + }; + E38F8DDC224BA510009EF306 /* 4 */ = { + isa = PBXGroup; + children = ( + E38F8DD8224BA508009EF306 /* MatrixHacker.h */, + E38F8DD9224BA508009EF306 /* MatrixHacker.m */, + ); + path = 4; + sourceTree = ""; + }; + E38F8DE3224D0B93009EF306 /* 5 */ = { + isa = PBXGroup; + children = ( + E38F8DDF224D0B8F009EF306 /* TinyURL.h */, + E38F8DE0224D0B8F009EF306 /* TinyURL.m */, + ); + path = 5; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E38F8D91224A3CDE009EF306 /* RSSchool_T2 */ = { + isa = PBXNativeTarget; + buildConfigurationList = E38F8DB3224A3CE0009EF306 /* Build configuration list for PBXNativeTarget "RSSchool_T2" */; + buildPhases = ( + E38F8D8E224A3CDE009EF306 /* Sources */, + E38F8D8F224A3CDE009EF306 /* Frameworks */, + E38F8D90224A3CDE009EF306 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RSSchool_T2; + productName = RSSchool_T2; + productReference = E38F8D92224A3CDE009EF306 /* RSSchool_T2.app */; + productType = "com.apple.product-type.application"; + }; + E38F8DA9224A3CE0009EF306 /* RSSchool_T2Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E38F8DB6224A3CE0009EF306 /* Build configuration list for PBXNativeTarget "RSSchool_T2Tests" */; + buildPhases = ( + E38F8DA6224A3CE0009EF306 /* Sources */, + E38F8DA7224A3CE0009EF306 /* Frameworks */, + E38F8DA8224A3CE0009EF306 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E38F8DAC224A3CE0009EF306 /* PBXTargetDependency */, + ); + name = RSSchool_T2Tests; + productName = RSSchool_T2Tests; + productReference = E38F8DAA224A3CE0009EF306 /* RSSchool_T2Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E38F8D8A224A3CDE009EF306 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = "Alexander Shalamov"; + TargetAttributes = { + E38F8D91224A3CDE009EF306 = { + CreatedOnToolsVersion = 10.2; + }; + E38F8DA9224A3CE0009EF306 = { + CreatedOnToolsVersion = 10.2; + TestTargetID = E38F8D91224A3CDE009EF306; + }; + }; + }; + buildConfigurationList = E38F8D8D224A3CDE009EF306 /* Build configuration list for PBXProject "RSSchool_T2" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E38F8D89224A3CDE009EF306; + productRefGroup = E38F8D93224A3CDE009EF306 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E38F8D91224A3CDE009EF306 /* RSSchool_T2 */, + E38F8DA9224A3CE0009EF306 /* RSSchool_T2Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E38F8D90224A3CDE009EF306 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E38F8DA2224A3CE0009EF306 /* LaunchScreen.storyboard in Resources */, + E38F8D9F224A3CE0009EF306 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E38F8DA8224A3CE0009EF306 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E38F8D8E224A3CDE009EF306 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E38F8D9A224A3CDE009EF306 /* ViewController.m in Sources */, + E38F8DD2224A8AEA009EF306 /* DoomsdayMachine.m in Sources */, + E38F8DDA224BA508009EF306 /* MatrixHacker.m in Sources */, + E38F8DE1224D0B8F009EF306 /* TinyURL.m in Sources */, + E38F8DA5224A3CE0009EF306 /* main.m in Sources */, + E38F8DBB224A3EF0009EF306 /* KidnapperNote.m in Sources */, + E38F8D97224A3CDE009EF306 /* AppDelegate.m in Sources */, + E38F8DC9224A4825009EF306 /* RomanTranslator.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E38F8DA6224A3CE0009EF306 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E38F8DC0224A41A4009EF306 /* KidnapperNoteTests.m in Sources */, + E38F8DD7224B8A77009EF306 /* DoomsdayMachine.m in Sources */, + E38F8DCF224A7EE2009EF306 /* RomanTranslatorTests.m in Sources */, + E38F8DE2224D0B8F009EF306 /* TinyURL.m in Sources */, + E38F8DD6224A8B08009EF306 /* DoomsdayMachineTests.m in Sources */, + E38F8DE5224D1296009EF306 /* TinyURLTests.m in Sources */, + E38F8DDB224BA508009EF306 /* MatrixHacker.m in Sources */, + E38F8DDE224BA528009EF306 /* MatrixHackerTests.m in Sources */, + E38F8DCA224A4825009EF306 /* RomanTranslator.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E38F8DAC224A3CE0009EF306 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E38F8D91224A3CDE009EF306 /* RSSchool_T2 */; + targetProxy = E38F8DAB224A3CE0009EF306 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + E38F8DA0224A3CE0009EF306 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E38F8DA1224A3CE0009EF306 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + E38F8DB1224A3CE0009EF306 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 12.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + E38F8DB2224A3CE0009EF306 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 12.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E38F8DB4224A3CE0009EF306 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = "$(SRCROOT)/RSSchool_T2/Irrelevant/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "RSSchool.RSSchool-T2"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + E38F8DB5224A3CE0009EF306 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = "$(SRCROOT)/RSSchool_T2/Irrelevant/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "RSSchool.RSSchool-T2"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + E38F8DB7224A3CE0009EF306 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = RSSchool_T2Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.rss.task.ios.RSSchool-T2Tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RSSchool_T2.app/RSSchool_T2"; + }; + name = Debug; + }; + E38F8DB8224A3CE0009EF306 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = RSSchool_T2Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.rss.task.ios.RSSchool-T2Tests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RSSchool_T2.app/RSSchool_T2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E38F8D8D224A3CDE009EF306 /* Build configuration list for PBXProject "RSSchool_T2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E38F8DB1224A3CE0009EF306 /* Debug */, + E38F8DB2224A3CE0009EF306 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E38F8DB3224A3CE0009EF306 /* Build configuration list for PBXNativeTarget "RSSchool_T2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E38F8DB4224A3CE0009EF306 /* Debug */, + E38F8DB5224A3CE0009EF306 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E38F8DB6224A3CE0009EF306 /* Build configuration list for PBXNativeTarget "RSSchool_T2Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E38F8DB7224A3CE0009EF306 /* Debug */, + E38F8DB8224A3CE0009EF306 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E38F8D8A224A3CDE009EF306 /* Project object */; +} diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..03f2892 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.xcworkspace/xcuserdata/alexander_shalamov.xcuserdatad/UserInterfaceState.xcuserstate b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.xcworkspace/xcuserdata/alexander_shalamov.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..db299e1 Binary files /dev/null and b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/project.xcworkspace/xcuserdata/alexander_shalamov.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/xcuserdata/alexander_shalamov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/xcuserdata/alexander_shalamov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/xcuserdata/alexander_shalamov.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/xcuserdata/alexander_shalamov.xcuserdatad/xcschemes/xcschememanagement.plist b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/xcuserdata/alexander_shalamov.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..3ae23fa --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2.xcodeproj/xcuserdata/alexander_shalamov.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + RSSchool_T2.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/1/KidnapperNote.h b/Tasks/Task2/RSSchool_T2/RSSchool_T2/1/KidnapperNote.h new file mode 100644 index 0000000..b794491 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/1/KidnapperNote.h @@ -0,0 +1,18 @@ +#import +/* + Harold is a kidnapper who wrote a ransom note, but now he is worried it will be traced back to him through his handwriting. He found a magazine and wants to know if he can cut out whole words from it and use them to create an untraceable replica of his ransom note. The words in his note are case-insensitive and he must use only whole words available in the magazine. He cannot use substrings or concatenation to create the words he needs. + Given the words in the magazine and the words in the ransom note, complete the checkMagazine function to return YES if he can replicate his ransom note exactly using whole words from the magazine; otherwise, return NO. + For example, the note is "Attack At Dawn". The magazine contains only "attack at dawn". The magazine has all the right words and even if there's a case mismatch, the answer is YES. + Another example, the note says "give two grand today" and the magazine contains "give me one grand today night". The magazine doesnt have all the right words, so the answer is NO. +*/ + +@interface KidnapperNote : NSObject +/** + A function to check if a magazine can be used for a ransom note. + + @param magaine a string, representing the text of a magazine + @param note a string, representing a desired ransom note + @return flag indicating if a magazine can be used for a ransom note, YES or NO + */ +- (BOOL)checkMagazine:(NSString *)magaine note:(NSString *)note; +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/1/KidnapperNote.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2/1/KidnapperNote.m new file mode 100644 index 0000000..ff5282d --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/1/KidnapperNote.m @@ -0,0 +1,5 @@ +#import "KidnapperNote.h" + +@implementation KidnapperNote +// your code here +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/2/RomanTranslator.h b/Tasks/Task2/RSSchool_T2/RSSchool_T2/2/RomanTranslator.h new file mode 100644 index 0000000..9bdba29 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/2/RomanTranslator.h @@ -0,0 +1,41 @@ +#import +/* + A roman translator Brutus was hired by a merchant. + Brutus will be responsible for translating arabic numerals to roman and vise-versa + You need to help him and implement a couple of handy methods. + Roman numbers are represented by 7 different letters: + + Symbol Value + I 1 + V 5 + X 10 + L 50 + C 100 + D 500 + M 1000 + + For example, two is written as II in Roman numeral, just two one's added together. Twelve is written as, XII, which is simply X + II. The number twenty seven is written as XXVII, which is XX + V + II. + + Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII. Instead, the number four is written as IV. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as IX. There are six instances where subtraction is used: + + I can be placed before V (5) and X (10) to make 4 and 9. + X can be placed before L (50) and C (100) to make 40 and 90. + C can be placed before D (500) and M (1000) to make 400 and 900. + */ + +@interface RomanTranslator : NSObject +/** + Arabic to roman numbers converter + + @param arabicString a regular (arabic) number string + @return a roman representation + */ +- (NSString *)romanFromArabic:(NSString *)arabicString; +/** + Roman to arabic numbers converter + + @param romanString a roman number string + @return an arabic number string + */ +- (NSString *)arabicFromRoman:(NSString *)romanString; +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/2/RomanTranslator.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2/2/RomanTranslator.m new file mode 100644 index 0000000..6b9ea6b --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/2/RomanTranslator.m @@ -0,0 +1,5 @@ +#import "RomanTranslator.h" + +@implementation RomanTranslator +// your code here +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/3/DoomsdayMachine.h b/Tasks/Task2/RSSchool_T2/RSSchool_T2/3/DoomsdayMachine.h new file mode 100644 index 0000000..e312389 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/3/DoomsdayMachine.h @@ -0,0 +1,46 @@ +#import +/* + You are a Borg and you are going to assimilate the humans. + The date of assimilation is set to 14 August 2208 03:13:37 (in obsolete human calendar) + However, the Borg messep up the date format with their own, + so 26 March 2019 12:34:56 in human will look like: + 2019:03:26@56\34/12 + + As an engineer, you need to design a program which will take a messed up date string and + return how many years, months, weeks, days, hours, minutes and seconds left between + the specified date and the assimilation date. You need to create a class conforming to + AssimilationInfo protocol and use it as a wrapper for the returned data. + - Example + Input: 2200:01:01@15\30/00 + Output: AssimilationInfo(years:8, months:7, days:13, hours:2, minutes:43, seconds:22) + + The machine should also be able to return the assimilation date in string + representation for humans to behold and the format should be easily read by them. + (as it would be displayed on the countdown screen) + - Example + Output: Sunday, August 14, 2208 + */ +@protocol AssimilationInfo +@property (nonatomic, readonly) NSInteger years; +@property (nonatomic, readonly) NSInteger months; +@property (nonatomic, readonly) NSInteger weeks; +@property (nonatomic, readonly) NSInteger days; +@property (nonatomic, readonly) NSInteger hours; +@property (nonatomic, readonly) NSInteger minutes; +@property (nonatomic, readonly) NSInteger seconds; +@end +@interface DoomsdayMachine : NSObject +/** + Returns AssimilationInfo for a gived date string + + @param dateString a date string in a messed up Borg format + @return AssimilationInfo for the specified date + */ +- (id)assimilationInfoForCurrentDateString:(NSString *)dateString; +/** + Returns a human-readable string of the assimilation date + + @return a human-readable string + */ +- (NSString *)doomsdayString; +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/3/DoomsdayMachine.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2/3/DoomsdayMachine.m new file mode 100644 index 0000000..16272ab --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/3/DoomsdayMachine.m @@ -0,0 +1,5 @@ +#import "DoomsdayMachine.h" + +@implementation DoomsdayMachine +// your code here +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/4/MatrixHacker.h b/Tasks/Task2/RSSchool_T2/RSSchool_T2/4/MatrixHacker.h new file mode 100644 index 0000000..be9caa2 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/4/MatrixHacker.h @@ -0,0 +1,40 @@ +#import +/* + Agent Smith is taking over the Matrix, turning everyone into his clones. + Luckily, Neo hacked into the system and is able to inject arbitrary code. + Turned out the Matrix is written in Objective-C, so he needs your help. + + You need to implement a method injectCode: which would take a block and peersist it. + Later, when runCodeWithData: is called, the class should apply the saved block to each + element of the array, creating either a character with the same name either a clone + named "Agent Smith". If the name is not "Neo", the clone of "Agent Smith" is created. + + - Example: + Input: ["Jane Doe", "Delivery Guy", "Postman", "Neo", "Agent John", "Dog"] + Output: [Character(name: "Agent Smith", isClone: true), + Character(name: "Agent Smith", isClone: true), + Character(name: "Agent Smith", isClone: true), + Character(name: "Neo", isClone: false), + Character(name: "Agent Smith", isClone: true), + Character(name: "Agent Smith", isClone: true)] + */ +@protocol Character +- (NSString *)name; +- (BOOL)isClone; ++ (instancetype)createWithName:(NSString *)name isClone:(BOOL)clone; +@end +@interface MatrixHacker : NSObject +/** + Injects the given block into the Matrix by saving it in the class. + + @param theBlock the block of code to be injected + */ +- (void)injectCode:(id (^)(NSString *name))theBlock; +/** + Runs the saved block of code against every element of the array + + @param names the array of names of characters + @return an array of character after applying the injected block + */ +- (NSArray> *)runCodeWithData:(NSArray *)names; +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/4/MatrixHacker.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2/4/MatrixHacker.m new file mode 100644 index 0000000..edb4520 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/4/MatrixHacker.m @@ -0,0 +1,5 @@ +#import "MatrixHacker.h" +// your code here +@implementation MatrixHacker +// your code here +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/5/TinyURL.h b/Tasks/Task2/RSSchool_T2/RSSchool_T2/5/TinyURL.h new file mode 100644 index 0000000..0643a0b --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/5/TinyURL.h @@ -0,0 +1,27 @@ +#import +/* + URL shortening services like tinyurl.com or vk.cc allow you to enter a URL + such as https://drive.google.com/file/d/1EBGP1ntXPGVSfYyKGenOdzgh_hna4vg4/view + and get back a short one such as https://vk.cc/9dEj5S + + Design the encode and decode methods for the TinyURL service. + There is no restriction on how your encode/decode algorithm should work. + You just need to ensure that a URL can be encoded to a tiny URL + and the tiny URL can be decoded to the original URL. + */ +@interface TinyURL : NSObject +/** + Takes a URL and encodes it into a tiny format + + @param originalURL the URL + @return encoded URL + */ +- (NSURL *)encode:(NSURL *)originalURL; +/** + Taken an encoded URL and returns its original form + + @param shortenedURL encoded URL + @return original URL + */ +- (NSURL *)decode:(NSURL *)shortenedURL; +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/5/TinyURL.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2/5/TinyURL.m new file mode 100644 index 0000000..ece240f --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/5/TinyURL.m @@ -0,0 +1,5 @@ +#import "TinyURL.h" + +@implementation TinyURL +// your code here +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/AppDelegate.h b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/AppDelegate.h new file mode 100644 index 0000000..3621106 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/AppDelegate.h @@ -0,0 +1,9 @@ +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/AppDelegate.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/AppDelegate.m new file mode 100644 index 0000000..1435db3 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/AppDelegate.m @@ -0,0 +1,21 @@ +#import "AppDelegate.h" + +@interface AppDelegate () +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + [self.window setRootViewController: [UIViewController new]]; + self.window.backgroundColor = [UIColor whiteColor]; + [self.window makeKeyAndVisible]; + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application {} +- (void)applicationDidEnterBackground:(UIApplication *)application {} +- (void)applicationWillEnterForeground:(UIApplication *)application {} +- (void)applicationDidBecomeActive:(UIApplication *)application {} +- (void)applicationWillTerminate:(UIApplication *)application {} +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Assets.xcassets/Contents.json b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Base.lproj/LaunchScreen.storyboard b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Info.plist b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Info.plist new file mode 100644 index 0000000..4222ac2 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/Info.plist @@ -0,0 +1,43 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/ViewController.h b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/ViewController.h new file mode 100644 index 0000000..d2fc081 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/ViewController.h @@ -0,0 +1,4 @@ +#import + +@interface ViewController : UIViewController +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/ViewController.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/ViewController.m new file mode 100644 index 0000000..010680c --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/ViewController.m @@ -0,0 +1,14 @@ +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +} + +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/main.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/main.m new file mode 100644 index 0000000..0edc47d --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2/Irrelevant/main.m @@ -0,0 +1,8 @@ +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/DoomsdayMachineTests.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/DoomsdayMachineTests.m new file mode 100644 index 0000000..db9da95 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/DoomsdayMachineTests.m @@ -0,0 +1,47 @@ +// +// DoomsdayMachineTests.m +// RSSchool_T2Tests +// +// Created by Alexander Shalamov on 3/26/19. +// Copyright © 2019 Alexander Shalamov. All rights reserved. +// + +#import +#import "DoomsdayMachine.h" +@interface DoomsdayMachineTests : XCTestCase +@property (nonatomic, retain) DoomsdayMachine *machine; +@end + +@implementation DoomsdayMachineTests + +- (void)setUp { + self.machine = [DoomsdayMachine new]; +} + +- (void)test1 { + XCTAssertTrue([@"Sunday, August 14, 2208" isEqualToString:[self.machine doomsdayString]]); +} + +- (void)test2 { + id assimilationInfo = [self.machine assimilationInfoForCurrentDateString:@"2019:03:26@00\\00/12"]; + [assimilationInfo retain]; + XCTAssertEqual(assimilationInfo.years, 189); + XCTAssertEqual(assimilationInfo.months, 4); + XCTAssertEqual(assimilationInfo.days, 18); + XCTAssertEqual(assimilationInfo.hours, 15); + XCTAssertEqual(assimilationInfo.minutes, 13); + XCTAssertEqual(assimilationInfo.seconds, 37); +} + +- (void)test3 { + id assimilationInfo = [self.machine assimilationInfoForCurrentDateString:@"2219:01:01@00\\00/00"]; + [assimilationInfo retain]; + XCTAssertEqual(assimilationInfo.years, -10); + XCTAssertEqual(assimilationInfo.months, -4); + XCTAssertEqual(assimilationInfo.days, -17); + XCTAssertEqual(assimilationInfo.hours, -20); + XCTAssertEqual(assimilationInfo.minutes, -46); + XCTAssertEqual(assimilationInfo.seconds, -23); +} + +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/Info.plist b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/KidnapperNoteTests.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/KidnapperNoteTests.m new file mode 100644 index 0000000..49d35ab --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/KidnapperNoteTests.m @@ -0,0 +1,39 @@ +#import +#import "KidnapperNote.h" + +@interface KidnapperNoteTests : XCTestCase +@property (nonatomic, retain) KidnapperNote *note; +@end + +@implementation KidnapperNoteTests + +- (void)setUp { + self.note = [KidnapperNote new]; +} + +- (void)test1 { + XCTAssertTrue([self.note checkMagazine:@"I will give you one grand for today" + note:@"give one grand today"]); +} + +- (void)test2 { + XCTAssertTrue([self.note checkMagazine:@"To be alone is to be free" + note:@"Be alone"]); +} + +- (void)test3 { + XCTAssertFalse([self.note checkMagazine:@"He put the money in a black bag" + note:@"Put the money in the black bag"]); +} + +- (void)test4 { + XCTAssertFalse([self.note checkMagazine:@"Always call the cops in case of trouble" + note:@"don't call the cops"]); +} + +- (void)test5 { + XCTAssertFalse([self.note checkMagazine:@"Don't leave your the bag outside" + note:@"hide the bag and leave"]); +} + +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/MatrixHackerTests.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/MatrixHackerTests.m new file mode 100644 index 0000000..73bd20d --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/MatrixHackerTests.m @@ -0,0 +1,32 @@ +#import +#import "MatrixHacker.h" + +@interface MatrixHackerTests : XCTestCase +@property (nonatomic, strong) MatrixHacker *hacker; +@property (nonatomic, retain) NSArray *people; +@end + +@interface Char : NSObject +@end +@implementation Char +@end + +@implementation MatrixHackerTests + +- (void)setUp { + self.hacker = [MatrixHacker new]; + self.people = @[@"Delivery Guy", @"Neo", @"Policeman", @"Agent John", @"Agent Black", @"Bartender"]; +} + +- (void)test1 { + __block NSInteger counter = 0; + [self.hacker injectCode:^id(NSString *name) { + counter += 1; + return [Char new]; + }]; + [self.hacker runCodeWithData:self.people]; + XCTAssertTrue(self.people.count == counter); +} + + +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/RomanTranslatorTests.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/RomanTranslatorTests.m new file mode 100644 index 0000000..1e1fa83 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/RomanTranslatorTests.m @@ -0,0 +1,55 @@ +#import +#import "RomanTranslator.h" + +@interface RomanTranslatorTests : XCTestCase +@property (nonatomic, retain) RomanTranslator *translator; +@end + +@implementation RomanTranslatorTests + +- (void)setUp { + self.translator = [RomanTranslator new]; +} + +- (void)test1 { + XCTAssertTrue([@"III" isEqualToString:[self.translator romanFromArabic:@"3"]]); +} + +- (void)test2 { + XCTAssertTrue([@"IV" isEqualToString:[self.translator romanFromArabic:@"4"]]); +} + +- (void)test3 { + XCTAssertTrue([@"IX" isEqualToString:[self.translator romanFromArabic:@"9"]]); +} + +- (void)test4 { + XCTAssertTrue([@"LVIII" isEqualToString:[self.translator romanFromArabic:@"58"]]); +} + +- (void)test5 { + XCTAssertTrue([@"MCMXCIV" isEqualToString:[self.translator romanFromArabic:@"1994"]]); +} + +- (void)test6 { + XCTAssertTrue([@"3" isEqualToString:[self.translator arabicFromRoman:@"III"]]); +} + +- (void)test7 { + XCTAssertTrue([@"4" isEqualToString:[self.translator arabicFromRoman:@"IV"]]); +} + +- (void)test8 { + XCTAssertTrue([@"9" isEqualToString:[self.translator arabicFromRoman:@"IX"]]); +} + +- (void)test9 { + XCTAssertTrue([@"58" isEqualToString:[self.translator arabicFromRoman:@"LVIII"]]); +} + +- (void)test10 { + XCTAssertTrue([@"1994" isEqualToString:[self.translator arabicFromRoman:@"MCMXCIV"]]); +} + + +@end diff --git a/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/TinyURLTests.m b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/TinyURLTests.m new file mode 100644 index 0000000..9b13726 --- /dev/null +++ b/Tasks/Task2/RSSchool_T2/RSSchool_T2Tests/TinyURLTests.m @@ -0,0 +1,53 @@ +#import +#import "TinyURL.h" + +@interface TinyURLTests : XCTestCase +@property (nonatomic, retain) TinyURL *urlEncoder; +@end + +@implementation TinyURLTests + +- (void)setUp { + self.urlEncoder = [TinyURL new]; +} + + +- (void)test1 { + NSURL *url = [[NSURL alloc] initWithString:@"https://rs.school/ios/index.html"]; + NSURL *encoded = [self.urlEncoder encode:url]; + + NSURL *decoded = [self.urlEncoder decode:encoded]; + XCTAssertTrue([url.absoluteString isEqualToString:decoded.absoluteString]); +} + +- (void)test2 { + NSURL *url = [[NSURL alloc] initWithString:@"https://google.com"]; + NSURL *encoded = [self.urlEncoder encode:url]; + + NSURL *decoded = [self.urlEncoder decode:encoded]; + XCTAssertTrue([url.absoluteString isEqualToString:decoded.absoluteString]); +} + +- (void)test3 { + NSURL *url = [[NSURL alloc] initWithString:@"https://yandex.by/images/"]; + NSURL *encoded = [self.urlEncoder encode:url]; + + NSURL *decoded = [self.urlEncoder decode:encoded]; + XCTAssertTrue([url.absoluteString isEqualToString:decoded.absoluteString]); +} + +- (void)test4 { + NSURL *url1 = [[NSURL alloc] initWithString:@"https://rs.school/ios/index.html"]; + NSURL *encoded1 = [self.urlEncoder encode:url1]; + NSURL *decoded1 = [self.urlEncoder decode:encoded1]; + XCTAssertTrue([url1.absoluteString isEqualToString:decoded1.absoluteString]); + + NSURL *url2 = [[NSURL alloc] initWithString:@"http://rs.school/ios/index.html"]; + NSURL *encoded2 = [self.urlEncoder encode:url2]; + NSURL *decoded2 = [self.urlEncoder decode:encoded2]; + XCTAssertTrue([url2.absoluteString isEqualToString:decoded2.absoluteString]); + + XCTAssertFalse([encoded1.absoluteString isEqualToString:encoded2.absoluteString]); +} + +@end