mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
33 lines
1.1 KiB
Swift
33 lines
1.1 KiB
Swift
// Copyright (c) 2017 Timofey Solomko
|
|
// Licensed under MIT License
|
|
//
|
|
// See LICENSE for license information
|
|
|
|
import Foundation
|
|
|
|
struct Constants {
|
|
|
|
/* Contents of test files:
|
|
- test1: text file with "Hello, World!\n".
|
|
- test2: text file with copyright free song lyrics from http://www.freesonglyrics.co.uk/lyrics13.html
|
|
- test3: text file with random string from https://www.random.org/strings/
|
|
- test4: text file with string "I'm a tester" repeated several times.
|
|
- test5: empty file.
|
|
- test6: file with size of 5MB containing nulls from /dev/null.
|
|
- test7: file with size of 5MB containing random bytes from /dev/urandom.
|
|
- test8: text file from lzma_specification.
|
|
- test9: file with size of 10KB containing random bytes from /dev/urandom.
|
|
*/
|
|
|
|
static func url(forTest name: String, withType ext: String) -> URL? {
|
|
return testBundle.url(forResource: name, withExtension: ext)
|
|
}
|
|
|
|
static func url(forAnswer name: String) -> URL? {
|
|
return testBundle.url(forResource: name, withExtension: "answer")
|
|
}
|
|
|
|
static let testBundle: Bundle = Bundle(for: DeflateTests.self)
|
|
|
|
}
|