Skip to content

Commit d06fadb

Browse files
committed
Add explanatory comments to the conditional HTMLParser imports
1 parent bd3eacc commit d06fadb

13 files changed

Lines changed: 16 additions & 0 deletions

Tests/AztecTests/Converters/AttributesToStringAttributes/BoldElementAttributeConverterTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import XCTest
22
@testable import Aztec
3+
// This test exercises sources from the Aztec target, but also uses internal APIs from HTMLParser.
4+
//
5+
// The HTMLParser target exists only when building for Swift package manager.
6+
// Otherwise, such as when building via CocoaPods, its sources are part of Aztec.
37
#if SWIFT_PACKAGE
48
@testable import HTMLParser
59
#endif

Tests/AztecTests/Converters/AttributesToStringAttributes/ItalicElementAttributeConverterTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import XCTest
22
@testable import Aztec
3+
// See comment in BoldElementToAttributeConverterTests.swift to understand the conditional import below.
34
#if SWIFT_PACKAGE
45
@testable import HTMLParser
56
#endif

Tests/AztecTests/Converters/AttributesToStringAttributes/UnderlineElementAttributeConverterTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import XCTest
22
@testable import Aztec
3+
// See comment in BoldElementToAttributeConverterTests.swift to understand the conditional import below.
34
#if SWIFT_PACKAGE
45
@testable import HTMLParser
56
#endif

Tests/AztecTests/Converters/StringAttributesToAttributes/BoldStringAttributeConverterTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import XCTest
22
@testable import Aztec
3+
// See comment in BoldElementToAttributeConverterTests.swift to understand the conditional import below.
34
#if SWIFT_PACKAGE
45
@testable import HTMLParser
56
#endif

Tests/AztecTests/Converters/StringAttributesToAttributes/ItalicStringAttributeConverterTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import XCTest
22
@testable import Aztec
3+
// See comment in BoldElementToAttributeConverterTests.swift to understand the conditional import below.
34
#if SWIFT_PACKAGE
45
@testable import HTMLParser
56
#endif

Tests/AztecTests/Importer/InAttributeConverterTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import XCTest
22
import libxml2
3+
// See comment in BoldElementToAttributeConverterTests.swift to understand the conditional import below.
34
#if SWIFT_PACKAGE
45
@testable import HTMLParser
56
#else

Tests/AztecTests/Importer/InNodeConverterTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import XCTest
22
import libxml2
3+
// See comment in BoldElementToAttributeConverterTests.swift to understand the conditional import below.
34
#if SWIFT_PACKAGE
45
@testable import HTMLParser
56
#else

Tests/AztecTests/NSAttributedString/Conversions/AttributedStringSerializerTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import XCTest
22
@testable import Aztec
3+
// See comment in BoldElementToAttributeConverterTests.swift to understand the conditional import below.
34
#if SWIFT_PACKAGE
45
@testable import HTMLParser
56
#endif

Tests/HTMLParserTests/HTML/Conversions/CSSParserTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import XCTest
2+
// See comment in BoldElementToAttributeConverterTests.swift to understand the conditional import below.
23
#if SWIFT_PACKAGE
34
@testable import HTMLParser
45
#else

Tests/HTMLParserTests/HTML/Conversions/DefaultHTMLSerializerTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import XCTest
2+
// See comment in BoldElementToAttributeConverterTests.swift to understand the conditional import below.
23
#if SWIFT_PACKAGE
34
@testable import HTMLParser
45
#else

0 commit comments

Comments
 (0)