Browse Source

Add TestsPerformance

Marcin Krzyżanowski 7 years ago
parent
commit
5fb7dbf364
39 changed files with 261 additions and 16 deletions
  1. 124 4
      CryptoSwift.xcodeproj/project.pbxproj
  2. 10 0
      CryptoSwift.xcodeproj/xcshareddata/xcschemes/CryptoSwift.xcscheme
  3. 56 0
      CryptoSwift.xcodeproj/xcshareddata/xcschemes/TestsPerformance.xcscheme
  4. 2 1
      Package.swift
  5. 2 1
      Tests/LinuxMain.swift
  6. 0 0
      Tests/Tests/AESTests.swift
  7. 0 0
      Tests/Tests/AESTestsPerf.swift
  8. 0 0
      Tests/Tests/Access.swift
  9. 0 0
      Tests/Tests/BlowfishTests.swift
  10. 0 0
      Tests/Tests/Bridging.h
  11. 0 0
      Tests/Tests/CMACTests.swift
  12. 0 0
      Tests/Tests/ChaCha20Poly1305Tests.swift
  13. 0 0
      Tests/Tests/ChaCha20Tests.swift
  14. 0 0
      Tests/Tests/ChaCha20TestsPerf.swift
  15. 0 0
      Tests/Tests/Default-568h@2x.png
  16. 0 0
      Tests/Tests/DigestTests.swift
  17. 0 0
      Tests/Tests/DigestTestsPerf.swift
  18. 0 0
      Tests/Tests/Error+Extension.swift
  19. 0 0
      Tests/Tests/ExtensionsTest.swift
  20. 0 0
      Tests/Tests/ExtensionsTestPerf.swift
  21. 0 0
      Tests/Tests/HKDFTests.swift
  22. 0 0
      Tests/Tests/HMACTests.swift
  23. 0 0
      Tests/Tests/Info.plist
  24. 0 0
      Tests/Tests/PBKDF.swift
  25. 0 0
      Tests/Tests/PBKDFPerf.swift
  26. 0 0
      Tests/Tests/PaddingTests.swift
  27. 0 0
      Tests/Tests/Poly1305Tests.swift
  28. 0 0
      Tests/Tests/RabbitTests.swift
  29. 0 0
      Tests/Tests/RabbitTestsPerf.swift
  30. 0 0
      Tests/Tests/RandomBytesSequenceTests.swift
  31. 22 0
      Tests/TestsPerformance/Info.plist
  32. 35 0
      Tests/TestsPerformance/TestsPerformance.swift
  33. 1 1
      config/CryptoSwift-Release.xcconfig
  34. 1 1
      config/CryptoSwift-Test.xcconfig
  35. 2 2
      config/CryptoSwift-TestHostApp-Release.xcconfig
  36. 2 2
      config/CryptoSwift-TestHostApp-Test.xcconfig
  37. 1 1
      config/Tests-Release.xcconfig
  38. 2 2
      config/Tests-Shared.xcconfig
  39. 1 1
      config/Tests-Test.xcconfig

+ 124 - 4
CryptoSwift.xcodeproj/project.pbxproj

@@ -40,11 +40,19 @@
 		754BE46819693E190098E6F3 /* DigestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 754BE46719693E190098E6F3 /* DigestTests.swift */; };
 		755FB1DA199E347D00475437 /* ExtensionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755FB1D9199E347D00475437 /* ExtensionsTest.swift */; };
 		7576F64D20725BD6006688F8 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7576F64C20725BD5006688F8 /* Default-568h@2x.png */; };
-		7576F6F320728F00006688F8 /* RabbitTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F220728F00006688F8 /* RabbitTestsPerf.swift */; };
 		757DA2531A4ED0A4002BA3EF /* PaddingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA2521A4ED0A4002BA3EF /* PaddingTests.swift */; };
 		757DA2551A4ED408002BA3EF /* AESTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA2541A4ED408002BA3EF /* AESTests.swift */; };
 		757DA2591A4ED4D7002BA3EF /* ChaCha20Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA2581A4ED4D7002BA3EF /* ChaCha20Tests.swift */; };
 		758A94291A65C67400E46135 /* HMACTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 758A94271A65C59200E46135 /* HMACTests.swift */; };
