Skip to content

Commit 5777f87

Browse files
committed
Merge pull request #625 from frootloops/repeat-start-tests
[tests] Add basic tests for Repeat struct
2 parents 1970f13 + c24ea27 commit 5777f87

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/1_stdlib/Repeat.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-run-simple-swift
2+
// REQUIRES: executable_test
3+
4+
import StdlibUnittest
5+
import Swift
6+
7+
let RepeatTests = TestSuite("Repeat")
8+
RepeatTests.test("Attributes") {
9+
let r = Repeat(count: 42, repeatedValue: "repeat")
10+
expectEqual(r.count, 42)
11+
expectEqual(r.startIndex, 0)
12+
expectEqual(r.endIndex, 42)
13+
expectEqual(r.repeatedValue, "repeat")
14+
}
15+
16+
runAllTests()

0 commit comments

Comments
 (0)