diff --git a/Demo/SmartAsyncImageDemo/SmartAsyncImageDemo.xcodeproj/project.pbxproj b/Demo/SmartAsyncImageDemo/SmartAsyncImageDemo.xcodeproj/project.pbxproj index 0c5b789..d54679b 100644 --- a/Demo/SmartAsyncImageDemo/SmartAsyncImageDemo.xcodeproj/project.pbxproj +++ b/Demo/SmartAsyncImageDemo/SmartAsyncImageDemo.xcodeproj/project.pbxproj @@ -10,19 +10,8 @@ 88354F6A2EE7630300624775 /* SmartAsyncImage in Frameworks */ = {isa = PBXBuildFile; productRef = 88354F692EE7630300624775 /* SmartAsyncImage */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 88354F4C2EE762BE00624775 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 88354F362EE762BE00624775 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 88354F3D2EE762BE00624775; - remoteInfo = SmartAsyncImageDemo; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ 88354F3E2EE762BE00624775 /* SmartAsyncImageDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SmartAsyncImageDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 88354F4B2EE762BE00624775 /* SmartAsyncImageDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SmartAsyncImageDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ @@ -44,16 +33,6 @@ path = SmartAsyncImageDemo; sourceTree = ""; }; - 88354F4E2EE762BE00624775 /* SmartAsyncImageDemoTests */ = { - isa = PBXFileSystemSynchronizedRootGroup; - path = SmartAsyncImageDemoTests; - sourceTree = ""; - }; - 88354F582EE762BE00624775 /* SmartAsyncImageDemoUITests */ = { - isa = PBXFileSystemSynchronizedRootGroup; - path = SmartAsyncImageDemoUITests; - sourceTree = ""; - }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ @@ -65,13 +44,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 88354F482EE762BE00624775 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -79,8 +51,6 @@ isa = PBXGroup; children = ( 88354F402EE762BE00624775 /* SmartAsyncImageDemo */, - 88354F4E2EE762BE00624775 /* SmartAsyncImageDemoTests */, - 88354F582EE762BE00624775 /* SmartAsyncImageDemoUITests */, 88354F3F2EE762BE00624775 /* Products */, ); sourceTree = ""; @@ -89,7 +59,6 @@ isa = PBXGroup; children = ( 88354F3E2EE762BE00624775 /* SmartAsyncImageDemo.app */, - 88354F4B2EE762BE00624775 /* SmartAsyncImageDemoTests.xctest */, ); name = Products; sourceTree = ""; @@ -120,29 +89,6 @@ productReference = 88354F3E2EE762BE00624775 /* SmartAsyncImageDemo.app */; productType = "com.apple.product-type.application"; }; - 88354F4A2EE762BE00624775 /* SmartAsyncImageDemoTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 88354F622EE762BE00624775 /* Build configuration list for PBXNativeTarget "SmartAsyncImageDemoTests" */; - buildPhases = ( - 88354F472EE762BE00624775 /* Sources */, - 88354F482EE762BE00624775 /* Frameworks */, - 88354F492EE762BE00624775 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 88354F4D2EE762BE00624775 /* PBXTargetDependency */, - ); - fileSystemSynchronizedGroups = ( - 88354F4E2EE762BE00624775 /* SmartAsyncImageDemoTests */, - ); - name = SmartAsyncImageDemoTests; - packageProductDependencies = ( - ); - productName = SmartAsyncImageDemoTests; - productReference = 88354F4B2EE762BE00624775 /* SmartAsyncImageDemoTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -156,10 +102,6 @@ 88354F3D2EE762BE00624775 = { CreatedOnToolsVersion = 26.1; }; - 88354F4A2EE762BE00624775 = { - CreatedOnToolsVersion = 26.1; - TestTargetID = 88354F3D2EE762BE00624775; - }; }; }; buildConfigurationList = 88354F392EE762BE00624775 /* Build configuration list for PBXProject "SmartAsyncImageDemo" */; @@ -180,7 +122,6 @@ projectRoot = ""; targets = ( 88354F3D2EE762BE00624775 /* SmartAsyncImageDemo */, - 88354F4A2EE762BE00624775 /* SmartAsyncImageDemoTests */, ); }; /* End PBXProject section */ @@ -193,13 +134,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 88354F492EE762BE00624775 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -210,23 +144,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 88354F472EE762BE00624775 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 88354F4D2EE762BE00624775 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 88354F3D2EE762BE00624775 /* SmartAsyncImageDemo */; - targetProxy = 88354F4C2EE762BE00624775 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ 88354F5D2EE762BE00624775 /* Debug */ = { isa = XCBuildConfiguration; @@ -419,50 +338,6 @@ }; name = Release; }; - 88354F632EE762BE00624775 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = HGE6ZKLW3Q; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 26.1; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.jr.SmartAsyncImageDemoTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRING_CATALOG_GENERATE_SYMBOLS = NO; - SWIFT_APPROACHABLE_CONCURRENCY = YES; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SmartAsyncImageDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SmartAsyncImageDemo"; - }; - name = Debug; - }; - 88354F642EE762BE00624775 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = HGE6ZKLW3Q; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 26.1; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.jr.SmartAsyncImageDemoTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRING_CATALOG_GENERATE_SYMBOLS = NO; - SWIFT_APPROACHABLE_CONCURRENCY = YES; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SmartAsyncImageDemo.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SmartAsyncImageDemo"; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -484,15 +359,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 88354F622EE762BE00624775 /* Build configuration list for PBXNativeTarget "SmartAsyncImageDemoTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 88354F632EE762BE00624775 /* Debug */, - 88354F642EE762BE00624775 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ /* Begin XCLocalSwiftPackageReference section */ diff --git a/Demo/SmartAsyncImageDemo/SmartAsyncImageDemo.xcodeproj/xcshareddata/xcschemes/SmartAsyncImageDemo.xcscheme b/Demo/SmartAsyncImageDemo/SmartAsyncImageDemo.xcodeproj/xcshareddata/xcschemes/SmartAsyncImageDemo.xcscheme new file mode 100644 index 0000000..dd84f8f --- /dev/null +++ b/Demo/SmartAsyncImageDemo/SmartAsyncImageDemo.xcodeproj/xcshareddata/xcschemes/SmartAsyncImageDemo.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demo/SmartAsyncImageDemo/SmartAsyncImageDemoTests/SmartAsyncImageDemoTests.swift b/Demo/SmartAsyncImageDemo/SmartAsyncImageDemoTests/SmartAsyncImageDemoTests.swift deleted file mode 100644 index e079274..0000000 --- a/Demo/SmartAsyncImageDemo/SmartAsyncImageDemoTests/SmartAsyncImageDemoTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -//  Jonathan Ritchey - -import Testing -@testable import SmartAsyncImageDemo - -struct SmartAsyncImageDemoTests { - - @Test func example() async throws { - // Write your test here and use APIs like `#expect(...)` to check expected conditions. - } - -} diff --git a/Demo/SmartAsyncImageDemo/SmartAsyncImageDemoUITests/SmartAsyncImageDemoUITests.swift b/Demo/SmartAsyncImageDemo/SmartAsyncImageDemoUITests/SmartAsyncImageDemoUITests.swift deleted file mode 100644 index bfab809..0000000 --- a/Demo/SmartAsyncImageDemo/SmartAsyncImageDemoUITests/SmartAsyncImageDemoUITests.swift +++ /dev/null @@ -1,36 +0,0 @@ -//  Jonathan Ritchey - -import XCTest - -final class SmartAsyncImageDemoUITests: XCTestCase { - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - @MainActor - func testExample() throws { - // UI tests must launch the application that they test. - let app = XCUIApplication() - app.launch() - - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - @MainActor - func testLaunchPerformance() throws { - // This measures how long it takes to launch your application. - measure(metrics: [XCTApplicationLaunchMetric()]) { - XCUIApplication().launch() - } - } -} diff --git a/Demo/SmartAsyncImageDemo/SmartAsyncImageDemoUITests/SmartAsyncImageDemoUITestsLaunchTests.swift b/Demo/SmartAsyncImageDemo/SmartAsyncImageDemoUITests/SmartAsyncImageDemoUITestsLaunchTests.swift deleted file mode 100644 index b7d9fbb..0000000 --- a/Demo/SmartAsyncImageDemo/SmartAsyncImageDemoUITests/SmartAsyncImageDemoUITestsLaunchTests.swift +++ /dev/null @@ -1,28 +0,0 @@ -//  Jonathan Ritchey - -import XCTest - -final class SmartAsyncImageDemoUITestsLaunchTests: XCTestCase { - - override class var runsForEachTargetApplicationUIConfiguration: Bool { - true - } - - override func setUpWithError() throws { - continueAfterFailure = false - } - - @MainActor - func testLaunch() throws { - let app = XCUIApplication() - app.launch() - - // Insert steps here to perform after app launch but before taking a screenshot, - // such as logging into a test account or navigating somewhere in the app - - let attachment = XCTAttachment(screenshot: app.screenshot()) - attachment.name = "Launch Screen" - attachment.lifetime = .keepAlways - add(attachment) - } -} diff --git a/Tests/SmartAsyncImageTests/SmartAsyncImageTests.swift b/Tests/SmartAsyncImageTests/SmartAsyncImageTests.swift index c171479..442a82a 100644 --- a/Tests/SmartAsyncImageTests/SmartAsyncImageTests.swift +++ b/Tests/SmartAsyncImageTests/SmartAsyncImageTests.swift @@ -288,8 +288,8 @@ struct SmartAsyncImageMemoryCacheIntegrationTests { let (cache, _, folder) = createIsolatedCache() defer { cleanup(folder: folder) } - let count = await cache.inflightRequestCount - #expect(count == 0) + let inflightRequestCount = await cache.inflightRequestCount + #expect(inflightRequestCount == 0) } @Test("Disk cache persists image after memory cache clear")