+		758F95AB2072E8E20080D664 /* Bridging.h in Headers */ = {isa = PBXBuildFile; fileRef = 758F95AA2072E8E10080D664 /* Bridging.h */; };
+		7595C14D2072E48C00EA1A5F /* TestsPerformance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */; };
+		7595C1582072E5B900EA1A5F /* DigestTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EB20726319006688F8 /* DigestTestsPerf.swift */; };
+		7595C1592072E5B900EA1A5F /* AESTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EE20726422006688F8 /* AESTestsPerf.swift */; };
+		7595C15A2072E5B900EA1A5F /* ChaCha20TestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F020728EAB006688F8 /* ChaCha20TestsPerf.swift */; };
+		7595C15B2072E5B900EA1A5F /* RabbitTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F220728F00006688F8 /* RabbitTestsPerf.swift */; };
+		7595C15C2072E5B900EA1A5F /* ExtensionsTestPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F420729069006688F8 /* ExtensionsTestPerf.swift */; };
+		7595C15D2072E5B900EA1A5F /* PBKDFPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F6207290F8006688F8 /* PBKDFPerf.swift */; };
+		7595C1602072E64900EA1A5F /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; };
 		75B601EB197D6A6C0009B53D /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; };
 		75C2E76D1D55F097003D2BCA /* Access.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C2E76C1D55F097003D2BCA /* Access.swift */; };
 		75EC527B1EE8B73A0048EB3B /* CryptoSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = 75EC527A1EE8B6CA0048EB3B /* CryptoSwift.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -114,6 +122,13 @@
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
+		7595C15E2072E64000EA1A5F /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 754BE44C19693E190098E6F3 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 754BE45419693E190098E6F3;
+			remoteInfo = CryptoSwift;
+		};
 		75B601E3197D69EB0009B53D /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 754BE44C19693E190098E6F3 /* Project object */;
@@ -229,6 +244,10 @@
 		757DA2541A4ED408002BA3EF /* AESTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AESTests.swift; sourceTree = "<group>"; };
 		757DA2581A4ED4D7002BA3EF /* ChaCha20Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChaCha20Tests.swift; sourceTree = "<group>"; };
 		758A94271A65C59200E46135 /* HMACTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMACTests.swift; sourceTree = "<group>"; };
+		758F95AA2072E8E10080D664 /* Bridging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bridging.h; sourceTree = "<group>"; };
+		7595C14A2072E48C00EA1A5F /* TestsPerformance.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestsPerformance.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+		7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestsPerformance.swift; sourceTree = "<group>"; };
+		7595C14E2072E48C00EA1A5F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		75C2E76C1D55F097003D2BCA /* Access.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Access.swift; sourceTree = "<group>"; };
 		75EC52381EE8B6CA0048EB3B /* AES.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AES.swift; sourceTree = "<group>"; };
 		75EC52391EE8B6CA0048EB3B /* Array+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Extension.swift"; sourceTree = "<group>"; };
@@ -320,6 +339,14 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		7595C1472072E48C00EA1A5F /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				7595C1602072E64900EA1A5F /* CryptoSwift.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
@@ -356,6 +383,7 @@
 				755D27BC1D06DE6400C41692 /* CryptoSwift.playground */,
 				75EC52361EE8B6CA0048EB3B /* Sources */,
 				754BE46419693E190098E6F3 /* Tests */,
+				7595C14B2072E48C00EA1A5F /* TestsPerformance */,
 				75211F93207249D8004E41F8 /* CryptoSwift-TestHostApp */,
 				754BE45619693E190098E6F3 /* Products */,
 				24B0BBA29D734E62809E53BC /* Frameworks */,
@@ -368,6 +396,7 @@
 				754BE45519693E190098E6F3 /* CryptoSwift.framework */,
 				754BE46019693E190098E6F3 /* Tests.xctest */,
 				75211F92207249D8004E41F8 /* CryptoSwift-TestHostApp.app */,
