Skip to content

Commit 0ce78d9

Browse files
committed
Remove helper
1 parent 0715e95 commit 0ce78d9

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

Tests/SQLiteTests/Core/BlobTests.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ class BlobTests: XCTestCase {
1515

1616
func test_init_array() {
1717
let blob = Blob(bytes: [42, 42, 42])
18-
XCTAssertEqual(blob.byteArray, [42, 42, 42])
18+
XCTAssertEqual([UInt8](blob.data), [42, 42, 42])
1919
}
2020

2121
func test_init_unsafeRawPointer() {
2222
let pointer = UnsafeMutablePointer<UInt8>.allocate(capacity: 3)
2323
pointer.initialize(repeating: 42, count: 3)
2424
let blob = Blob(bytes: pointer, length: 3)
25-
XCTAssertEqual(blob.byteArray, [42, 42, 42])
25+
XCTAssertEqual([UInt8](blob.data), [42, 42, 42])
2626
}
2727

2828
func test_equality() {
@@ -35,9 +35,3 @@ class BlobTests: XCTestCase {
3535
XCTAssertNotEqual(blob1, blob3)
3636
}
3737
}
38-
39-
extension Blob {
40-
var byteArray: [UInt8] {
41-
[UInt8](data)
42-
}
43-
}

Tests/SQLiteTests/Core/StatementTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class StatementTests: SQLiteTestCase {
3131
try db.run(blobs.create { $0.column(blobColumn) })
3232
try db.run(blobs.insert(blobColumn <- Blob(bytes: [])))
3333
let blobValue = try db.scalar(blobs.select(blobColumn).limit(1, offset: 0))
34-
XCTAssertEqual([], blobValue.byteArray)
34+
XCTAssertEqual([], [UInt8](blobValue.data))
3535
}
3636

3737
func test_prepareRowIterator() throws {
@@ -71,5 +71,4 @@ class StatementTests: SQLiteTestCase {
7171
// truncate succeeds
7272
try db.run("DROP TABLE users")
7373
}
74-
7574
}

Tests/SQLiteTests/FoundationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class FoundationTests: XCTestCase {
55
func testDataFromBlob() {
66
let data = Data([1, 2, 3])
77
let blob = data.datatypeValue
8-
XCTAssertEqual([1, 2, 3], blob.byteArray)
8+
XCTAssertEqual([1, 2, 3], [UInt8](blob.data))
99
}
1010

1111
func testBlobToData() {

0 commit comments

Comments
 (0)