Skip to content

Commit 80d27f6

Browse files
committed
Added some comments to testLargeSet() to explain some assertions.
1 parent 91efe3d commit 80d27f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

PlaygroundLogger/PlaygroundLoggerTests/LogEntryTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ class LogEntryTests: XCTestCase {
9292
}
9393

9494
XCTAssertEqual(name, "set")
95+
96+
// We expect `totalChildrenCount` to be 1000 because `set` has 1000 elements.
9597
XCTAssertEqual(totalChildrenCount, 1000)
98+
99+
// We expect `children.count` to be 101 due to the default logging policy, which encodes the first 80 and the last 20 children when there's more than 100 children, plus a gap in between to indicate what was elided.
96100
XCTAssertEqual(children.count, 101)
97101

98102
for (index, childEntry) in children.enumerated() {

0 commit comments

Comments
 (0)