+				7595C14A2072E48C00EA1A5F /* TestsPerformance.xctest */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -401,7 +430,7 @@
 				754BE46519693E190098E6F3 /* Supporting Files */,
 			);
 			name = Tests;
-			path = Tests/CryptoSwiftTests;
+			path = Tests/Tests;
 			sourceTree = "<group>";
 		};
 		754BE46519693E190098E6F3 /* Supporting Files */ = {
@@ -437,6 +466,17 @@
 			path = config;
 			sourceTree = "<group>";
 		};
+		7595C14B2072E48C00EA1A5F /* TestsPerformance */ = {
+			isa = PBXGroup;
+			children = (
+				758F95AA2072E8E10080D664 /* Bridging.h */,
+				7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */,
+				7595C14E2072E48C00EA1A5F /* Info.plist */,
+			);
+			name = TestsPerformance;
+			path = Tests/TestsPerformance;
+			sourceTree = "<group>";
+		};
 		75EC52361EE8B6CA0048EB3B /* Sources */ = {
 			isa = PBXGroup;
 			children = (
@@ -550,6 +590,7 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				758F95AB2072E8E20080D664 /* Bridging.h in Headers */,
 				75EC527B1EE8B73A0048EB3B /* CryptoSwift.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -613,10 +654,28 @@
 				75B6021F197D6D070009B53D /* PBXTargetDependency */,
 			);
 			name = Tests;
-			productName = CryptoSwiftTests;
+			productName = Tests;
 			productReference = 754BE46019693E190098E6F3 /* Tests.xctest */;
 			productType = "com.apple.product-type.bundle.unit-test";
 		};
+		7595C1492072E48C00EA1A5F /* TestsPerformance */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 7595C1522072E48C00EA1A5F /* Build configuration list for PBXNativeTarget "TestsPerformance" */;
+			buildPhases = (
+				7595C1462072E48C00EA1A5F /* Sources */,
+				7595C1472072E48C00EA1A5F /* Frameworks */,
+				7595C1482072E48C00EA1A5F /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				7595C15F2072E64000EA1A5F /* PBXTargetDependency */,
+			);
+			name = TestsPerformance;
+			productName = TestsPerformance;
+			productReference = 7595C14A2072E48C00EA1A5F /* TestsPerformance.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
+		};
 /* End PBXNativeTarget section */
 
 /* Begin PBXProject section */
@@ -641,6 +700,10 @@
 						LastSwiftMigration = 0900;
 						ProvisioningStyle = Manual;
 					};
+					7595C1492072E48C00EA1A5F = {
+						CreatedOnToolsVersion = 9.3;
+						ProvisioningStyle = Manual;
+					};
 				};
 			};
 			buildConfigurationList = 754BE44F19693E190098E6F3 /* Build configuration list for PBXProject "CryptoSwift" */;
@@ -659,6 +722,7 @@
 				754BE45419693E190098E6F3 /* CryptoSwift */,
 				75211F91207249D8004E41F8 /* CryptoSwift-TestHostApp */,
 				754BE45F19693E190098E6F3 /* Tests */,
+				7595C1492072E48C00EA1A5F /* TestsPerformance */,
 			);
 		};
 /* End PBXProject section */
@@ -702,6 +766,13 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		7595C1482072E48C00EA1A5F /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
@@ -804,16 +875,34 @@
 				674A736F1BF5D85B00866C5B /* RabbitTests.swift in Sources */,
 				0EE73E74204D59C200110E11 /* CMACTests.swift in Sources */,
 				750CC3EB1DC0CACE0096BE6E /* BlowfishTests.swift in Sources */,
-				7576F6F320728F00006688F8 /* RabbitTestsPerf.swift in Sources */,
 				757DA2531A4ED0A4002BA3EF /* PaddingTests.swift in Sources */,
 				14156CE52011422400DDCFBC /* ChaCha20Poly1305Tests.swift in Sources */,
 				757DA2551A4ED408002BA3EF /* AESTests.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		7595C1462072E48C00EA1A5F /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				7595C15D2072E5B900EA1A5F /* PBKDFPerf.swift in Sources */,
