Skip to content

Commit ea97712

Browse files
committed
Remove, rename, fix typos in unit tests
1 parent c79aee2 commit ea97712

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

Tests/BinaryKitTests/BinaryKitTests.swift

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ final class BinaryKitTests: XCTestCase {
111111

112112
// MARK: - Mixed Reading
113113

114-
func testReadBitReadByte() {
114+
func testMixedReadByte() {
115115
let bytes: [UInt8] = [0b1010_1101, 0b1010_1111]
116116
var bin = Binary(bytes: bytes)
117117

@@ -120,7 +120,7 @@ final class BinaryKitTests: XCTestCase {
120120
XCTAssertEqual(bin.readBitCursor, 9)
121121
}
122122

123-
func testReadBitReadBytes() {
123+
func testMixedReadBytes() {
124124
let bytes: [UInt8] = [0b1010_1101, 0b1010_1111, 0b1000_1101]
125125
var bin = Binary(bytes: bytes)
126126

@@ -129,7 +129,7 @@ final class BinaryKitTests: XCTestCase {
129129
XCTAssertEqual(bin.readBitCursor, 17)
130130
}
131131

132-
func testThrowsBeforeActualRead() {
132+
func testReadBytesThrowsBeforeReading() {
133133
let bytes: [UInt8] = [0b1010_1101, 0b1010_1111, 0b1000_1101]
134134
var bin = Binary(bytes: bytes)
135135

@@ -139,16 +139,7 @@ final class BinaryKitTests: XCTestCase {
139139
XCTAssertEqual(bin.readBitCursor, 1)
140140
}
141141

142-
func testThrowsBeforeAcutalRead1() {
143-
let bytes: [UInt8] = [0b1010_1101, 0b1010_1111, 0b1000_1101]
144-
var bin = Binary(bytes: bytes)
145-
146-
XCTAssertEqual(bin.readBitCursor, 0)
147-
XCTAssertThrowsError(try bin.readBytes(4))
148-
XCTAssertEqual(bin.readBitCursor, 0)
149-
}
150-
151-
func testThrowsBeforeAcutalRead2() {
142+
func testReadBitsThrowsBeforeReading() {
152143
let bytes: [UInt8] = [0b1010_1101, 0b1010_1111, 0b1000_1101]
153144
var bin = Binary(bytes: bytes)
154145

0 commit comments

Comments
 (0)