[Tests] Add a test for a not-a-zip file

This commit is contained in:
Timofey Solomko
2020-10-14 23:49:54 +03:00
parent ab75e0944f
commit 47655ccf70
+5
View File
@@ -10,6 +10,11 @@ class ZipTests: XCTestCase {
private static let testType: String = "zip"
func testBadFile_invalid() throws {
let testData = try Constants.data(forAnswer: "test6")
XCTAssertThrowsError(try ZipContainer.open(container: testData))
}
func testBigContainer() throws {
let testData = try Constants.data(forTest: "SWCompressionSourceCode", withType: ZipTests.testType)