+				7595C15A2072E5B900EA1A5F /* ChaCha20TestsPerf.swift in Sources */,
+				7595C15B2072E5B900EA1A5F /* RabbitTestsPerf.swift in Sources */,
+				7595C15C2072E5B900EA1A5F /* ExtensionsTestPerf.swift in Sources */,
+				7595C1582072E5B900EA1A5F /* DigestTestsPerf.swift in Sources */,
+				7595C14D2072E48C00EA1A5F /* TestsPerformance.swift in Sources */,
+				7595C1592072E5B900EA1A5F /* AESTestsPerf.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
+		7595C15F2072E64000EA1A5F /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 754BE45419693E190098E6F3 /* CryptoSwift */;
+			targetProxy = 7595C15E2072E64000EA1A5F /* PBXContainerItemProxy */;
+		};
 		75B601E4197D69EB0009B53D /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			target = 754BE45419693E190098E6F3 /* CryptoSwift */;
@@ -936,6 +1025,27 @@
 			};
 			name = Test;
 		};
+		7595C14F2072E48C00EA1A5F /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 75211FA720724A0F004E41F8 /* Tests-Debug.xcconfig */;
+			buildSettings = {
+			};
+			name = Debug;
+		};
+		7595C1502072E48C00EA1A5F /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 75211FAD20724A0F004E41F8 /* Tests-Release.xcconfig */;
+			buildSettings = {
+			};
+			name = Release;
+		};
+		7595C1512072E48C00EA1A5F /* Test */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 75211FB120724A10004E41F8 /* Tests-Test.xcconfig */;
+			buildSettings = {
+			};
+			name = Test;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -979,6 +1089,16 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		7595C1522072E48C00EA1A5F /* Build configuration list for PBXNativeTarget "TestsPerformance" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				7595C14F2072E48C00EA1A5F /* Debug */,
+				7595C1502072E48C00EA1A5F /* Release */,
+				7595C1512072E48C00EA1A5F /* Test */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 /* End XCConfigurationList section */
 	};
 	rootObject = 754BE44C19693E190098E6F3 /* Project object */;

+ 10 - 0
CryptoSwift.xcodeproj/xcshareddata/xcschemes/CryptoSwift.xcscheme

@@ -55,6 +55,16 @@
                ReferencedContainer = "container:CryptoSwift.xcodeproj">
             </BuildableReference>
          </TestableReference>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "7595C1492072E48C00EA1A5F"
+               BuildableName = "TestsPerformance.xctest"
+               BlueprintName = "TestsPerformance"
+               ReferencedContainer = "container:CryptoSwift.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
       </Testables>
       <MacroExpansion>
          <BuildableReference

+ 56 - 0
CryptoSwift.xcodeproj/xcshareddata/xcschemes/TestsPerformance.xcscheme

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0930"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "7595C1492072E48C00EA1A5F"
+               BuildableName = "TestsPerformance.xctest"
+               BlueprintName = "TestsPerformance"
+               ReferencedContainer = "container:CryptoSwift.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 2 - 1
Package.swift

@@ -6,6 +6,7 @@ _ = Package(name: "CryptoSwift",
             products: [.library(name: "CryptoSwift", targets: ["CryptoSwift"])],
             targets: [
                 .target(name: "CryptoSwift"),
-                .testTarget(name: "CryptoSwiftTests", dependencies: ["CryptoSwift"]),
+                .testTarget(name: "Tests", dependencies: ["CryptoSwift"]),
+                .testTarget(name: "TestsPerformance", dependencies: ["CryptoSwift"]),
             ],
             swiftLanguageVersions: [4])

+ 2 - 1
Tests/LinuxMain.swift

