mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
Reorganized tests so deflate algorithm is now tested only one time.
This commit is contained in:
@@ -38,21 +38,6 @@
|
||||
065569771DC65C2B00A47E66 /* ZlibArchive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 064492581DC606D400F10981 /* ZlibArchive.swift */; };
|
||||
065569781DC65C2B00A47E66 /* Deflate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 061FCE251DBCC4BE0052F7BE /* Deflate.swift */; };
|
||||
0661F06F1DC92391006C3D35 /* PerformanceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0661F06E1DC92391006C3D35 /* PerformanceTests.swift */; };
|
||||
0662047C1DD9840000353639 /* test1.answer in Resources */ = {isa = PBXBuildFile; fileRef = 0662046D1DD983FF00353639 /* test1.answer */; };
|
||||
0662047D1DD9840000353639 /* test2.answer in Resources */ = {isa = PBXBuildFile; fileRef = 0662046E1DD983FF00353639 /* test2.answer */; };
|
||||
0662047E1DD9840000353639 /* test3.answer in Resources */ = {isa = PBXBuildFile; fileRef = 0662046F1DD9840000353639 /* test3.answer */; };
|
||||
0662047F1DD9840000353639 /* test4.answer in Resources */ = {isa = PBXBuildFile; fileRef = 066204701DD9840000353639 /* test4.answer */; };
|
||||
066204801DD9840000353639 /* test5.answer in Resources */ = {isa = PBXBuildFile; fileRef = 066204711DD9840000353639 /* test5.answer */; };
|
||||
066204811DD9840000353639 /* test1.gz in Resources */ = {isa = PBXBuildFile; fileRef = 066204741DD9840000353639 /* test1.gz */; };
|
||||
066204821DD9840000353639 /* test4.gz in Resources */ = {isa = PBXBuildFile; fileRef = 066204751DD9840000353639 /* test4.gz */; };
|
||||
066204831DD9840000353639 /* test5.gz in Resources */ = {isa = PBXBuildFile; fileRef = 066204761DD9840000353639 /* test5.gz */; };
|
||||
066204841DD9840000353639 /* performance_test1.gz in Resources */ = {isa = PBXBuildFile; fileRef = 066204771DD9840000353639 /* performance_test1.gz */; };
|
||||
066204851DD9840000353639 /* test1.zlib in Resources */ = {isa = PBXBuildFile; fileRef = 066204791DD9840000353639 /* test1.zlib */; };
|
||||
0680E1A41DDA2C5B005C05EB /* test4.zlib in Resources */ = {isa = PBXBuildFile; fileRef = 0680E1A21DDA2C5B005C05EB /* test4.zlib */; };
|
||||
0680E1A51DDA2C5B005C05EB /* test5.zlib in Resources */ = {isa = PBXBuildFile; fileRef = 0680E1A31DDA2C5B005C05EB /* test5.zlib */; };
|
||||
0680E1AB1DDA2C90005C05EB /* test1.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 0680E1A61DDA2C90005C05EB /* test1.bz2 */; };
|
||||
0680E1AE1DDA2C90005C05EB /* test4.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 0680E1A91DDA2C90005C05EB /* test4.bz2 */; };
|
||||
0680E1AF1DDA2C90005C05EB /* test5.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 0680E1AA1DDA2C90005C05EB /* test5.bz2 */; };
|
||||
0680E1B11DDA2D7C005C05EB /* ZlibTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0680E1B01DDA2D7C005C05EB /* ZlibTests.swift */; };
|
||||
0680E1B31DDA3D0A005C05EB /* GzipTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0680E1B21DDA3D0A005C05EB /* GzipTests.swift */; };
|
||||
0680E1B51DDA4076005C05EB /* Bzip2Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0680E1B41DDA4075005C05EB /* Bzip2Tests.swift */; };
|
||||
@@ -64,21 +49,38 @@
|
||||
06A393441DE0713300182E12 /* SWCompression.h in Headers */ = {isa = PBXBuildFile; fileRef = 06A393421DE070B500182E12 /* SWCompression.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
06A393451DE0713A00182E12 /* SWCompression.h in Headers */ = {isa = PBXBuildFile; fileRef = 06A393421DE070B500182E12 /* SWCompression.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
06A393461DE0714000182E12 /* SWCompression.h in Headers */ = {isa = PBXBuildFile; fileRef = 06A393421DE070B500182E12 /* SWCompression.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
06ACA6E11DDB95D500451A5C /* test2.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6DF1DDB95D500451A5C /* test2.gz */; };
|
||||
06ACA6E21DDB95D500451A5C /* test3.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6E01DDB95D500451A5C /* test3.gz */; };
|
||||
06ACA6E51DDB960200451A5C /* test2.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6E31DDB960200451A5C /* test2.bz2 */; };
|
||||
06ACA6E61DDB960200451A5C /* test3.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6E41DDB960200451A5C /* test3.bz2 */; };
|
||||
06ACA6E91DDB966900451A5C /* test2.zlib in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6E71DDB966900451A5C /* test2.zlib */; };
|
||||
06ACA6EA1DDB966900451A5C /* test3.zlib in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6E81DDB966900451A5C /* test3.zlib */; };
|
||||
06ACA6EC1DDB974100451A5C /* test6.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6EB1DDB974100451A5C /* test6.bz2 */; };
|
||||
06ACA6EE1DDB974D00451A5C /* test6.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6ED1DDB974D00451A5C /* test6.gz */; };
|
||||
06ACA6F01DDB975600451A5C /* test6.answer in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6EF1DDB975600451A5C /* test6.answer */; };
|
||||
06ACA6F21DDB976C00451A5C /* test6.zlib in Resources */ = {isa = PBXBuildFile; fileRef = 06ACA6F11DDB976C00451A5C /* test6.zlib */; };
|
||||
06BE1AD21DB410F100EE0F59 /* SWCompression.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 06BE1AC81DB410F100EE0F59 /* SWCompression.framework */; };
|
||||
06F463581DE082E70072CC2B /* test7.answer in Resources */ = {isa = PBXBuildFile; fileRef = 06F463571DE082E70072CC2B /* test7.answer */; };
|
||||
06F4635A1DE082F40072CC2B /* test7.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06F463591DE082F40072CC2B /* test7.bz2 */; };
|
||||
06F4635C1DE082FE0072CC2B /* test7.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06F4635B1DE082FE0072CC2B /* test7.gz */; };
|
||||
06F4635E1DE083170072CC2B /* test7.zlib in Resources */ = {isa = PBXBuildFile; fileRef = 06F4635D1DE083170072CC2B /* test7.zlib */; };
|
||||
06CC18601DE35269003532F5 /* test1.answer in Resources */ = {isa = PBXBuildFile; fileRef = 06CC183F1DE35269003532F5 /* test1.answer */; };
|
||||
06CC18611DE35269003532F5 /* test2.answer in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18401DE35269003532F5 /* test2.answer */; };
|
||||
06CC18621DE35269003532F5 /* test3.answer in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18411DE35269003532F5 /* test3.answer */; };
|
||||
06CC18631DE35269003532F5 /* test4.answer in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18421DE35269003532F5 /* test4.answer */; };
|
||||
06CC18641DE35269003532F5 /* test5.answer in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18431DE35269003532F5 /* test5.answer */; };
|
||||
06CC18651DE35269003532F5 /* test6.answer in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18441DE35269003532F5 /* test6.answer */; };
|
||||
06CC18661DE35269003532F5 /* test7.answer in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18451DE35269003532F5 /* test7.answer */; };
|
||||
06CC18671DE35269003532F5 /* test1.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18471DE35269003532F5 /* test1.bz2 */; };
|
||||
06CC18681DE35269003532F5 /* test2.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18481DE35269003532F5 /* test2.bz2 */; };
|
||||
06CC18691DE35269003532F5 /* test3.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18491DE35269003532F5 /* test3.bz2 */; };
|
||||
06CC186A1DE35269003532F5 /* test4.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06CC184A1DE35269003532F5 /* test4.bz2 */; };
|
||||
06CC186B1DE35269003532F5 /* test5.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06CC184B1DE35269003532F5 /* test5.bz2 */; };
|
||||
06CC186C1DE35269003532F5 /* test6.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06CC184C1DE35269003532F5 /* test6.bz2 */; };
|
||||
06CC186D1DE35269003532F5 /* test7.bz2 in Resources */ = {isa = PBXBuildFile; fileRef = 06CC184D1DE35269003532F5 /* test7.bz2 */; };
|
||||
06CC186E1DE35269003532F5 /* test1.deflate in Resources */ = {isa = PBXBuildFile; fileRef = 06CC184F1DE35269003532F5 /* test1.deflate */; };
|
||||
06CC186F1DE35269003532F5 /* test2.deflate in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18501DE35269003532F5 /* test2.deflate */; };
|
||||
06CC18701DE35269003532F5 /* test3.deflate in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18511DE35269003532F5 /* test3.deflate */; };
|
||||
06CC18711DE35269003532F5 /* test4.deflate in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18521DE35269003532F5 /* test4.deflate */; };
|
||||
06CC18721DE35269003532F5 /* test5.deflate in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18531DE35269003532F5 /* test5.deflate */; };
|
||||
06CC18731DE35269003532F5 /* test6.deflate in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18541DE35269003532F5 /* test6.deflate */; };
|
||||
06CC18741DE35269003532F5 /* test7.deflate in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18551DE35269003532F5 /* test7.deflate */; };
|
||||
06CC18751DE35269003532F5 /* test1.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18571DE35269003532F5 /* test1.gz */; };
|
||||
06CC18761DE35269003532F5 /* test2.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18581DE35269003532F5 /* test2.gz */; };
|
||||
06CC18771DE35269003532F5 /* test3.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06CC18591DE35269003532F5 /* test3.gz */; };
|
||||
06CC18781DE35269003532F5 /* test4.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06CC185A1DE35269003532F5 /* test4.gz */; };
|
||||
06CC18791DE35269003532F5 /* test5.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06CC185B1DE35269003532F5 /* test5.gz */; };
|
||||
06CC187A1DE35269003532F5 /* test6.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06CC185C1DE35269003532F5 /* test6.gz */; };
|
||||
06CC187B1DE35269003532F5 /* test7.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06CC185D1DE35269003532F5 /* test7.gz */; };
|
||||
06CC187C1DE35269003532F5 /* performance_test1.gz in Resources */ = {isa = PBXBuildFile; fileRef = 06CC185E1DE35269003532F5 /* performance_test1.gz */; };
|
||||
06CC187D1DE35269003532F5 /* test.zlib in Resources */ = {isa = PBXBuildFile; fileRef = 06CC185F1DE35269003532F5 /* test.zlib */; };
|
||||
06CC187F1DE35607003532F5 /* DeflateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06CC187E1DE35607003532F5 /* DeflateTests.swift */; };
|
||||
06FED40D1DD7717E0013DFB2 /* BZip2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06FED40B1DD7717E0013DFB2 /* BZip2.swift */; };
|
||||
06FED40E1DD7717E0013DFB2 /* BZip2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06FED40B1DD7717E0013DFB2 /* BZip2.swift */; };
|
||||
06FED40F1DD7717E0013DFB2 /* BZip2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06FED40B1DD7717E0013DFB2 /* BZip2.swift */; };
|
||||
@@ -108,21 +110,6 @@
|
||||
0655694C1DC65A8000A47E66 /* SWCompression.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SWCompression.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
065569591DC65A9400A47E66 /* SWCompression.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SWCompression.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0661F06E1DC92391006C3D35 /* PerformanceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PerformanceTests.swift; sourceTree = "<group>"; };
|
||||
0662046D1DD983FF00353639 /* test1.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test1.answer; sourceTree = "<group>"; };
|
||||
0662046E1DD983FF00353639 /* test2.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test2.answer; sourceTree = "<group>"; };
|
||||
0662046F1DD9840000353639 /* test3.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test3.answer; sourceTree = "<group>"; };
|
||||
066204701DD9840000353639 /* test4.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test4.answer; sourceTree = "<group>"; };
|
||||
066204711DD9840000353639 /* test5.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test5.answer; sourceTree = "<group>"; };
|
||||
066204741DD9840000353639 /* test1.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test1.gz; sourceTree = "<group>"; };
|
||||
066204751DD9840000353639 /* test4.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test4.gz; sourceTree = "<group>"; };
|
||||
066204761DD9840000353639 /* test5.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test5.gz; sourceTree = "<group>"; };
|
||||
066204771DD9840000353639 /* performance_test1.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = performance_test1.gz; sourceTree = "<group>"; };
|
||||
066204791DD9840000353639 /* test1.zlib */ = {isa = PBXFileReference; lastKnownFileType = file; path = test1.zlib; sourceTree = "<group>"; };
|
||||
0680E1A21DDA2C5B005C05EB /* test4.zlib */ = {isa = PBXFileReference; lastKnownFileType = file; path = test4.zlib; sourceTree = "<group>"; };
|
||||
0680E1A31DDA2C5B005C05EB /* test5.zlib */ = {isa = PBXFileReference; lastKnownFileType = file; path = test5.zlib; sourceTree = "<group>"; };
|
||||
0680E1A61DDA2C90005C05EB /* test1.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test1.bz2; sourceTree = "<group>"; };
|
||||
0680E1A91DDA2C90005C05EB /* test4.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test4.bz2; sourceTree = "<group>"; };
|
||||
0680E1AA1DDA2C90005C05EB /* test5.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test5.bz2; sourceTree = "<group>"; };
|
||||
0680E1B01DDA2D7C005C05EB /* ZlibTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZlibTests.swift; sourceTree = "<group>"; };
|
||||
0680E1B21DDA3D0A005C05EB /* GzipTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GzipTests.swift; sourceTree = "<group>"; };
|
||||
0680E1B41DDA4075005C05EB /* Bzip2Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bzip2Tests.swift; sourceTree = "<group>"; };
|
||||
@@ -131,23 +118,40 @@
|
||||
06A393401DE070B500182E12 /* Info-watchOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-watchOS.plist"; sourceTree = "<group>"; };
|
||||
06A393411DE070B500182E12 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
06A393421DE070B500182E12 /* SWCompression.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SWCompression.h; sourceTree = "<group>"; };
|
||||
06ACA6DF1DDB95D500451A5C /* test2.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test2.gz; sourceTree = "<group>"; };
|
||||
06ACA6E01DDB95D500451A5C /* test3.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test3.gz; sourceTree = "<group>"; };
|
||||
06ACA6E31DDB960200451A5C /* test2.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test2.bz2; sourceTree = "<group>"; };
|
||||
06ACA6E41DDB960200451A5C /* test3.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test3.bz2; sourceTree = "<group>"; };
|
||||
06ACA6E71DDB966900451A5C /* test2.zlib */ = {isa = PBXFileReference; lastKnownFileType = file; path = test2.zlib; sourceTree = "<group>"; };
|
||||
06ACA6E81DDB966900451A5C /* test3.zlib */ = {isa = PBXFileReference; lastKnownFileType = file; path = test3.zlib; sourceTree = "<group>"; };
|
||||
06ACA6EB1DDB974100451A5C /* test6.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test6.bz2; sourceTree = "<group>"; };
|
||||
06ACA6ED1DDB974D00451A5C /* test6.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test6.gz; sourceTree = "<group>"; };
|
||||
06ACA6EF1DDB975600451A5C /* test6.answer */ = {isa = PBXFileReference; lastKnownFileType = file; path = test6.answer; sourceTree = "<group>"; };
|
||||
06ACA6F11DDB976C00451A5C /* test6.zlib */ = {isa = PBXFileReference; lastKnownFileType = file; path = test6.zlib; sourceTree = "<group>"; };
|
||||
06BE1AC81DB410F100EE0F59 /* SWCompression.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SWCompression.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
06BE1AD11DB410F100EE0F59 /* SWCompressionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SWCompressionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
06BE1AD81DB410F100EE0F59 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
06F463571DE082E70072CC2B /* test7.answer */ = {isa = PBXFileReference; lastKnownFileType = file; path = test7.answer; sourceTree = "<group>"; };
|
||||
06F463591DE082F40072CC2B /* test7.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test7.bz2; sourceTree = "<group>"; };
|
||||
06F4635B1DE082FE0072CC2B /* test7.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test7.gz; sourceTree = "<group>"; };
|
||||
06F4635D1DE083170072CC2B /* test7.zlib */ = {isa = PBXFileReference; lastKnownFileType = file; path = test7.zlib; sourceTree = "<group>"; };
|
||||
06CC183F1DE35269003532F5 /* test1.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test1.answer; sourceTree = "<group>"; };
|
||||
06CC18401DE35269003532F5 /* test2.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test2.answer; sourceTree = "<group>"; };
|
||||
06CC18411DE35269003532F5 /* test3.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test3.answer; sourceTree = "<group>"; };
|
||||
06CC18421DE35269003532F5 /* test4.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test4.answer; sourceTree = "<group>"; };
|
||||
06CC18431DE35269003532F5 /* test5.answer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test5.answer; sourceTree = "<group>"; };
|
||||
06CC18441DE35269003532F5 /* test6.answer */ = {isa = PBXFileReference; lastKnownFileType = file; path = test6.answer; sourceTree = "<group>"; };
|
||||
06CC18451DE35269003532F5 /* test7.answer */ = {isa = PBXFileReference; lastKnownFileType = file; path = test7.answer; sourceTree = "<group>"; };
|
||||
06CC18471DE35269003532F5 /* test1.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test1.bz2; sourceTree = "<group>"; };
|
||||
06CC18481DE35269003532F5 /* test2.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test2.bz2; sourceTree = "<group>"; };
|
||||
06CC18491DE35269003532F5 /* test3.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test3.bz2; sourceTree = "<group>"; };
|
||||
06CC184A1DE35269003532F5 /* test4.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test4.bz2; sourceTree = "<group>"; };
|
||||
06CC184B1DE35269003532F5 /* test5.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test5.bz2; sourceTree = "<group>"; };
|
||||
06CC184C1DE35269003532F5 /* test6.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test6.bz2; sourceTree = "<group>"; };
|
||||
06CC184D1DE35269003532F5 /* test7.bz2 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test7.bz2; sourceTree = "<group>"; };
|
||||
06CC184F1DE35269003532F5 /* test1.deflate */ = {isa = PBXFileReference; lastKnownFileType = file; path = test1.deflate; sourceTree = "<group>"; };
|
||||
06CC18501DE35269003532F5 /* test2.deflate */ = {isa = PBXFileReference; lastKnownFileType = file; path = test2.deflate; sourceTree = "<group>"; };
|
||||
06CC18511DE35269003532F5 /* test3.deflate */ = {isa = PBXFileReference; lastKnownFileType = file; path = test3.deflate; sourceTree = "<group>"; };
|
||||
06CC18521DE35269003532F5 /* test4.deflate */ = {isa = PBXFileReference; lastKnownFileType = file; path = test4.deflate; sourceTree = "<group>"; };
|
||||
06CC18531DE35269003532F5 /* test5.deflate */ = {isa = PBXFileReference; lastKnownFileType = file; path = test5.deflate; sourceTree = "<group>"; };
|
||||
06CC18541DE35269003532F5 /* test6.deflate */ = {isa = PBXFileReference; lastKnownFileType = file; path = test6.deflate; sourceTree = "<group>"; };
|
||||
06CC18551DE35269003532F5 /* test7.deflate */ = {isa = PBXFileReference; lastKnownFileType = file; path = test7.deflate; sourceTree = "<group>"; };
|
||||
06CC18571DE35269003532F5 /* test1.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test1.gz; sourceTree = "<group>"; };
|
||||
06CC18581DE35269003532F5 /* test2.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test2.gz; sourceTree = "<group>"; };
|
||||
06CC18591DE35269003532F5 /* test3.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test3.gz; sourceTree = "<group>"; };
|
||||
06CC185A1DE35269003532F5 /* test4.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test4.gz; sourceTree = "<group>"; };
|
||||
06CC185B1DE35269003532F5 /* test5.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test5.gz; sourceTree = "<group>"; };
|
||||
06CC185C1DE35269003532F5 /* test6.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test6.gz; sourceTree = "<group>"; };
|
||||
06CC185D1DE35269003532F5 /* test7.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test7.gz; sourceTree = "<group>"; };
|
||||
06CC185E1DE35269003532F5 /* performance_test1.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = performance_test1.gz; sourceTree = "<group>"; };
|
||||
06CC185F1DE35269003532F5 /* test.zlib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = test.zlib; sourceTree = "<group>"; };
|
||||
06CC187E1DE35607003532F5 /* DeflateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeflateTests.swift; sourceTree = "<group>"; };
|
||||
06FED40B1DD7717E0013DFB2 /* BZip2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BZip2.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -191,74 +195,6 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
0662046B1DD983FF00353639 /* Test Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
066204771DD9840000353639 /* performance_test1.gz */,
|
||||
0662046C1DD983FF00353639 /* Answers */,
|
||||
066204721DD9840000353639 /* BZip2 */,
|
||||
066204731DD9840000353639 /* GZip */,
|
||||
066204781DD9840000353639 /* Zlib */,
|
||||
);
|
||||
path = "Test Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
0662046C1DD983FF00353639 /* Answers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0662046D1DD983FF00353639 /* test1.answer */,
|
||||
0662046E1DD983FF00353639 /* test2.answer */,
|
||||
0662046F1DD9840000353639 /* test3.answer */,
|
||||
066204701DD9840000353639 /* test4.answer */,
|
||||
066204711DD9840000353639 /* test5.answer */,
|
||||
06ACA6EF1DDB975600451A5C /* test6.answer */,
|
||||
06F463571DE082E70072CC2B /* test7.answer */,
|
||||
);
|
||||
path = Answers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
066204721DD9840000353639 /* BZip2 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0680E1A61DDA2C90005C05EB /* test1.bz2 */,
|
||||
06ACA6E31DDB960200451A5C /* test2.bz2 */,
|
||||
06ACA6E41DDB960200451A5C /* test3.bz2 */,
|
||||
0680E1A91DDA2C90005C05EB /* test4.bz2 */,
|
||||
0680E1AA1DDA2C90005C05EB /* test5.bz2 */,
|
||||
06ACA6EB1DDB974100451A5C /* test6.bz2 */,
|
||||
06F463591DE082F40072CC2B /* test7.bz2 */,
|
||||
);
|
||||
path = BZip2;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
066204731DD9840000353639 /* GZip */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
066204741DD9840000353639 /* test1.gz */,
|
||||
06ACA6DF1DDB95D500451A5C /* test2.gz */,
|
||||
06ACA6E01DDB95D500451A5C /* test3.gz */,
|
||||
066204751DD9840000353639 /* test4.gz */,
|
||||
066204761DD9840000353639 /* test5.gz */,
|
||||
06ACA6ED1DDB974D00451A5C /* test6.gz */,
|
||||
06F4635B1DE082FE0072CC2B /* test7.gz */,
|
||||
);
|
||||
path = GZip;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
066204781DD9840000353639 /* Zlib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
066204791DD9840000353639 /* test1.zlib */,
|
||||
06ACA6E71DDB966900451A5C /* test2.zlib */,
|
||||
06ACA6E81DDB966900451A5C /* test3.zlib */,
|
||||
0680E1A21DDA2C5B005C05EB /* test4.zlib */,
|
||||
0680E1A31DDA2C5B005C05EB /* test5.zlib */,
|
||||
06ACA6F11DDB976C00451A5C /* test6.zlib */,
|
||||
06F4635D1DE083170072CC2B /* test7.zlib */,
|
||||
);
|
||||
path = Zlib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
06A3931F1DE06FFE00182E12 /* Common */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -320,10 +256,11 @@
|
||||
06BE1AD51DB410F100EE0F59 /* Tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0662046B1DD983FF00353639 /* Test Files */,
|
||||
0680E1B01DDA2D7C005C05EB /* ZlibTests.swift */,
|
||||
0680E1B21DDA3D0A005C05EB /* GzipTests.swift */,
|
||||
06CC183D1DE35269003532F5 /* Test Files */,
|
||||
0680E1B41DDA4075005C05EB /* Bzip2Tests.swift */,
|
||||
06CC187E1DE35607003532F5 /* DeflateTests.swift */,
|
||||
0680E1B21DDA3D0A005C05EB /* GzipTests.swift */,
|
||||
0680E1B01DDA2D7C005C05EB /* ZlibTests.swift */,
|
||||
061FCE2C1DBCC6A30052F7BE /* Constants.swift */,
|
||||
0661F06E1DC92391006C3D35 /* PerformanceTests.swift */,
|
||||
06BE1AD81DB410F100EE0F59 /* Info.plist */,
|
||||
@@ -331,6 +268,75 @@
|
||||
path = Tests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
06CC183D1DE35269003532F5 /* Test Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
06CC183E1DE35269003532F5 /* Answers */,
|
||||
06CC18461DE35269003532F5 /* BZip2 */,
|
||||
06CC184E1DE35269003532F5 /* Deflate */,
|
||||
06CC18561DE35269003532F5 /* GZip */,
|
||||
06CC185E1DE35269003532F5 /* performance_test1.gz */,
|
||||
06CC185F1DE35269003532F5 /* test.zlib */,
|
||||
);
|
||||
path = "Test Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
06CC183E1DE35269003532F5 /* Answers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
06CC183F1DE35269003532F5 /* test1.answer */,
|
||||
06CC18401DE35269003532F5 /* test2.answer */,
|
||||
06CC18411DE35269003532F5 /* test3.answer */,
|
||||
06CC18421DE35269003532F5 /* test4.answer */,
|
||||
06CC18431DE35269003532F5 /* test5.answer */,
|
||||
06CC18441DE35269003532F5 /* test6.answer */,
|
||||
06CC18451DE35269003532F5 /* test7.answer */,
|
||||
);
|
||||
path = Answers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
06CC18461DE35269003532F5 /* BZip2 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
06CC18471DE35269003532F5 /* test1.bz2 */,
|
||||
06CC18481DE35269003532F5 /* test2.bz2 */,
|
||||
06CC18491DE35269003532F5 /* test3.bz2 */,
|
||||
06CC184A1DE35269003532F5 /* test4.bz2 */,
|
||||
06CC184B1DE35269003532F5 /* test5.bz2 */,
|
||||
06CC184C1DE35269003532F5 /* test6.bz2 */,
|
||||
06CC184D1DE35269003532F5 /* test7.bz2 */,
|
||||
);
|
||||
path = BZip2;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
06CC184E1DE35269003532F5 /* Deflate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
06CC184F1DE35269003532F5 /* test1.deflate */,
|
||||
06CC18501DE35269003532F5 /* test2.deflate */,
|
||||
06CC18511DE35269003532F5 /* test3.deflate */,
|
||||
06CC18521DE35269003532F5 /* test4.deflate */,
|
||||
06CC18531DE35269003532F5 /* test5.deflate */,
|
||||
06CC18541DE35269003532F5 /* test6.deflate */,
|
||||
06CC18551DE35269003532F5 /* test7.deflate */,
|
||||
);
|
||||
path = Deflate;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
06CC18561DE35269003532F5 /* GZip */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
06CC18571DE35269003532F5 /* test1.gz */,
|
||||
06CC18581DE35269003532F5 /* test2.gz */,
|
||||
06CC18591DE35269003532F5 /* test3.gz */,
|
||||
06CC185A1DE35269003532F5 /* test4.gz */,
|
||||
06CC185B1DE35269003532F5 /* test5.gz */,
|
||||
06CC185C1DE35269003532F5 /* test6.gz */,
|
||||
06CC185D1DE35269003532F5 /* test7.gz */,
|
||||
);
|
||||
path = GZip;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
@@ -551,35 +557,36 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
066204821DD9840000353639 /* test4.gz in Resources */,
|
||||
066204811DD9840000353639 /* test1.gz in Resources */,
|
||||
066204841DD9840000353639 /* performance_test1.gz in Resources */,
|
||||
06ACA6E91DDB966900451A5C /* test2.zlib in Resources */,
|
||||
06ACA6E21DDB95D500451A5C /* test3.gz in Resources */,
|
||||
0680E1AB1DDA2C90005C05EB /* test1.bz2 in Resources */,
|
||||
06F4635C1DE082FE0072CC2B /* test7.gz in Resources */,
|
||||
0662047E1DD9840000353639 /* test3.answer in Resources */,
|
||||
0662047D1DD9840000353639 /* test2.answer in Resources */,
|
||||
06F4635A1DE082F40072CC2B /* test7.bz2 in Resources */,
|
||||
06ACA6F01DDB975600451A5C /* test6.answer in Resources */,
|
||||
06F4635E1DE083170072CC2B /* test7.zlib in Resources */,
|
||||
066204831DD9840000353639 /* test5.gz in Resources */,
|
||||
0662047F1DD9840000353639 /* test4.answer in Resources */,
|
||||
06ACA6E51DDB960200451A5C /* test2.bz2 in Resources */,
|
||||
0662047C1DD9840000353639 /* test1.answer in Resources */,
|
||||
06ACA6EA1DDB966900451A5C /* test3.zlib in Resources */,
|
||||
06ACA6EC1DDB974100451A5C /* test6.bz2 in Resources */,
|
||||
0680E1AF1DDA2C90005C05EB /* test5.bz2 in Resources */,
|
||||
066204851DD9840000353639 /* test1.zlib in Resources */,
|
||||
06F463581DE082E70072CC2B /* test7.answer in Resources */,
|
||||
0680E1A41DDA2C5B005C05EB /* test4.zlib in Resources */,
|
||||
06ACA6F21DDB976C00451A5C /* test6.zlib in Resources */,
|
||||
0680E1A51DDA2C5B005C05EB /* test5.zlib in Resources */,
|
||||
0680E1AE1DDA2C90005C05EB /* test4.bz2 in Resources */,
|
||||
06ACA6E11DDB95D500451A5C /* test2.gz in Resources */,
|
||||
066204801DD9840000353639 /* test5.answer in Resources */,
|
||||
06ACA6E61DDB960200451A5C /* test3.bz2 in Resources */,
|
||||
06ACA6EE1DDB974D00451A5C /* test6.gz in Resources */,
|
||||
06CC18711DE35269003532F5 /* test4.deflate in Resources */,
|
||||
06CC18621DE35269003532F5 /* test3.answer in Resources */,
|
||||
06CC187A1DE35269003532F5 /* test6.gz in Resources */,
|
||||
06CC18771DE35269003532F5 /* test3.gz in Resources */,
|
||||
06CC18731DE35269003532F5 /* test6.deflate in Resources */,
|
||||
06CC18781DE35269003532F5 /* test4.gz in Resources */,
|
||||
06CC187B1DE35269003532F5 /* test7.gz in Resources */,
|
||||
06CC18611DE35269003532F5 /* test2.answer in Resources */,
|
||||
06CC18701DE35269003532F5 /* test3.deflate in Resources */,
|
||||
06CC186F1DE35269003532F5 /* test2.deflate in Resources */,
|
||||
06CC186C1DE35269003532F5 /* test6.bz2 in Resources */,
|
||||
06CC186B1DE35269003532F5 /* test5.bz2 in Resources */,
|
||||
06CC18651DE35269003532F5 /* test6.answer in Resources */,
|
||||
06CC18631DE35269003532F5 /* test4.answer in Resources */,
|
||||
06CC18761DE35269003532F5 /* test2.gz in Resources */,
|
||||
06CC18721DE35269003532F5 /* test5.deflate in Resources */,
|
||||
06CC186E1DE35269003532F5 /* test1.deflate in Resources */,
|
||||
06CC186A1DE35269003532F5 /* test4.bz2 in Resources */,
|
||||
06CC18741DE35269003532F5 /* test7.deflate in Resources */,
|
||||
06CC18691DE35269003532F5 /* test3.bz2 in Resources */,
|
||||
06CC187D1DE35269003532F5 /* test.zlib in Resources */,
|
||||
06CC186D1DE35269003532F5 /* test7.bz2 in Resources */,
|
||||
06CC18751DE35269003532F5 /* test1.gz in Resources */,
|
||||
06CC187C1DE35269003532F5 /* performance_test1.gz in Resources */,
|
||||
06CC18601DE35269003532F5 /* test1.answer in Resources */,
|
||||
06CC18641DE35269003532F5 /* test5.answer in Resources */,
|
||||
06CC18671DE35269003532F5 /* test1.bz2 in Resources */,
|
||||
06CC18661DE35269003532F5 /* test7.answer in Resources */,
|
||||
06CC18791DE35269003532F5 /* test5.gz in Resources */,
|
||||
06CC18681DE35269003532F5 /* test2.bz2 in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -655,6 +662,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
0680E1B51DDA4076005C05EB /* Bzip2Tests.swift in Sources */,
|
||||
06CC187F1DE35607003532F5 /* DeflateTests.swift in Sources */,
|
||||
061FCE2D1DBCC6A30052F7BE /* Constants.swift in Sources */,
|
||||
0680E1B11DDA2D7C005C05EB /* ZlibTests.swift in Sources */,
|
||||
0680E1B31DDA3D0A005C05EB /* GzipTests.swift in Sources */,
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// DeflateTests.swift
|
||||
// SWCompression
|
||||
//
|
||||
// Created by Timofey Solomko on 21.11.16.
|
||||
// Copyright © 2016 tsolomko. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import SWCompression
|
||||
|
||||
class DeflateTests: XCTestCase {
|
||||
|
||||
static let testType: String = "deflate"
|
||||
|
||||
func testDeflate1() {
|
||||
let testName = "test1"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: DeflateTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? Deflate.decompress(compressedData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
func testDeflate2() {
|
||||
let testName = "test2"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: DeflateTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? Deflate.decompress(compressedData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
func testDeflate3() {
|
||||
let testName = "test3"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: DeflateTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? Deflate.decompress(compressedData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
|
||||
func testDeflate4() {
|
||||
let testName = "test4"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: DeflateTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? Deflate.decompress(compressedData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
|
||||
func testDeflate5() {
|
||||
let testName = "test5"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: DeflateTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? Deflate.decompress(compressedData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
|
||||
func testDeflate6() {
|
||||
let testName = "test6"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: DeflateTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? Deflate.decompress(compressedData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
|
||||
func testDeflate7() {
|
||||
let testName = "test7"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: DeflateTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? Deflate.decompress(compressedData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
}
|
||||
+94
-50
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import SWCompression
|
||||
@testable import SWCompression
|
||||
|
||||
class GzipTests: XCTestCase {
|
||||
|
||||
@@ -20,17 +20,23 @@ class GzipTests: XCTestCase {
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? GzipArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
guard let testServiceInfo = try? GzipArchive.serviceInfo(archiveData: testData) else {
|
||||
XCTFail("Failed to get service info")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
let answerServiceInfo = GzipArchive.ServiceInfo(magic: [31, 139],
|
||||
method: 8,
|
||||
flags: 8,
|
||||
mtime: 1477672923,
|
||||
extraFlags: 0,
|
||||
osType: 3,
|
||||
startPoint: 19,
|
||||
fileName: "test.txt",
|
||||
comment: "",
|
||||
crc: 0)
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
XCTAssertEqual(testServiceInfo, answerServiceInfo, "Incorrect service info")
|
||||
}
|
||||
|
||||
func testGzip2() {
|
||||
@@ -40,17 +46,23 @@ class GzipTests: XCTestCase {
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? GzipArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
guard let testServiceInfo = try? GzipArchive.serviceInfo(archiveData: testData) else {
|
||||
XCTFail("Failed to get service info")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
let answerServiceInfo = GzipArchive.ServiceInfo(magic: [31, 139],
|
||||
method: 8,
|
||||
flags: 8,
|
||||
mtime: 1479237057,
|
||||
extraFlags: 0,
|
||||
osType: 3,
|
||||
startPoint: 23,
|
||||
fileName: "test2.answer",
|
||||
comment: "",
|
||||
crc: 0)
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
XCTAssertEqual(testServiceInfo, answerServiceInfo, "Incorrect service info")
|
||||
}
|
||||
|
||||
func testGzip3() {
|
||||
@@ -60,17 +72,23 @@ class GzipTests: XCTestCase {
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? GzipArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
guard let testServiceInfo = try? GzipArchive.serviceInfo(archiveData: testData) else {
|
||||
XCTFail("Failed to get service info")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
let answerServiceInfo = GzipArchive.ServiceInfo(magic: [31, 139],
|
||||
method: 8,
|
||||
flags: 8,
|
||||
mtime: 1479237147,
|
||||
extraFlags: 0,
|
||||
osType: 3,
|
||||
startPoint: 23,
|
||||
fileName: "test3.answer",
|
||||
comment: "",
|
||||
crc: 0)
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
XCTAssertEqual(testServiceInfo, answerServiceInfo, "Incorrect service info")
|
||||
}
|
||||
|
||||
func testGzip4() {
|
||||
@@ -80,19 +98,26 @@ class GzipTests: XCTestCase {
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? GzipArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
guard let testServiceInfo = try? GzipArchive.serviceInfo(archiveData: testData) else {
|
||||
XCTFail("Failed to get service info")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
let answerServiceInfo = GzipArchive.ServiceInfo(magic: [31, 139],
|
||||
method: 8,
|
||||
flags: 8,
|
||||
mtime: 1477673662,
|
||||
extraFlags: 0,
|
||||
osType: 3,
|
||||
startPoint: 25,
|
||||
fileName: "secondtest.txt",
|
||||
comment: "",
|
||||
crc: 0)
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
XCTAssertEqual(testServiceInfo, answerServiceInfo, "Incorrect service info")
|
||||
}
|
||||
|
||||
|
||||
func testGzip5() {
|
||||
let testName = "test5"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: GzipTests.testType)) else {
|
||||
@@ -100,17 +125,23 @@ class GzipTests: XCTestCase {
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? GzipArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
guard let testServiceInfo = try? GzipArchive.serviceInfo(archiveData: testData) else {
|
||||
XCTFail("Failed to get service info")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
let answerServiceInfo = GzipArchive.ServiceInfo(magic: [31, 139],
|
||||
method: 8,
|
||||
flags: 8,
|
||||
mtime: 1477764584,
|
||||
extraFlags: 0,
|
||||
osType: 3,
|
||||
startPoint: 20,
|
||||
fileName: "empty.txt",
|
||||
comment: "",
|
||||
crc: 0)
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
XCTAssertEqual(testServiceInfo, answerServiceInfo, "Incorrect service info")
|
||||
}
|
||||
|
||||
func testGzip6() {
|
||||
@@ -120,17 +151,23 @@ class GzipTests: XCTestCase {
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? GzipArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
guard let testServiceInfo = try? GzipArchive.serviceInfo(archiveData: testData) else {
|
||||
XCTFail("Failed to get service info")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
let answerServiceInfo = GzipArchive.ServiceInfo(magic: [31, 139],
|
||||
method: 8,
|
||||
flags: 8,
|
||||
mtime: 1479237483,
|
||||
extraFlags: 0,
|
||||
osType: 3,
|
||||
startPoint: 23,
|
||||
fileName: "test6.answer",
|
||||
comment: "",
|
||||
crc: 0)
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
XCTAssertEqual(testServiceInfo, answerServiceInfo, "Incorrect service info")
|
||||
}
|
||||
|
||||
func testGzip7() {
|
||||
@@ -140,17 +177,24 @@ class GzipTests: XCTestCase {
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? GzipArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
guard let testServiceInfo = try? GzipArchive.serviceInfo(archiveData: testData) else {
|
||||
XCTFail("Failed to get service info")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
let answerServiceInfo = GzipArchive.ServiceInfo(magic: [31, 139],
|
||||
method: 8,
|
||||
flags: 8,
|
||||
mtime: 1479559913,
|
||||
extraFlags: 0,
|
||||
osType: 3,
|
||||
startPoint: 23,
|
||||
fileName: "test7.answer",
|
||||
comment: "",
|
||||
crc: 0)
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
XCTAssertEqual(testServiceInfo, answerServiceInfo, "Incorrect service info")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
x�
|
||||
+10
-130
@@ -7,150 +7,30 @@
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import SWCompression
|
||||
@testable import SWCompression
|
||||
|
||||
class ZlibTests: XCTestCase {
|
||||
|
||||
static let testType: String = "zlib"
|
||||
|
||||
func testZlib1() {
|
||||
let testName = "test1"
|
||||
func testZlib() {
|
||||
let testName = "test"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: ZlibTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? ZlibArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
guard let testServiceInfo = try? ZlibArchive.serviceInfo(archiveData: testData) else {
|
||||
XCTFail("Failed to get service info")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
let answerServiceInfo = ZlibArchive.ServiceInfo(compressionMethod: 8,
|
||||
windowSize: 32768,
|
||||
compressionLevel: .defaultAlgorithm,
|
||||
startPoint: 2)
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
func testZlib2() {
|
||||
let testName = "test2"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: ZlibTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? ZlibArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
func testZlib3() {
|
||||
let testName = "test3"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: ZlibTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? ZlibArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
func testZlib4() {
|
||||
let testName = "test4"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: ZlibTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? ZlibArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
func testZlib5() {
|
||||
let testName = "test5"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: ZlibTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? ZlibArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
func testZlib6() {
|
||||
let testName = "test6"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: ZlibTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? ZlibArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
}
|
||||
|
||||
func testZlib7() {
|
||||
let testName = "test7"
|
||||
guard let testData = try? Data(contentsOf: Constants.url(forTest: testName, withType: ZlibTests.testType)) else {
|
||||
XCTFail("Failed to load test archive")
|
||||
return
|
||||
}
|
||||
|
||||
guard let decompressedData = try? ZlibArchive.unarchive(archiveData: testData) else {
|
||||
XCTFail("Failed to decompress")
|
||||
return
|
||||
}
|
||||
|
||||
guard let answerData = try? Data(contentsOf: Constants.url(forAnswer: testName)) else {
|
||||
XCTFail("Failed to get the answer")
|
||||
return
|
||||
}
|
||||
|
||||
XCTAssertEqual(decompressedData, answerData, "Decompression was incorrect")
|
||||
XCTAssertEqual(testServiceInfo, answerServiceInfo, "Incorrect service info")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user