From ceb4ef04ad5c854b7e140e01a89d2bce9c6766b5 Mon Sep 17 00:00:00 2001 From: AKosylo Date: Thu, 4 Jan 2024 11:11:15 +0100 Subject: [PATCH] enable calculation of codecoverage --- DXFeedFramework.xcodeproj/project.pbxproj | 2 ++ DXFeedFrameworkTests/DXFeedAllTests.xctestplan | 1 - DXFeedFrameworkTests/DXObservableSubscriptionTest.swift | 2 +- DXFeedFrameworkTests/DXTimeSeriesSubscriptionTest.swift | 6 ++++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/DXFeedFramework.xcodeproj/project.pbxproj b/DXFeedFramework.xcodeproj/project.pbxproj index 081deeab1..dfc29fa22 100644 --- a/DXFeedFramework.xcodeproj/project.pbxproj +++ b/DXFeedFramework.xcodeproj/project.pbxproj @@ -3406,6 +3406,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; + GCC_GENERATE_TEST_COVERAGE_FILES = NO; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.2; MACOSX_DEPLOYMENT_TARGET = 12.0; @@ -3427,6 +3428,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; + GCC_GENERATE_TEST_COVERAGE_FILES = NO; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.2; MACOSX_DEPLOYMENT_TARGET = 12.0; diff --git a/DXFeedFrameworkTests/DXFeedAllTests.xctestplan b/DXFeedFrameworkTests/DXFeedAllTests.xctestplan index 6b0e5215d..b22618f9f 100644 --- a/DXFeedFrameworkTests/DXFeedAllTests.xctestplan +++ b/DXFeedFrameworkTests/DXFeedAllTests.xctestplan @@ -13,7 +13,6 @@ "addressSanitizer" : { "enabled" : true }, - "codeCoverage" : false, "commandLineArgumentEntries" : [ ], diff --git a/DXFeedFrameworkTests/DXObservableSubscriptionTest.swift b/DXFeedFrameworkTests/DXObservableSubscriptionTest.swift index c80c43af7..efae6d20f 100644 --- a/DXFeedFrameworkTests/DXObservableSubscriptionTest.swift +++ b/DXFeedFrameworkTests/DXObservableSubscriptionTest.swift @@ -22,7 +22,7 @@ final class DXObservableSubscriptionTest: XCTestCase { symbols.forEach { symbol in if let sSymbol = symbol as? Symbol { if sSymbol.stringValue.hasSuffix(":TEST") { - var profile = Profile(sSymbol.stringValue) + let profile = Profile(sSymbol.stringValue) profile.descriptionStr = DXObservableSubscriptionTest.profileDescription events.append(profile) } diff --git a/DXFeedFrameworkTests/DXTimeSeriesSubscriptionTest.swift b/DXFeedFrameworkTests/DXTimeSeriesSubscriptionTest.swift index 5dbf5d3c1..4132790a4 100644 --- a/DXFeedFrameworkTests/DXTimeSeriesSubscriptionTest.swift +++ b/DXFeedFrameworkTests/DXTimeSeriesSubscriptionTest.swift @@ -18,6 +18,12 @@ final class DXTimeSeriesSubscriptionTest: XCTestCase { try createSubscriptionFor(multiple: true) } + func testCreateWithNil() throws { + XCTAssertThrowsError(try DXFeedTimeSeriesSubscription(native: nil, events: [.candle])) { error in + XCTAssertTrue(error is ArgumentException) + } + } + func createSubscriptionFor(multiple: Bool) throws { let endpoint = try DXEndpoint.create().connect("demo.dxfeed.com:7300") let feed = endpoint.getFeed()