@@ -6,27 +6,27 @@ import java.io.File
6
6
object TestUtils {
7
7
8
8
fun generateTestFiles (project : Project ) {
9
- getPuzzleDirectories (project).forEach {
9
+ getChallengeDirectories (project).forEach {
10
10
generateTestFiles(it)
11
11
}
12
12
}
13
13
14
14
/* *
15
- * Generate test files for a given puzzle by combining challenge file with available solutions
15
+ * Generate test files for a given challenge by combining challenge file with available solutions
16
16
*/
17
- private fun generateTestFiles (puzzleDirectoryPath : File ) {
18
- val generatedPuzzleDirecotryPath = puzzleDirectoryPath
17
+ private fun generateTestFiles (challengeDirectoryPath : File ) {
18
+ val generatedChallengeDirecotryPath = challengeDirectoryPath
19
19
.path
20
20
.replace(" kotlin/com/igorwojda/" , " kotlin/generated/com/igorwojda/" )
21
21
22
22
// May be already pre-cached by CI
23
- deleteDirectory(File (generatedPuzzleDirecotryPath ))
23
+ deleteDirectory(File (generatedChallengeDirecotryPath ))
24
24
25
- val testFiles = KotlinGeneratorUtils .getTestFiles(puzzleDirectoryPath )
25
+ val testFiles = KotlinGeneratorUtils .getTestFiles(challengeDirectoryPath )
26
26
27
27
testFiles
28
28
.forEach {
29
- createTestFile(generatedPuzzleDirecotryPath , it)
29
+ createTestFile(generatedChallengeDirecotryPath , it)
30
30
}
31
31
}
32
32
@@ -47,10 +47,10 @@ object TestUtils {
47
47
}
48
48
49
49
/* *
50
- * Create a test files for a given puzzle
50
+ * Create a test files for a given challenge
51
51
*/
52
- private fun createTestFile (generatedPuzzleDirecotryPath : String , testFile : TestFile ) {
53
- val testDirectory = File (" $generatedPuzzleDirecotryPath /${testFile.relativePath} /" )
52
+ private fun createTestFile (generatedChallengeDirecotryPath : String , testFile : TestFile ) {
53
+ val testDirectory = File (" $generatedChallengeDirecotryPath /${testFile.relativePath} /" )
54
54
testDirectory.mkdirs()
55
55
56
56
val targetChallengeFile = File (" ${testDirectory.path} /${testFile.fileName} " )
@@ -60,7 +60,7 @@ object TestUtils {
60
60
/* *
61
61
* Return list of project names
62
62
*/
63
- private fun getPuzzleDirectories (project : Project ): List <File > {
63
+ private fun getChallengeDirectories (project : Project ): List <File > {
64
64
val path = " ${project.rootDir.path} /../src/test/kotlin/com/igorwojda"
65
65
val directory = File (path)
66
66
val miscDirectoryName = " misc"
@@ -74,7 +74,7 @@ object TestUtils {
74
74
}
75
75
76
76
/* *
77
- * Checks whatever or not directory is high level directory (puzzle grouping directory)
77
+ * Checks whatever or not directory is high level directory (challenge grouping directory)
78
78
*/
79
79
private val File .isHighLevelDirectory get() = this .isDirectory && this .listFiles().none { it.isDirectory }
80
80
}
0 commit comments