-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from DataDog/ncreated/RUMM-486-run-tests-on-a…
…ll-supported-iOS-versions RUMM-486 Fix span encoding error on iOS versions prior to 13.0
- Loading branch information
Showing
8 changed files
with
114 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. | ||
* This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
* Copyright 2019-2020 Datadog, Inc. | ||
*/ | ||
|
||
@testable import Datadog | ||
|
||
extension EncodableValue: Equatable { | ||
public static func == (lhs: EncodableValue, rhs: EncodableValue) -> Bool { | ||
return String(describing: lhs) == String(describing: rhs) | ||
} | ||
} | ||
|
||
/// Prior to `iOS13.0`, the `JSONEncoder` supports only object or array as the root type. | ||
/// Hence we can't test encoding `Encodable` values directly and we need as support of this `EncodingContainer` container. | ||
/// | ||
/// Reference: https://bugs.swift.org/browse/SR-6163 | ||
struct EncodingContainer<Value: Encodable>: Encodable { | ||
let value: Value | ||
|
||
init(_ value: Value) { | ||
self.value = value | ||
} | ||
} |