Skip to content

Commit ee3ddfc

Browse files
committed
Added heuristics parsing
1 parent 04fc4f9 commit ee3ddfc

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

Tests/TracebackTests/AdditionalTests.swift

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,27 @@ func testPostInstallLinkSearchResponseMatchTypes() throws {
108108
)
109109
#expect(noneResponse.matchType == TracebackSDK.MatchType.none)
110110

111-
// Test ambiguous match type
111+
// Test heuristics match type
112112
let ambiguousResponse = PostInstallLinkSearchResponse(
113113
deep_link_id: URL(string: "https://example.com/default"),
114114
match_message: "Ambiguous match",
115+
match_type: "heuristics",
116+
request_ip_version: "ipv4",
117+
utm_medium: nil,
118+
utm_source: nil
119+
)
120+
#expect(ambiguousResponse.matchType == TracebackSDK.MatchType.heuristics)
121+
122+
// Test ambiguous match type
123+
let heuristicsResponse = PostInstallLinkSearchResponse(
124+
deep_link_id: URL(string: "https://example.com/default"),
125+
match_message: "Heuristics match",
115126
match_type: "ambiguous",
116127
request_ip_version: "ipv4",
117128
utm_medium: nil,
118129
utm_source: nil
119130
)
120-
#expect(ambiguousResponse.matchType == TracebackSDK.MatchType.default)
131+
#expect(heuristicsResponse.matchType == TracebackSDK.MatchType.ambiguous)
121132

122133
// Test unknown match type
123134
let unknownResponse = PostInstallLinkSearchResponse(

0 commit comments

Comments
 (0)