├── .gitignore ├── Podfile ├── Podfile.lock ├── README.md ├── VVStack.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── VVStack.xcworkspace └── contents.xcworkspacedata ├── VVStack ├── AppDelegate.h ├── AppDelegate.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── VVStack-Info.plist ├── VVStack-Prefix.pch ├── VVStack.h ├── VVStack.m ├── en.lproj │ └── InfoPlist.strings └── main.m └── VVStackTests ├── SimpleStringSpec.m ├── VVStackSpec.m ├── VVStackTests-Info.plist ├── VVStackTests.m └── en.lproj └── InfoPlist.strings /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout 19 | 20 | #CocoaPods 21 | Pods 22 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | target :VVStackTests, :exclusive => true do 2 | pod 'Kiwi/XCTest' 3 | end -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Kiwi/ARC (2.2.3) 3 | - Kiwi/NonARC (2.2.3) 4 | - Kiwi/XCTest (2.2.3): 5 | - Kiwi/ARC 6 | - Kiwi/NonARC 7 | 8 | DEPENDENCIES: 9 | - Kiwi/XCTest 10 | 11 | SPEC CHECKSUMS: 12 | Kiwi: 04c51e880831d291748ec702d42c4101f7eb95c9 13 | 14 | COCOAPODS: 0.29.0 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | VVStack 2 | ======= 3 | 4 | Just a TDD demo with XCTest and Kiwi 5 | -------------------------------------------------------------------------------- /VVStack.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A7D7E3C1799840858E88B727 /* libPods-VVStackTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B2A1DA0490F44398E47405E /* libPods-VVStackTests.a */; }; 11 | D15CFD5618AD0A3100C1635E /* VVStack.m in Sources */ = {isa = PBXBuildFile; fileRef = D15CFD5518AD0A3100C1635E /* VVStack.m */; }; 12 | D175760218AF691000FBC41C /* SimpleStringSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D175760118AF691000FBC41C /* SimpleStringSpec.m */; }; 13 | D175760418AFB67B00FBC41C /* VVStackSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = D175760318AFB67B00FBC41C /* VVStackSpec.m */; }; 14 | D1CF742318AC67A6001F28E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1CF742218AC67A6001F28E4 /* Foundation.framework */; }; 15 | D1CF742518AC67A6001F28E4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1CF742418AC67A6001F28E4 /* CoreGraphics.framework */; }; 16 | D1CF742718AC67A6001F28E4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1CF742618AC67A6001F28E4 /* UIKit.framework */; }; 17 | D1CF742D18AC67A6001F28E4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D1CF742B18AC67A6001F28E4 /* InfoPlist.strings */; }; 18 | D1CF742F18AC67A6001F28E4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D1CF742E18AC67A6001F28E4 /* main.m */; }; 19 | D1CF743318AC67A6001F28E4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D1CF743218AC67A6001F28E4 /* AppDelegate.m */; }; 20 | D1CF743518AC67A6001F28E4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D1CF743418AC67A6001F28E4 /* Images.xcassets */; }; 21 | D1CF743C18AC67A6001F28E4 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1CF743B18AC67A6001F28E4 /* XCTest.framework */; }; 22 | D1CF743D18AC67A6001F28E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1CF742218AC67A6001F28E4 /* Foundation.framework */; }; 23 | D1CF743E18AC67A6001F28E4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1CF742618AC67A6001F28E4 /* UIKit.framework */; }; 24 | D1CF744618AC67A6001F28E4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D1CF744418AC67A6001F28E4 /* InfoPlist.strings */; }; 25 | D1CF744818AC67A6001F28E4 /* VVStackTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D1CF744718AC67A6001F28E4 /* VVStackTests.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | D1CF743F18AC67A6001F28E4 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = D1CF741718AC67A6001F28E4 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = D1CF741E18AC67A6001F28E4; 34 | remoteInfo = VVStack; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 40A46F7791AB48E8BB68C8C5 /* Pods-VVStackTests.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VVStackTests.xcconfig"; path = "Pods/Pods-VVStackTests.xcconfig"; sourceTree = ""; }; 40 | 8B2A1DA0490F44398E47405E /* libPods-VVStackTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VVStackTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | D15CFD5418AD0A3100C1635E /* VVStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VVStack.h; sourceTree = ""; }; 42 | D15CFD5518AD0A3100C1635E /* VVStack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VVStack.m; sourceTree = ""; }; 43 | D175760118AF691000FBC41C /* SimpleStringSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleStringSpec.m; sourceTree = ""; }; 44 | D175760318AFB67B00FBC41C /* VVStackSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VVStackSpec.m; sourceTree = ""; }; 45 | D1CF741F18AC67A6001F28E4 /* VVStack.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VVStack.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | D1CF742218AC67A6001F28E4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 47 | D1CF742418AC67A6001F28E4 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 48 | D1CF742618AC67A6001F28E4 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 49 | D1CF742A18AC67A6001F28E4 /* VVStack-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "VVStack-Info.plist"; sourceTree = ""; }; 50 | D1CF742C18AC67A6001F28E4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 51 | D1CF742E18AC67A6001F28E4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | D1CF743018AC67A6001F28E4 /* VVStack-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VVStack-Prefix.pch"; sourceTree = ""; }; 53 | D1CF743118AC67A6001F28E4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 54 | D1CF743218AC67A6001F28E4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 55 | D1CF743418AC67A6001F28E4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 56 | D1CF743A18AC67A6001F28E4 /* VVStackTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VVStackTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | D1CF743B18AC67A6001F28E4 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 58 | D1CF744318AC67A6001F28E4 /* VVStackTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "VVStackTests-Info.plist"; sourceTree = ""; }; 59 | D1CF744518AC67A6001F28E4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 60 | D1CF744718AC67A6001F28E4 /* VVStackTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VVStackTests.m; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | D1CF741C18AC67A6001F28E4 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | D1CF742518AC67A6001F28E4 /* CoreGraphics.framework in Frameworks */, 69 | D1CF742718AC67A6001F28E4 /* UIKit.framework in Frameworks */, 70 | D1CF742318AC67A6001F28E4 /* Foundation.framework in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | D1CF743718AC67A6001F28E4 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | D1CF743C18AC67A6001F28E4 /* XCTest.framework in Frameworks */, 79 | D1CF743E18AC67A6001F28E4 /* UIKit.framework in Frameworks */, 80 | D1CF743D18AC67A6001F28E4 /* Foundation.framework in Frameworks */, 81 | A7D7E3C1799840858E88B727 /* libPods-VVStackTests.a in Frameworks */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | /* End PBXFrameworksBuildPhase section */ 86 | 87 | /* Begin PBXGroup section */ 88 | D1CF741618AC67A6001F28E4 = { 89 | isa = PBXGroup; 90 | children = ( 91 | D1CF742818AC67A6001F28E4 /* VVStack */, 92 | D1CF744118AC67A6001F28E4 /* VVStackTests */, 93 | D1CF742118AC67A6001F28E4 /* Frameworks */, 94 | D1CF742018AC67A6001F28E4 /* Products */, 95 | 40A46F7791AB48E8BB68C8C5 /* Pods-VVStackTests.xcconfig */, 96 | ); 97 | sourceTree = ""; 98 | }; 99 | D1CF742018AC67A6001F28E4 /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | D1CF741F18AC67A6001F28E4 /* VVStack.app */, 103 | D1CF743A18AC67A6001F28E4 /* VVStackTests.xctest */, 104 | ); 105 | name = Products; 106 | sourceTree = ""; 107 | }; 108 | D1CF742118AC67A6001F28E4 /* Frameworks */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | D1CF742218AC67A6001F28E4 /* Foundation.framework */, 112 | D1CF742418AC67A6001F28E4 /* CoreGraphics.framework */, 113 | D1CF742618AC67A6001F28E4 /* UIKit.framework */, 114 | D1CF743B18AC67A6001F28E4 /* XCTest.framework */, 115 | 8B2A1DA0490F44398E47405E /* libPods-VVStackTests.a */, 116 | ); 117 | name = Frameworks; 118 | sourceTree = ""; 119 | }; 120 | D1CF742818AC67A6001F28E4 /* VVStack */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | D1CF743118AC67A6001F28E4 /* AppDelegate.h */, 124 | D1CF743218AC67A6001F28E4 /* AppDelegate.m */, 125 | D1CF743418AC67A6001F28E4 /* Images.xcassets */, 126 | D1CF742918AC67A6001F28E4 /* Supporting Files */, 127 | D15CFD5418AD0A3100C1635E /* VVStack.h */, 128 | D15CFD5518AD0A3100C1635E /* VVStack.m */, 129 | ); 130 | path = VVStack; 131 | sourceTree = ""; 132 | }; 133 | D1CF742918AC67A6001F28E4 /* Supporting Files */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | D1CF742A18AC67A6001F28E4 /* VVStack-Info.plist */, 137 | D1CF742B18AC67A6001F28E4 /* InfoPlist.strings */, 138 | D1CF742E18AC67A6001F28E4 /* main.m */, 139 | D1CF743018AC67A6001F28E4 /* VVStack-Prefix.pch */, 140 | ); 141 | name = "Supporting Files"; 142 | sourceTree = ""; 143 | }; 144 | D1CF744118AC67A6001F28E4 /* VVStackTests */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | D1CF744718AC67A6001F28E4 /* VVStackTests.m */, 148 | D175760118AF691000FBC41C /* SimpleStringSpec.m */, 149 | D175760318AFB67B00FBC41C /* VVStackSpec.m */, 150 | D1CF744218AC67A6001F28E4 /* Supporting Files */, 151 | ); 152 | path = VVStackTests; 153 | sourceTree = ""; 154 | }; 155 | D1CF744218AC67A6001F28E4 /* Supporting Files */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | D1CF744318AC67A6001F28E4 /* VVStackTests-Info.plist */, 159 | D1CF744418AC67A6001F28E4 /* InfoPlist.strings */, 160 | ); 161 | name = "Supporting Files"; 162 | sourceTree = ""; 163 | }; 164 | /* End PBXGroup section */ 165 | 166 | /* Begin PBXNativeTarget section */ 167 | D1CF741E18AC67A6001F28E4 /* VVStack */ = { 168 | isa = PBXNativeTarget; 169 | buildConfigurationList = D1CF744B18AC67A6001F28E4 /* Build configuration list for PBXNativeTarget "VVStack" */; 170 | buildPhases = ( 171 | D1CF741B18AC67A6001F28E4 /* Sources */, 172 | D1CF741C18AC67A6001F28E4 /* Frameworks */, 173 | D1CF741D18AC67A6001F28E4 /* Resources */, 174 | ); 175 | buildRules = ( 176 | ); 177 | dependencies = ( 178 | ); 179 | name = VVStack; 180 | productName = VVStack; 181 | productReference = D1CF741F18AC67A6001F28E4 /* VVStack.app */; 182 | productType = "com.apple.product-type.application"; 183 | }; 184 | D1CF743918AC67A6001F28E4 /* VVStackTests */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = D1CF744E18AC67A6001F28E4 /* Build configuration list for PBXNativeTarget "VVStackTests" */; 187 | buildPhases = ( 188 | 9C6948EEC57541DFAFE61C99 /* Check Pods Manifest.lock */, 189 | D1CF743618AC67A6001F28E4 /* Sources */, 190 | D1CF743718AC67A6001F28E4 /* Frameworks */, 191 | D1CF743818AC67A6001F28E4 /* Resources */, 192 | CCF97B7B763141A888AEC08A /* Copy Pods Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | D1CF744018AC67A6001F28E4 /* PBXTargetDependency */, 198 | ); 199 | name = VVStackTests; 200 | productName = VVStackTests; 201 | productReference = D1CF743A18AC67A6001F28E4 /* VVStackTests.xctest */; 202 | productType = "com.apple.product-type.bundle.unit-test"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | D1CF741718AC67A6001F28E4 /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastUpgradeCheck = 0500; 211 | ORGANIZATIONNAME = "OneV's Den"; 212 | TargetAttributes = { 213 | D1CF743918AC67A6001F28E4 = { 214 | TestTargetID = D1CF741E18AC67A6001F28E4; 215 | }; 216 | }; 217 | }; 218 | buildConfigurationList = D1CF741A18AC67A6001F28E4 /* Build configuration list for PBXProject "VVStack" */; 219 | compatibilityVersion = "Xcode 3.2"; 220 | developmentRegion = English; 221 | hasScannedForEncodings = 0; 222 | knownRegions = ( 223 | en, 224 | ); 225 | mainGroup = D1CF741618AC67A6001F28E4; 226 | productRefGroup = D1CF742018AC67A6001F28E4 /* Products */; 227 | projectDirPath = ""; 228 | projectRoot = ""; 229 | targets = ( 230 | D1CF741E18AC67A6001F28E4 /* VVStack */, 231 | D1CF743918AC67A6001F28E4 /* VVStackTests */, 232 | ); 233 | }; 234 | /* End PBXProject section */ 235 | 236 | /* Begin PBXResourcesBuildPhase section */ 237 | D1CF741D18AC67A6001F28E4 /* Resources */ = { 238 | isa = PBXResourcesBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | D1CF742D18AC67A6001F28E4 /* InfoPlist.strings in Resources */, 242 | D1CF743518AC67A6001F28E4 /* Images.xcassets in Resources */, 243 | ); 244 | runOnlyForDeploymentPostprocessing = 0; 245 | }; 246 | D1CF743818AC67A6001F28E4 /* Resources */ = { 247 | isa = PBXResourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | D1CF744618AC67A6001F28E4 /* InfoPlist.strings in Resources */, 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | /* End PBXResourcesBuildPhase section */ 255 | 256 | /* Begin PBXShellScriptBuildPhase section */ 257 | 9C6948EEC57541DFAFE61C99 /* Check Pods Manifest.lock */ = { 258 | isa = PBXShellScriptBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | ); 262 | inputPaths = ( 263 | ); 264 | name = "Check Pods Manifest.lock"; 265 | outputPaths = ( 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | shellPath = /bin/sh; 269 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 270 | showEnvVarsInLog = 0; 271 | }; 272 | CCF97B7B763141A888AEC08A /* Copy Pods Resources */ = { 273 | isa = PBXShellScriptBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | inputPaths = ( 278 | ); 279 | name = "Copy Pods Resources"; 280 | outputPaths = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | shellPath = /bin/sh; 284 | shellScript = "\"${SRCROOT}/Pods/Pods-VVStackTests-resources.sh\"\n"; 285 | showEnvVarsInLog = 0; 286 | }; 287 | /* End PBXShellScriptBuildPhase section */ 288 | 289 | /* Begin PBXSourcesBuildPhase section */ 290 | D1CF741B18AC67A6001F28E4 /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | D1CF743318AC67A6001F28E4 /* AppDelegate.m in Sources */, 295 | D1CF742F18AC67A6001F28E4 /* main.m in Sources */, 296 | D15CFD5618AD0A3100C1635E /* VVStack.m in Sources */, 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | }; 300 | D1CF743618AC67A6001F28E4 /* Sources */ = { 301 | isa = PBXSourcesBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | D1CF744818AC67A6001F28E4 /* VVStackTests.m in Sources */, 305 | D175760218AF691000FBC41C /* SimpleStringSpec.m in Sources */, 306 | D175760418AFB67B00FBC41C /* VVStackSpec.m in Sources */, 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | /* End PBXSourcesBuildPhase section */ 311 | 312 | /* Begin PBXTargetDependency section */ 313 | D1CF744018AC67A6001F28E4 /* PBXTargetDependency */ = { 314 | isa = PBXTargetDependency; 315 | target = D1CF741E18AC67A6001F28E4 /* VVStack */; 316 | targetProxy = D1CF743F18AC67A6001F28E4 /* PBXContainerItemProxy */; 317 | }; 318 | /* End PBXTargetDependency section */ 319 | 320 | /* Begin PBXVariantGroup section */ 321 | D1CF742B18AC67A6001F28E4 /* InfoPlist.strings */ = { 322 | isa = PBXVariantGroup; 323 | children = ( 324 | D1CF742C18AC67A6001F28E4 /* en */, 325 | ); 326 | name = InfoPlist.strings; 327 | sourceTree = ""; 328 | }; 329 | D1CF744418AC67A6001F28E4 /* InfoPlist.strings */ = { 330 | isa = PBXVariantGroup; 331 | children = ( 332 | D1CF744518AC67A6001F28E4 /* en */, 333 | ); 334 | name = InfoPlist.strings; 335 | sourceTree = ""; 336 | }; 337 | /* End PBXVariantGroup section */ 338 | 339 | /* Begin XCBuildConfiguration section */ 340 | D1CF744918AC67A6001F28E4 /* Debug */ = { 341 | isa = XCBuildConfiguration; 342 | buildSettings = { 343 | ALWAYS_SEARCH_USER_PATHS = NO; 344 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 345 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 346 | CLANG_CXX_LIBRARY = "libc++"; 347 | CLANG_ENABLE_MODULES = YES; 348 | CLANG_ENABLE_OBJC_ARC = YES; 349 | CLANG_WARN_BOOL_CONVERSION = YES; 350 | CLANG_WARN_CONSTANT_CONVERSION = YES; 351 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 352 | CLANG_WARN_EMPTY_BODY = YES; 353 | CLANG_WARN_ENUM_CONVERSION = YES; 354 | CLANG_WARN_INT_CONVERSION = YES; 355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 356 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 357 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 358 | COPY_PHASE_STRIP = NO; 359 | GCC_C_LANGUAGE_STANDARD = gnu99; 360 | GCC_DYNAMIC_NO_PIC = NO; 361 | GCC_OPTIMIZATION_LEVEL = 0; 362 | GCC_PREPROCESSOR_DEFINITIONS = ( 363 | "DEBUG=1", 364 | "$(inherited)", 365 | ); 366 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 367 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 368 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 369 | GCC_WARN_UNDECLARED_SELECTOR = YES; 370 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 371 | GCC_WARN_UNUSED_FUNCTION = YES; 372 | GCC_WARN_UNUSED_VARIABLE = YES; 373 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 374 | ONLY_ACTIVE_ARCH = YES; 375 | SDKROOT = iphoneos; 376 | }; 377 | name = Debug; 378 | }; 379 | D1CF744A18AC67A6001F28E4 /* Release */ = { 380 | isa = XCBuildConfiguration; 381 | buildSettings = { 382 | ALWAYS_SEARCH_USER_PATHS = NO; 383 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 384 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 385 | CLANG_CXX_LIBRARY = "libc++"; 386 | CLANG_ENABLE_MODULES = YES; 387 | CLANG_ENABLE_OBJC_ARC = YES; 388 | CLANG_WARN_BOOL_CONVERSION = YES; 389 | CLANG_WARN_CONSTANT_CONVERSION = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INT_CONVERSION = YES; 394 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 395 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 396 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 397 | COPY_PHASE_STRIP = YES; 398 | ENABLE_NS_ASSERTIONS = NO; 399 | GCC_C_LANGUAGE_STANDARD = gnu99; 400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 402 | GCC_WARN_UNDECLARED_SELECTOR = YES; 403 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 404 | GCC_WARN_UNUSED_FUNCTION = YES; 405 | GCC_WARN_UNUSED_VARIABLE = YES; 406 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 407 | SDKROOT = iphoneos; 408 | VALIDATE_PRODUCT = YES; 409 | }; 410 | name = Release; 411 | }; 412 | D1CF744C18AC67A6001F28E4 /* Debug */ = { 413 | isa = XCBuildConfiguration; 414 | buildSettings = { 415 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 416 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 417 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 418 | GCC_PREFIX_HEADER = "VVStack/VVStack-Prefix.pch"; 419 | INFOPLIST_FILE = "VVStack/VVStack-Info.plist"; 420 | PRODUCT_NAME = "$(TARGET_NAME)"; 421 | WRAPPER_EXTENSION = app; 422 | }; 423 | name = Debug; 424 | }; 425 | D1CF744D18AC67A6001F28E4 /* Release */ = { 426 | isa = XCBuildConfiguration; 427 | buildSettings = { 428 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 429 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 430 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 431 | GCC_PREFIX_HEADER = "VVStack/VVStack-Prefix.pch"; 432 | INFOPLIST_FILE = "VVStack/VVStack-Info.plist"; 433 | PRODUCT_NAME = "$(TARGET_NAME)"; 434 | WRAPPER_EXTENSION = app; 435 | }; 436 | name = Release; 437 | }; 438 | D1CF744F18AC67A6001F28E4 /* Debug */ = { 439 | isa = XCBuildConfiguration; 440 | baseConfigurationReference = 40A46F7791AB48E8BB68C8C5 /* Pods-VVStackTests.xcconfig */; 441 | buildSettings = { 442 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 443 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/VVStack.app/VVStack"; 444 | FRAMEWORK_SEARCH_PATHS = ( 445 | "$(SDKROOT)/Developer/Library/Frameworks", 446 | "$(inherited)", 447 | "$(DEVELOPER_FRAMEWORKS_DIR)", 448 | ); 449 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 450 | GCC_PREFIX_HEADER = "VVStack/VVStack-Prefix.pch"; 451 | GCC_PREPROCESSOR_DEFINITIONS = ( 452 | "DEBUG=1", 453 | "$(inherited)", 454 | ); 455 | INFOPLIST_FILE = "VVStackTests/VVStackTests-Info.plist"; 456 | PRODUCT_NAME = "$(TARGET_NAME)"; 457 | TEST_HOST = "$(BUNDLE_LOADER)"; 458 | WRAPPER_EXTENSION = xctest; 459 | }; 460 | name = Debug; 461 | }; 462 | D1CF745018AC67A6001F28E4 /* Release */ = { 463 | isa = XCBuildConfiguration; 464 | baseConfigurationReference = 40A46F7791AB48E8BB68C8C5 /* Pods-VVStackTests.xcconfig */; 465 | buildSettings = { 466 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 467 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/VVStack.app/VVStack"; 468 | FRAMEWORK_SEARCH_PATHS = ( 469 | "$(SDKROOT)/Developer/Library/Frameworks", 470 | "$(inherited)", 471 | "$(DEVELOPER_FRAMEWORKS_DIR)", 472 | ); 473 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 474 | GCC_PREFIX_HEADER = "VVStack/VVStack-Prefix.pch"; 475 | INFOPLIST_FILE = "VVStackTests/VVStackTests-Info.plist"; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | TEST_HOST = "$(BUNDLE_LOADER)"; 478 | WRAPPER_EXTENSION = xctest; 479 | }; 480 | name = Release; 481 | }; 482 | /* End XCBuildConfiguration section */ 483 | 484 | /* Begin XCConfigurationList section */ 485 | D1CF741A18AC67A6001F28E4 /* Build configuration list for PBXProject "VVStack" */ = { 486 | isa = XCConfigurationList; 487 | buildConfigurations = ( 488 | D1CF744918AC67A6001F28E4 /* Debug */, 489 | D1CF744A18AC67A6001F28E4 /* Release */, 490 | ); 491 | defaultConfigurationIsVisible = 0; 492 | defaultConfigurationName = Release; 493 | }; 494 | D1CF744B18AC67A6001F28E4 /* Build configuration list for PBXNativeTarget "VVStack" */ = { 495 | isa = XCConfigurationList; 496 | buildConfigurations = ( 497 | D1CF744C18AC67A6001F28E4 /* Debug */, 498 | D1CF744D18AC67A6001F28E4 /* Release */, 499 | ); 500 | defaultConfigurationIsVisible = 0; 501 | defaultConfigurationName = Release; 502 | }; 503 | D1CF744E18AC67A6001F28E4 /* Build configuration list for PBXNativeTarget "VVStackTests" */ = { 504 | isa = XCConfigurationList; 505 | buildConfigurations = ( 506 | D1CF744F18AC67A6001F28E4 /* Debug */, 507 | D1CF745018AC67A6001F28E4 /* Release */, 508 | ); 509 | defaultConfigurationIsVisible = 0; 510 | defaultConfigurationName = Release; 511 | }; 512 | /* End XCConfigurationList section */ 513 | }; 514 | rootObject = D1CF741718AC67A6001F28E4 /* Project object */; 515 | } 516 | -------------------------------------------------------------------------------- /VVStack.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /VVStack.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /VVStack/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // VVStack 4 | // 5 | // Created by 王 巍 on 14-2-13. 6 | // Copyright (c) 2014年 OneV's Den. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /VVStack/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // VVStack 4 | // 5 | // Created by 王 巍 on 14-2-13. 6 | // Copyright (c) 2014年 OneV's Den. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 16 | // Override point for customization after application launch. 17 | self.window.backgroundColor = [UIColor whiteColor]; 18 | [self.window makeKeyAndVisible]; 19 | return YES; 20 | } 21 | 22 | - (void)applicationWillResignActive:(UIApplication *)application 23 | { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application 29 | { 30 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | - (void)applicationWillEnterForeground:(UIApplication *)application 35 | { 36 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 37 | } 38 | 39 | - (void)applicationDidBecomeActive:(UIApplication *)application 40 | { 41 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 42 | } 43 | 44 | - (void)applicationWillTerminate:(UIApplication *)application 45 | { 46 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /VVStack/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /VVStack/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /VVStack/VVStack-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.onevcat.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /VVStack/VVStack-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /VVStack/VVStack.h: -------------------------------------------------------------------------------- 1 | // 2 | // VVStack.h 3 | // VVStack 4 | // 5 | // Created by 王 巍 on 14-2-13. 6 | // Copyright (c) 2014年 OneV's Den. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VVStack : NSObject 12 | - (void)push:(double)num; 13 | - (double)top; 14 | - (double)pop; 15 | @end 16 | -------------------------------------------------------------------------------- /VVStack/VVStack.m: -------------------------------------------------------------------------------- 1 | // 2 | // VVStack.m 3 | // VVStack 4 | // 5 | // Created by 王 巍 on 14-2-13. 6 | // Copyright (c) 2014年 OneV's Den. All rights reserved. 7 | // 8 | 9 | #import "VVStack.h" 10 | 11 | @interface VVStack() 12 | @property (nonatomic, strong) NSMutableArray *numbers; 13 | @end 14 | 15 | @implementation VVStack 16 | - (id)init { 17 | if (self = [super init]) { 18 | _numbers = [NSMutableArray new]; 19 | } 20 | return self; 21 | } 22 | 23 | - (void)push:(double)num { 24 | [self.numbers addObject:@(num)]; 25 | } 26 | 27 | - (double)top { 28 | return [[self.numbers lastObject] doubleValue]; 29 | } 30 | 31 | - (NSUInteger)count { 32 | return [self.numbers count]; 33 | } 34 | 35 | - (double)pop { 36 | if ([self count] == 0) { 37 | [NSException raise:@"VVStackPopEmptyException" format:@"Can not pop an empty stack."]; 38 | } 39 | double result = [self top]; 40 | [self.numbers removeLastObject]; 41 | return result; 42 | } 43 | @end 44 | -------------------------------------------------------------------------------- /VVStack/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /VVStack/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // VVStack 4 | // 5 | // Created by 王 巍 on 14-2-13. 6 | // Copyright (c) 2014年 OneV's Den. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VVStackTests/SimpleStringSpec.m: -------------------------------------------------------------------------------- 1 | // 2 | // SimpleStringSpec.m 3 | // VVStack 4 | // 5 | // Created by 王 巍 on 14-2-15. 6 | // Copyright 2014年 OneV's Den. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | SPEC_BEGIN(SimpleStringSpec) 13 | 14 | describe(@"SimpleString", ^{ 15 | context(@"when assigned to 'Hello world'", ^{ 16 | NSString *greeting = @"Hello world"; 17 | it(@"should exist", ^{ 18 | [[greeting shouldNot] beNil]; 19 | }); 20 | 21 | it(@"should equal to 'Hello world'", ^{ 22 | [[greeting should] equal:@"Hello world"]; 23 | }); 24 | }); 25 | }); 26 | 27 | SPEC_END 28 | -------------------------------------------------------------------------------- /VVStackTests/VVStackSpec.m: -------------------------------------------------------------------------------- 1 | // 2 | // VVStackSpec.m 3 | // VVStack 4 | // 5 | // Created by 王 巍 on 14-2-15. 6 | // Copyright 2014年 OneV's Den. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VVStack.h" 11 | 12 | SPEC_BEGIN(VVStackSpec) 13 | 14 | describe(@"VVStack", ^{ 15 | context(@"when created", ^{ 16 | __block VVStack *stack = nil; 17 | beforeEach(^{ 18 | stack = [VVStack new]; 19 | }); 20 | 21 | afterEach(^{ 22 | stack = nil; 23 | }); 24 | 25 | it(@"should have the class VVStack", ^{ 26 | [[[VVStack class] shouldNot] beNil]; 27 | }); 28 | 29 | it(@"should exist", ^{ 30 | [[stack shouldNot] beNil]; 31 | }); 32 | 33 | it(@"should equal contains 0 element", ^{ 34 | [[stack should] beEmpty]; 35 | }); 36 | 37 | it(@"should be able to push and get top", ^{ 38 | [stack push:2.3]; 39 | [[stack should] haveCountOf:1]; 40 | [[theValue([stack top]) should] equal:theValue(2.3)]; 41 | 42 | [stack push:4.6]; 43 | [[stack should] haveCountOf:2]; 44 | [[theValue([stack top]) should] equal:4.6 withDelta:0.001]; 45 | }); 46 | 47 | it(@"should raise a exception when pop", ^{ 48 | [[theBlock(^{ 49 | [stack pop]; 50 | }) should] raiseWithName:@"VVStackPopEmptyException"]; 51 | }); 52 | }); 53 | 54 | context(@"when new created and pushed 4.6", ^{ 55 | __block VVStack *stack = nil; 56 | beforeEach(^{ 57 | stack = [VVStack new]; 58 | [stack push:4.6]; 59 | }); 60 | 61 | afterEach(^{ 62 | stack = nil; 63 | }); 64 | 65 | it(@"can be poped and the value equals 4.6", ^{ 66 | [[theValue([stack pop]) should] equal:theValue(4.6)]; 67 | }); 68 | 69 | it(@"should contains 0 element after pop", ^{ 70 | [stack pop]; 71 | [[stack should] beEmpty]; 72 | }); 73 | }); 74 | }); 75 | 76 | SPEC_END 77 | -------------------------------------------------------------------------------- /VVStackTests/VVStackTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.onevcat.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /VVStackTests/VVStackTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // VVStackTests.m 3 | // VVStackTests 4 | // 5 | // Created by 王 巍 on 14-2-13. 6 | // Copyright (c) 2014年 OneV's Den. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VVStack.h" 11 | 12 | @interface VVStackTests : XCTestCase 13 | @property (nonatomic, strong) VVStack *stack; 14 | @end 15 | 16 | @implementation VVStackTests 17 | 18 | - (void)setUp 19 | { 20 | [super setUp]; 21 | // Put setup code here. This method is called before the invocation of each test method in the class. 22 | _stack = [VVStack new]; 23 | } 24 | 25 | - (void)tearDown 26 | { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | _stack = nil; 29 | [super tearDown]; 30 | } 31 | 32 | - (void)testStackExist { 33 | XCTAssertNotNil([VVStack class], @"VVStack class should exist."); 34 | } 35 | 36 | - (void)testStackObjectCanBeCreated { 37 | 38 | XCTAssertNotNil(self.stack, @"VVStack object can be created."); 39 | } 40 | 41 | - (void)testPushANumberAndGetIt { 42 | [self.stack push:2.3]; 43 | double topNumber = [self.stack top]; 44 | XCTAssertEqual(topNumber, 2.3, @"VVStack should can be pushed and has that top value."); 45 | 46 | [self.stack push:4.6]; 47 | topNumber = [self.stack top]; 48 | XCTAssertEqual(topNumber, 4.6, @"Top value of VVStack should be the last num pushed into it"); 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /VVStackTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------