Skip to content

Commit 8b7eefe

Browse files
committed
Rearrange tests in default and compatibility folders
1 parent 164a3a1 commit 8b7eefe

27 files changed

+66
-68
lines changed

build-logic/src/main/kotlin/ckbuild/tests/GenerateProviderTestsTask.kt

Lines changed: 40 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ abstract class GenerateProviderTestsTask : DefaultTask() {
5555

5656
appendLine("private val CRYPTOGRAPHY_PROVIDER = $providerInitialization").appendLine()
5757

58-
testClasses.forEach {
59-
val testClassName = it.substringAfterLast(".")
58+
testClasses.forEach { testClassName ->
6059
appendLine("class ${providerClassifier}_$testClassName : $testClassName(CRYPTOGRAPHY_PROVIDER)")
6160
}
6261
appendLine()
@@ -66,49 +65,48 @@ abstract class GenerateProviderTestsTask : DefaultTask() {
6665
private val defaultImports = listOf(
6766
"dev.whyoleg.cryptography.*",
6867
"dev.whyoleg.cryptography.providers.tests.*",
69-
"dev.whyoleg.cryptography.providers.tests.algorithms.*",
70-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.*",
71-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.*",
72-
"dev.whyoleg.cryptography.providers.tests.algorithms.symmetric.*",
68+
"dev.whyoleg.cryptography.providers.tests.compatibility.*",
69+
"dev.whyoleg.cryptography.providers.tests.default.*",
7370
)
7471

7572
private val testClasses = listOf(
76-
"dev.whyoleg.cryptography.providers.tests.algorithms.SupportedAlgorithmsTest",
77-
78-
"dev.whyoleg.cryptography.providers.tests.algorithms.Pbkdf2CompatibilityTest",
79-
80-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.DigestTest",
81-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Md5CompatibilityTest",
82-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Sha1CompatibilityTest",
83-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Sha224CompatibilityTest",
84-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Sha256CompatibilityTest",
85-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Sha384CompatibilityTest",
86-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Sha512CompatibilityTest",
87-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Sha3B224CompatibilityTest",
88-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Sha3B256CompatibilityTest",
89-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Sha3B384CompatibilityTest",
90-
"dev.whyoleg.cryptography.providers.tests.algorithms.digest.Sha3B512CompatibilityTest",
91-
92-
"dev.whyoleg.cryptography.providers.tests.algorithms.symmetric.AesCbcTest",
93-
"dev.whyoleg.cryptography.providers.tests.algorithms.symmetric.AesCbcCompatibilityTest",
94-
"dev.whyoleg.cryptography.providers.tests.algorithms.symmetric.AesCtrCompatibilityTest",
95-
"dev.whyoleg.cryptography.providers.tests.algorithms.symmetric.AesEcbCompatibilityTest",
96-
"dev.whyoleg.cryptography.providers.tests.algorithms.symmetric.AesGcmTest",
97-
"dev.whyoleg.cryptography.providers.tests.algorithms.symmetric.AesGcmCompatibilityTest",
98-
"dev.whyoleg.cryptography.providers.tests.algorithms.symmetric.HmacTest",
99-
"dev.whyoleg.cryptography.providers.tests.algorithms.symmetric.HmacCompatibilityTest",
100-
101-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.EcdsaTest",
102-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.EcdsaCompatibilityTest",
103-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.EcdhCompatibilityTest",
104-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.RsaOaepTest",
105-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.RsaOaepCompatibilityTest",
106-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.RsaPkcs1Test",
107-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.RsaPkcs1CompatibilityTest",
108-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.RsaPkcs1EsCompatibilityTest",
109-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.RsaPssTest",
110-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.RsaPssCompatibilityTest",
111-
"dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric.RsaRawCompatibilityTest",
73+
"SupportedAlgorithmsTest",
74+
"Pbkdf2CompatibilityTest",
75+
76+
"DigestTest",
77+
"Md5CompatibilityTest",
78+
"Sha1CompatibilityTest",
79+
"Sha224CompatibilityTest",
80+
"Sha256CompatibilityTest",
81+
"Sha384CompatibilityTest",
82+
"Sha512CompatibilityTest",
83+
"Sha3B224CompatibilityTest",
84+
"Sha3B256CompatibilityTest",
85+
"Sha3B384CompatibilityTest",
86+
"Sha3B512CompatibilityTest",
87+
88+
"AesCbcTest",
89+
"AesCbcCompatibilityTest",
90+
"AesCtrCompatibilityTest",
91+
"AesEcbCompatibilityTest",
92+
"AesGcmTest",
93+
"AesGcmCompatibilityTest",
94+
95+
"HmacTest",
96+
"HmacCompatibilityTest",
97+
98+
"EcdsaTest",
99+
"EcdsaCompatibilityTest",
100+
"EcdhCompatibilityTest",
101+
102+
"RsaOaepTest",
103+
"RsaOaepCompatibilityTest",
104+
"RsaPkcs1Test",
105+
"RsaPkcs1CompatibilityTest",
106+
"RsaPkcs1EsCompatibilityTest",
107+
"RsaPssTest",
108+
"RsaPssCompatibilityTest",
109+
"RsaRawCompatibilityTest",
112110
)
113111
}
114112
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.BinarySize.Companion.bits

cryptography-providers-tests/src/commonMain/kotlin/algorithms/digest/DigestCompatibilityTest.kt renamed to cryptography-providers-tests/src/commonMain/kotlin/compatibility/DigestCompatibilityTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.digest
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*

cryptography-providers-tests/src/commonMain/kotlin/algorithms/Pbkdf2CompatibilityTest.kt renamed to cryptography-providers-tests/src/commonMain/kotlin/compatibility/Pbkdf2CompatibilityTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.BinarySize.Companion.bytes
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.BinarySize.Companion.bits
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.BinarySize.Companion.bits
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.BinarySize.Companion.bytes
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.compatibility
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.BinarySize.Companion.bits
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.default
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*

cryptography-providers-tests/src/commonMain/kotlin/algorithms/symmetric/AesCbcTest.kt renamed to cryptography-providers-tests/src/commonMain/kotlin/default/AesCbcTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.default
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*

cryptography-providers-tests/src/commonMain/kotlin/algorithms/symmetric/AesGcmTest.kt renamed to cryptography-providers-tests/src/commonMain/kotlin/default/AesGcmTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.default
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.BinarySize.Companion.bits

cryptography-providers-tests/src/commonMain/kotlin/algorithms/digest/DigestTest.kt renamed to cryptography-providers-tests/src/commonMain/kotlin/default/DigestTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.digest
5+
package dev.whyoleg.cryptography.providers.tests.default
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*

cryptography-providers-tests/src/commonMain/kotlin/algorithms/asymmetric/EcdsaTest.kt renamed to cryptography-providers-tests/src/commonMain/kotlin/default/EcdsaTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.default
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*

cryptography-providers-tests/src/commonMain/kotlin/algorithms/symmetric/HmacTest.kt renamed to cryptography-providers-tests/src/commonMain/kotlin/default/HmacTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.symmetric
5+
package dev.whyoleg.cryptography.providers.tests.default
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.default
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.default
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.algorithms.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2023-2024 Oleg Yukhnevich. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

5-
package dev.whyoleg.cryptography.providers.tests.algorithms.asymmetric
5+
package dev.whyoleg.cryptography.providers.tests.default
66

77
import dev.whyoleg.cryptography.*
88
import dev.whyoleg.cryptography.BinarySize.Companion.bytes

0 commit comments

Comments
 (0)