@@ -1,4 +1,5 @@
-@testable import CryptoSwiftTests
+@testable import Tests
+@testable import TestsPerformance
 import XCTest
 
 var tests = [

+ 0 - 0
Tests/CryptoSwiftTests/AESTests.swift → Tests/Tests/AESTests.swift


+ 0 - 0
Tests/CryptoSwiftTests/AESTestsPerf.swift → Tests/Tests/AESTestsPerf.swift


+ 0 - 0
Tests/CryptoSwiftTests/Access.swift → Tests/Tests/Access.swift


+ 0 - 0
Tests/CryptoSwiftTests/BlowfishTests.swift → Tests/Tests/BlowfishTests.swift


+ 0 - 0
Tests/CryptoSwiftTests/Bridging.h → Tests/Tests/Bridging.h


+ 0 - 0
Tests/CryptoSwiftTests/CMACTests.swift → Tests/Tests/CMACTests.swift


+ 0 - 0
Tests/CryptoSwiftTests/ChaCha20Poly1305Tests.swift → Tests/Tests/ChaCha20Poly1305Tests.swift


+ 0 - 0
Tests/CryptoSwiftTests/ChaCha20Tests.swift → Tests/Tests/ChaCha20Tests.swift


+ 0 - 0
Tests/CryptoSwiftTests/ChaCha20TestsPerf.swift → Tests/Tests/ChaCha20TestsPerf.swift


+ 0 - 0
Tests/CryptoSwiftTests/Default-568h@2x.png → Tests/Tests/Default-568h@2x.png


+ 0 - 0
Tests/CryptoSwiftTests/DigestTests.swift → Tests/Tests/DigestTests.swift


+ 0 - 0
Tests/CryptoSwiftTests/DigestTestsPerf.swift → Tests/Tests/DigestTestsPerf.swift


+ 0 - 0
Tests/CryptoSwiftTests/Error+Extension.swift → Tests/Tests/Error+Extension.swift


+ 0 - 0
Tests/CryptoSwiftTests/ExtensionsTest.swift → Tests/Tests/ExtensionsTest.swift


+ 0 - 0
Tests/CryptoSwiftTests/ExtensionsTestPerf.swift → Tests/Tests/ExtensionsTestPerf.swift


+ 0 - 0
Tests/CryptoSwiftTests/HKDFTests.swift → Tests/Tests/HKDFTests.swift


+ 0 - 0
Tests/CryptoSwiftTests/HMACTests.swift → Tests/Tests/HMACTests.swift


+ 0 - 0
Tests/CryptoSwiftTests/Info.plist → Tests/Tests/Info.plist


+ 0 - 0
Tests/CryptoSwiftTests/PBKDF.swift → Tests/Tests/PBKDF.swift


+ 0 - 0
Tests/CryptoSwiftTests/PBKDFPerf.swift → Tests/Tests/PBKDFPerf.swift


+ 0 - 0
Tests/CryptoSwiftTests/PaddingTests.swift → Tests/Tests/PaddingTests.swift


+ 0 - 0
Tests/CryptoSwiftTests/Poly1305Tests.swift → Tests/Tests/Poly1305Tests.swift


+ 0 - 0
Tests/CryptoSwiftTests/RabbitTests.swift → Tests/Tests/RabbitTests.swift


+ 0 - 0
Tests/CryptoSwiftTests/RabbitTestsPerf.swift → Tests/Tests/RabbitTestsPerf.swift


+ 0 - 0
Tests/CryptoSwiftTests/RandomBytesSequenceTests.swift → Tests/Tests/RandomBytesSequenceTests.swift


+ 22 - 0
Tests/TestsPerformance/Info.plist

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+</dict>
+</plist>

+ 35 - 0
Tests/TestsPerformance/TestsPerformance.swift

@@ -0,0 +1,35 @@
+//
+//  TestsPerformance.swift
+//  TestsPerformance
+//
+//  Created by Marcin Krzyzanowski on 03/04/2018.
+//  Copyright © 2018 Marcin Krzyzanowski. All rights reserved.
+//
+
+import XCTest
+
+class TestsPerformance: XCTestCase {
+    
+    override func setUp() {
+        super.setUp()
+        // Put setup code here. This method is called before the invocation of each test method in the class.
+    }
+    
+    override func tearDown() {
+        // Put teardown code here. This method is called after the invocation of each test method in the class.
+        super.tearDown()
+    }
+    
+    func testExample() {
+        // This is an example of a functional test case.
+        // Use XCTAssert and related functions to verify your tests produce the correct results.
+    }
+    
+    func testPerformanceExample() {
+        // This is an example of a performance test case.
+        self.measure {
+            // Put the code you want to measure the time of here.
+        }
+    }
+    
+}

+ 1 - 1
config/CryptoSwift-Release.xcconfig

@@ -79,4 +79,4 @@ SWIFT_ENFORCE_EXCLUSIVE_ACCESS = compile-time
 // * *Optimize for Size:* [-Osize]
 // * *Whole Module Optimization:* [-O -whole-module-optimization]
 
-SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
+SWIFT_OPTIMIZATION_LEVEL = -O

+ 1 - 1
config/CryptoSwift-Test.xcconfig

@@ -69,4 +69,4 @@ SWIFT_ENFORCE_EXCLUSIVE_ACCESS = compile-time
 // * *Optimize for Size:* [-Osize]
 // * *Whole Module Optimization:* [-O -whole-module-optimization]
 
-SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
+SWIFT_OPTIMIZATION_LEVEL = -O

+ 2 - 2
config/CryptoSwift-TestHostApp-Release.xcconfig

@@ -48,7 +48,7 @@ MTL_ENABLE_DEBUG_INFO = NO
 // * *Optimize for Size:* [-Osize]
 // * *Whole Module Optimization:* [-O -whole-module-optimization]
 
-SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
+SWIFT_OPTIMIZATION_LEVEL = -O
 
 
 
@@ -56,4 +56,4 @@ SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
 // 
 // If enabled, perform validation checks on the product as part of the build process.
 
-VALIDATE_PRODUCT = YES
+VALIDATE_PRODUCT = YES

+ 2 - 2
config/CryptoSwift-TestHostApp-Test.xcconfig

@@ -48,7 +48,7 @@ MTL_ENABLE_DEBUG_INFO = NO
 // * *Optimize for Size:* [-Osize]
 // * *Whole Module Optimization:* [-O -whole-module-optimization]
 
-SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
+SWIFT_OPTIMIZATION_LEVEL = -O
 
 
 
@@ -56,4 +56,4 @@ SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
 // 
 // If enabled, perform validation checks on the product as part of the build process.
 
-VALIDATE_PRODUCT = YES
+VALIDATE_PRODUCT = YES

+ 1 - 1
config/Tests-Release.xcconfig

@@ -89,4 +89,4 @@ SWIFT_DISABLE_SAFETY_CHECKS = YES
 // * *Optimize for Size:* [-Osize]
 // * *Whole Module Optimization:* [-O -whole-module-optimization]
 
-SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
+SWIFT_OPTIMIZATION_LEVEL = -O

+ 2 - 2
config/Tests-Shared.xcconfig

@@ -37,7 +37,7 @@ HEADER_SEARCH_PATHS = $(inherited) includes/**
 // in [Runtime Configuration
 // Guidelines](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPRuntimeConfig/000-Introduction/introduction.html).
 
-INFOPLIST_FILE = Tests/CryptoSwiftTests/Info.plist
+INFOPLIST_FILE = Tests/${TARGET_NAME}/Info.plist
 
 
 
@@ -67,5 +67,5 @@ PRODUCT_BUNDLE_IDENTIFIER = com.krzyzanowskim.${PRODUCT_NAME:rfc1034identifier}
 // 
 // Path to the header defining the Objective-C interfaces to be exposed in Swift.
 
-SWIFT_OBJC_BRIDGING_HEADER = Tests/CryptoSwiftTests/Bridging.h
+SWIFT_OBJC_BRIDGING_HEADER = Tests/${TARGET_NAME}/Bridging.h
 

+ 1 - 1
config/Tests-Test.xcconfig

@@ -89,4 +89,4 @@ SWIFT_DISABLE_SAFETY_CHECKS = YES
 // * *Optimize for Size:* [-Osize]
 // * *Whole Module Optimization:* [-O -whole-module-optimization]
 
-SWIFT_OPTIMIZATION_LEVEL = -Owholemodule
+SWIFT_OPTIMIZATION_LEVEL = -O