Skip to content

Commit e9c0b54

Browse files
Kyle-Yefranklinsch
authored andcommitted
Update test data to fit the swift-markdown
See swiftlang/swift-markdown#50
1 parent cc8e384 commit e9c0b54

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

Tests/SwiftDocCTests/Semantics/ChoiceTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Choice @1:1-9:2 isCorrect: true
233233
let expectedDump = """
234234
Choice @1:1-7:2 isCorrect: true
235235
├─ MarkupContainer (empty)
236-
├─ ImageMedia @2:4-2:11 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "blah.png")' altText: 'blah'
236+
├─ ImageMedia @2:4-2:39 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "blah.png")' altText: 'blah'
237237
└─ Justification @4:4-6:5
238238
└─ MarkupContainer (1 element)
239239
"""

Tests/SwiftDocCTests/Semantics/MetadataTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class MetadataTests: XCTestCase {
208208

209209
XCTAssertEqual(solution.summary, "Change the title")
210210
XCTAssertEqual(solution.replacements.count, 2)
211-
XCTAssertEqual(solution.replacements.first?.range, SourceLocation(line: 4, column: 4, source: nil) ..< SourceLocation(line: 4, column: 17, source: nil))
211+
XCTAssertEqual(solution.replacements.first?.range, SourceLocation(line: 4, column: 4, source: nil) ..< SourceLocation(line: 4, column: 31, source: nil))
212212
XCTAssertEqual(solution.replacements.first?.replacement, "")
213213

214214
XCTAssertEqual(solution.replacements.last?.range, SourceLocation(line: 1, column: 1, source: nil) ..< SourceLocation(line: 1, column: 16, source: nil))

Tests/SwiftDocCTests/Semantics/MultipleChoiceTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class MultipleChoiceTests: XCTestCase {
117117
let expectedDump = """
118118
MultipleChoice @1:1-24:2 title: 'SwiftDocC.MarkupContainer'
119119
├─ MarkupContainer (2 elements)
120-
├─ ImageMedia @10:3-10:10 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "blah.png")' altText: 'blah'
120+
├─ ImageMedia @10:3-10:38 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "blah.png")' altText: 'blah'
121121
├─ Choice @12:3-17:5 isCorrect: true
122122
│ ├─ MarkupContainer (1 element)
123123
│ └─ Justification @14:6-16:7

Tests/SwiftDocCTests/Semantics/TutorialArticleTests.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ TutorialArticle @1:1-23:2
168168
TutorialArticle @1:1-23:2 title: 'Basic Augmented Reality App' time: '20'
169169
├─ Intro @3:4-10:5 title: 'Basic Augmented Reality App'
170170
│ ├─ MarkupContainer (2 elements)
171-
│ └─ ImageMedia @9:7-9:14 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "myimage.png")' altText: 'image'
171+
│ └─ ImageMedia @9:7-9:46 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "myimage.png")' altText: 'image'
172172
└─ MarkupContainer (6 elements)
173173
"""
174174
XCTAssertEqual(expectedDump, article.dump())
@@ -281,29 +281,29 @@ TutorialArticle @1:1-23:2 title: 'Basic Augmented Reality App' time: '20'
281281
TutorialArticle @1:1-81:2
282282
├─ ContentAndMedia @3:4-12:5 mediaPosition: 'leading'
283283
│ ├─ MarkupContainer (2 elements)
284-
│ └─ ImageMedia @4:7-4:14 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "customize-text-view.png")' altText: 'alt'
284+
│ └─ ImageMedia @4:7-4:58 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "customize-text-view.png")' altText: 'alt'
285285
├─ ContentAndMedia @14:4-23:5 mediaPosition: 'trailing'
286286
│ ├─ MarkupContainer (2 elements)
287-
│ └─ ImageMedia @22:7-22:14 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "customize-text-view.png")' altText: 'alt'
287+
│ └─ ImageMedia @22:7-22:58 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "customize-text-view.png")' altText: 'alt'
288288
├─ MarkupContainer (1 element)
289289
├─ Stack @27:4-51:5
290290
│ ├─ ContentAndMedia @28:7-37:8 mediaPosition: 'trailing'
291291
│ │ ├─ MarkupContainer (2 elements)
292-
│ │ └─ ImageMedia @32:10-32:17 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-still-trailing.png")' altText: 'alt'
292+
│ │ └─ ImageMedia @32:10-32:64 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-still-trailing.png")' altText: 'alt'
293293
│ └─ ContentAndMedia @41:7-50:8 mediaPosition: 'trailing'
294294
│ ├─ MarkupContainer (2 elements)
295-
│ └─ ImageMedia @49:10-49:17 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-trailing.png")' altText: 'alt'
295+
│ └─ ImageMedia @49:10-49:58 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-trailing.png")' altText: 'alt'
296296
├─ MarkupContainer (3 elements)
297297
└─ Stack @61:4-80:5
298298
├─ ContentAndMedia @62:7-71:8 mediaPosition: 'trailing'
299299
│ ├─ MarkupContainer (2 elements)
300-
│ └─ ImageMedia @66:10-66:17 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-still-trailing.png")' altText: 'alt'
300+
│ └─ ImageMedia @66:10-66:64 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-still-trailing.png")' altText: 'alt'
301301
├─ ContentAndMedia @73:7-75:8 mediaPosition: 'leading'
302302
│ ├─ MarkupContainer (empty)
303-
│ └─ ImageMedia @74:10-74:17 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-leading.png")' altText: 'alt'
303+
│ └─ ImageMedia @74:10-74:57 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-leading.png")' altText: 'alt'
304304
└─ ContentAndMedia @77:7-79:8 mediaPosition: 'leading'
305305
├─ MarkupContainer (empty)
306-
└─ ImageMedia @78:10-78:17 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-leading.png")' altText: 'alt'
306+
└─ ImageMedia @78:10-78:57 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "this-is-leading.png")' altText: 'alt'
307307
"""
308308
XCTAssertEqual(expectedDump, article.dump())
309309
}
@@ -373,7 +373,7 @@ TutorialArticle @1:1-81:2
373373
TutorialArticle @1:1-42:2 title: 'Basic Augmented Reality App' time: '20'
374374
├─ Intro @2:4-7:5 title: 'Basic Augmented Reality App'
375375
│ ├─ MarkupContainer (1 element)
376-
│ └─ ImageMedia @6:7-6:14 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "myimage.png")' altText: 'image'
376+
│ └─ ImageMedia @6:7-6:46 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "myimage.png")' altText: 'image'
377377
├─ MarkupContainer (6 elements)
378378
└─ Assessments @21:4-41:5
379379
└─ MultipleChoice @22:7-40:8 title: 'SwiftDocC.MarkupContainer'

Tests/SwiftDocCTests/Semantics/TutorialTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,13 @@ class TutorialTests: XCTestCase {
208208
Tutorial @1:1-150:2 projectFiles: nil
209209
├─ Intro @3:4-6:5 title: 'Basic Augmented Reality App'
210210
│ ├─ MarkupContainer (empty)
211-
│ ├─ ImageMedia @5:7-5:14 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "myimage.png")' altText: 'image'
212-
│ └─ VideoMedia @4:7-4:14 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "test.mp4")' poster: 'Optional(SwiftDocC.ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "poster.png"))'
213-
├─ XcodeRequirement @2:4-2:22 title: 'Xcode X.Y Beta Z' destination: 'https://www.example.com/download'
211+
│ ├─ ImageMedia @5:7-5:46 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "myimage.png")' altText: 'image'
212+
│ └─ VideoMedia @4:7-4:51 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "test.mp4")' poster: 'Optional(SwiftDocC.ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "poster.png"))'
213+
├─ XcodeRequirement @2:4-2:97 title: 'Xcode X.Y Beta Z' destination: 'https://www.example.com/download'
214214
├─ TutorialSection @8:4-48:5
215215
│ ├─ ContentAndMedia @9:7-19:8 mediaPosition: 'trailing'
216216
│ │ ├─ MarkupContainer (3 elements)
217-
│ │ └─ ImageMedia @14:10-14:17 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "figure1.png")' altText: 'figure1'
217+
│ │ └─ ImageMedia @14:10-14:51 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "figure1.png")' altText: 'figure1'
218218
│ └─ Steps @21:7-47:8
219219
│ ├─ MarkupContainer (1 element)
220220
│ ├─ Step @25:10-31:11
@@ -229,11 +229,11 @@ Tutorial @1:1-150:2 projectFiles: nil
229229
│ └─ Step @42:10-46:11
230230
│ ├─ MarkupContainer (1 element)
231231
│ ├─ MarkupContainer (empty)
232-
│ └─ Code @45:13-45:19 fileReference: ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "othercode1.swift") fileName: 'OtherCode.swift' shouldResetDiff: false preview: nil
232+
│ └─ Code @45:13-45:65 fileReference: ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "othercode1.swift") fileName: 'OtherCode.swift' shouldResetDiff: false preview: nil
233233
├─ TutorialSection @50:4-77:5
234234
│ ├─ ContentAndMedia @51:7-58:8 mediaPosition: 'trailing'
235235
│ │ ├─ MarkupContainer (2 elements)
236-
│ │ └─ ImageMedia @57:10-57:17 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "xcode.png")' altText: 'xcode'
236+
│ │ └─ ImageMedia @57:10-57:47 source: 'ResourceReference(bundleIdentifier: "org.swift.docc.example", path: "xcode.png")' altText: 'xcode'
237237
│ └─ Steps @60:7-76:8
238238
│ ├─ MarkupContainer (1 element)
239239
│ ├─ Step @64:10-67:11

0 commit comments

Comments
 (0)