diff --git a/Static.xcodeproj/project.pbxproj b/Static.xcodeproj/project.pbxproj index 1f19afb..d082f8c 100644 --- a/Static.xcodeproj/project.pbxproj +++ b/Static.xcodeproj/project.pbxproj @@ -49,6 +49,13 @@ remoteGlobalIDString = 21826AA91B3F51A100AA9641; remoteInfo = "Static-iOS"; }; + 3B1129252226E5D800B6E06A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 21826AA11B3F51A100AA9641 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 36748D4E1B5034EC0046F207; + remoteInfo = Example; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -242,6 +249,7 @@ ); dependencies = ( 21826AB71B3F51A100AA9641 /* PBXTargetDependency */, + 3B1129262226E5D800B6E06A /* PBXTargetDependency */, ); name = StaticTests; productName = StaticTests; @@ -391,6 +399,11 @@ target = 21826AA91B3F51A100AA9641 /* Static-iOS */; targetProxy = 363129C51B50354E0024E339 /* PBXContainerItemProxy */; }; + 3B1129262226E5D800B6E06A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 36748D4E1B5034EC0046F207 /* Example */; + targetProxy = 3B1129252226E5D800B6E06A /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ diff --git a/Static.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/Static.xcodeproj/xcshareddata/xcschemes/Example.xcscheme index 3c4e2b1..204b44d 100644 --- a/Static.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ b/Static.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -28,6 +28,16 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + = start..<(start - delta) + let range: Range = newCount..<(newCount - delta) tableView.deleteSections(IndexSet(integersIn: range), with: animation) } diff --git a/Static/Tests/DataSourceTests.swift b/Static/Tests/DataSourceTests.swift index 67664f5..76b9a3a 100644 --- a/Static/Tests/DataSourceTests.swift +++ b/Static/Tests/DataSourceTests.swift @@ -41,6 +41,14 @@ class DataSourceTests: XCTestCase { XCTAssertEqual(4, tableView.numberOfRows(inSection: 1)) XCTAssertEqual(2, tableView.numberOfRows(inSection: 2)) + dataSource.sections = [ + Section(rows: [Row(text: "Merrily"), Row(text: "Merrily")]), + Section(rows: [Row(text: "Life"), Row(text: "Is"), Row(text: "But"), Row(text: "A"), Row(text: "Dream")]), + ] + XCTAssertEqual(2, tableView.numberOfSections) + XCTAssertEqual(2, tableView.numberOfRows(inSection: 0)) + XCTAssertEqual(5, tableView.numberOfRows(inSection: 1)) + dataSource.sections = [] XCTAssertEqual(0, tableView.numberOfSections) }