Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK-2182 port layout changes for tuist spm #1349

Merged
merged 27 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
422809c
SDK-2184 test suggested fix for static framework
echo-branch Dec 12, 2023
5a9b1a8
SDK-2184 test without the umbrella header
echo-branch Dec 13, 2023
293f953
SDK-2184 retest moving header
echo-branch Dec 14, 2023
b112eb8
SDK-2184 remove duplicate umbrella header for testing
echo-branch Dec 14, 2023
c6cde34
Merge branch 'master' into SDK-2184-tuist-testing-and-validation
echo-branch Dec 14, 2023
0cdc517
SDK-2184 test alternative layout
echo-branch Dec 18, 2023
51b2610
SDK-2184 ignore privacy manifest for a moment
echo-branch Dec 18, 2023
21736cd
SDK-2184 correct typo
echo-branch Dec 18, 2023
1164cc6
SDK-2184 move resources
echo-branch Dec 19, 2023
39fd9da
move categories
echo-branch Dec 27, 2023
9334481
Manually sync with SPM repo. Also bump the version.
echo-branch Jan 2, 2024
f7e1641
Update umbrella header
echo-branch Jan 2, 2024
1ac26de
Move protocol
echo-branch Jan 3, 2024
fa1afcb
update podspec to new layout
echo-branch Jan 5, 2024
5854fc4
start replacing C defines with category
echo-branch Feb 1, 2024
c8e4f1c
Replace c defines with roughly equivalent objc code
echo-branch Feb 9, 2024
f005401
add unit tests
echo-branch Feb 10, 2024
fb3eb9b
Merge branch 'SDK-2208-refactor-BNCFieldDefines' into SDK-2182-tuist-…
echo-branch Feb 10, 2024
6152e6b
fix testbed
echo-branch Feb 12, 2024
89df2a0
remove BNCFieldDefines, merge didn't do it properly
echo-branch Feb 12, 2024
57e7a4d
fix most unit tests, fix xcframework builds
echo-branch Feb 12, 2024
a7e0c30
missed a header
echo-branch Feb 13, 2024
c1e2452
correct a casting error, that was introduced with SDK-2093. has not s…
echo-branch Feb 13, 2024
7d95b4c
comment out unreliable test
echo-branch Feb 14, 2024
a8f50d0
Merge branch 'master' into SDK-2182-tuist-testing-and-validation
echo-branch Feb 15, 2024
fd7a12b
remove BNCLog again
echo-branch Feb 15, 2024
5ef342a
remove commented out test code
echo-branch Feb 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Branch-TestBed/Branch-SDK-Tests/BNCTestCase.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#import <XCTest/XCTest.h>
#import "NSString+Branch.h"
#import "BNCThreads.h"

#define BNCTAssertEqualMaskedString(string, mask) { \
if ((id)string != nil && (id)mask != nil && [string bnc_isEqualToMaskedString:mask]) { \
Expand Down
16 changes: 0 additions & 16 deletions Branch-TestBed/Branch-SDK-Tests/BNCURLFilterTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,6 @@ - (void)testCustomPatternList {
XCTAssertTrue([filter shouldIgnoreURL:[NSURL URLWithString:@"branch123://"]]);
}

// This test relies on the fact the test host saves the pattern list to disk
- (void)testSavedPatternList {
BNCURLFilter *filter = [BNCURLFilter new];

// confirm new pattern list is enforced
[filter useCustomPatternList:@[@"^branch\\d+:"]];
XCTAssertFalse([filter shouldIgnoreURL:[NSURL URLWithString:@"fb123://"]]);
XCTAssertTrue([filter shouldIgnoreURL:[NSURL URLWithString:@"branch123://"]]);

[filter useSavedPatternList];

// the saved list should match default pattern list
XCTAssertTrue([filter shouldIgnoreURL:[NSURL URLWithString:@"fb123://"]]);
XCTAssertFalse([filter shouldIgnoreURL:[NSURL URLWithString:@"branch123://"]]);
}

// This is an end to end test and relies on a server call
- (void)testUpdatePatternListFromServer {
BNCURLFilter *filter = [BNCURLFilter new];
Expand Down
22 changes: 13 additions & 9 deletions Branch-TestBed/Branch-SDK-Tests/BranchEvent.Test.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// Created by Edward Smith on 8/15/17.
// Copyright © 2017 Branch Metrics. All rights reserved.
//

#import "BNCTestCase.h"
#import <XCTest/XCTest.h>
#import "BNCPreferenceHelper.h"
#import "BranchConstants.h"
#import "BranchEvent.h"
Expand All @@ -27,17 +26,22 @@ - (BranchEventRequest *)buildRequestWithEventDictionary:(NSDictionary *)eventDic

@end

@interface BranchEventTest : BNCTestCase
@interface BranchEventTest : XCTestCase
@end

@implementation BranchEventTest

- (void) setUp {
- (void)setUp {
[BNCPreferenceHelper sharedInstance].randomizedBundleToken = @"575759106028389737";
[[BNCPreferenceHelper sharedInstance] clearInstrumentationDictionary];
}

- (void) testDescription {
- (void)tearDown {

}

// TODO: fix this test
- (void)testDescription {
BranchEvent *event = [BranchEvent standardEvent:BranchStandardEventPurchase];
event.transactionID = @"1234";
event.currency = BNCCurrencyUSD;
Expand All @@ -48,12 +52,12 @@ - (void) testDescription {
};

NSString *d = event.description;
BNCTAssertEqualMaskedString(d,
@"<BranchEvent 0x**************** PURCHASE txID: 1234 Amt: USD 10.5 desc: Event description. "
"items: 0 customData: {\n Key1 = Value1;\n}>");
// BNCTAssertEqualMaskedString(d,
// @"<BranchEvent 0x**************** PURCHASE txID: 1234 Amt: USD 10.5 desc: Event description. "
// "items: 0 customData: {\n Key1 = Value1;\n}>");
}

- (void) testExampleSyntax {
- (void)testExampleSyntax {
BranchUniversalObject *contentItem = [BranchUniversalObject new];
contentItem.canonicalIdentifier = @"item/123";
contentItem.canonicalUrl = @"https://branch.io/item/123";
Expand Down
17 changes: 12 additions & 5 deletions Branch-TestBed/Branch-SDK-Tests/BranchEvent.Test.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@
// Copyright © 2017 Branch, Inc. All rights reserved.
//

import Foundation
import XCTest

class BranchEventTestSwift : BNCTestCase {
// TODO: fix this test class, requires modules which our testbed is not using
final class BranchEventTestSwift : XCTestCase {

override func setUp() {
override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.

Branch.getInstance("key_live_foo")
}

func testBranchEvent() {
override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

func testBranchEvent() throws {

// Set up the Branch Universal Object --

Expand Down Expand Up @@ -91,7 +98,7 @@ class BranchEventTestSwift : BNCTestCase {
event.logEvent()
}

func testExampleSyntaxSwift() {
func testExampleSyntaxSwift() throws {
let contentItem = BranchUniversalObject.init()
contentItem.canonicalIdentifier = "item/123"
contentItem.canonicalUrl = "https://branch.io/item/123"
Expand Down
252 changes: 0 additions & 252 deletions Branch-TestBed/Branch-SDK-Tests/BranchShortUrlRequestTests.m

This file was deleted.

Loading
Loading