@@ -126,9 +126,9 @@ object GenScalaTestDotty {
126
126
copyResourceDir(" scalatest/src/main/resources/org/scalatest" , " org/scalatest" , targetDir, List .empty)
127
127
}
128
128
129
- def genScala ( targetDir : File , version : String , scalaVersion : String ) : Seq [ File ] = {
130
- copyDir( " scalatest/src/main/scala/org/scalatest " , " org/scalatest " , targetDir,
131
- List (
129
+ val genScalaPackages : Map [ String , List [ String ]] =
130
+ Map (
131
+ " org/scalatest " -> List (
132
132
" Assertions.scala" , // Re-implemented
133
133
" AssertionsMacro.scala" , // Re-implemented
134
134
" CompileMacro.scala" , // Re-implemented
@@ -141,52 +141,50 @@ object GenScalaTestDotty {
141
141
" StreamlinedXml.scala" , // Hmm, not sure what to do with XML support, let's ask.
142
142
" StreamlinedXmlEquality.scala" , // Hmm, not sure what to do with XML support, let's ask.
143
143
" StreamlinedXmlNormMethods.scala" // Hmm, not sure what to do with XML support, let's ask.
144
- )
145
- ) ++
146
- copyDir(" scalatest/src/main/scala/org/scalatest/concurrent" , " org/scalatest/concurrent" , targetDir, List .empty) ++
147
- copyDir(" scalatest/src/main/scala/org/scalatest/diagrams" , " org/scalatest/diagrams" , targetDir,
148
- List (
144
+ ),
145
+ " org/scalatest/concurrent" -> List .empty,
146
+ " org/scalatest/diagrams" -> List (
149
147
" Diagrams.scala" ,
150
148
" DiagramsMacro.scala"
151
- )
152
- ) ++
153
- copyDir(" scalatest/src/main/scala/org/scalatest/exceptions" , " org/scalatest/exceptions" , targetDir, List .empty) ++
154
- copyDir(" scalatest/src/main/scala/org/scalatest/enablers" , " org/scalatest/enablers" , targetDir, List .empty) ++
155
- copyDir(" scalatest/src/main/scala/org/scalatest/events" , " org/scalatest/events" , targetDir, List .empty) ++
156
- copyDir(" scalatest/src/main/scala/org/scalatest/fixture" , " org/scalatest/fixture" , targetDir, List .empty) ++
157
- copyDir(" scalatest/src/main/scala/org/scalatest/featurespec" , " org/scalatest/featurespec" , targetDir, List .empty) ++
158
- copyDir(" scalatest/src/main/scala/org/scalatest/funspec" , " org/scalatest/funspec" , targetDir, List .empty) ++
159
- copyDir(" scalatest/src/main/scala/org/scalatest/funsuite" , " org/scalatest/funsuite" , targetDir, List .empty) ++
160
- copyDir(" scalatest/src/main/scala/org/scalatest/freespec" , " org/scalatest/freespec" , targetDir, List .empty) ++
161
- copyDir(" scalatest/src/main/scala/org/scalatest/flatspec" , " org/scalatest/flatspec" , targetDir, List .empty) ++
162
- copyDir(" scalatest/src/main/scala/org/scalatest/matchers" , " org/scalatest/matchers" , targetDir,
163
- List (
149
+ ),
150
+ " org/scalatest/exceptions" -> List .empty,
151
+ " org/scalatest/enablers" -> List .empty,
152
+ " org/scalatest/events" -> List .empty,
153
+ " org/scalatest/fixture" -> List .empty,
154
+ " org/scalatest/featurespec" -> List .empty,
155
+ " org/scalatest/funspec" -> List .empty,
156
+ " org/scalatest/funsuite" -> List .empty,
157
+ " org/scalatest/freespec" -> List .empty,
158
+ " org/scalatest/flatspec" -> List .empty,
159
+ " org/scalatest/matchers" -> List (
164
160
" Matcher.scala" , // Re-implemented with new macro
165
161
" MatchPatternMacro.scala" , // Re-implemented with new macro
166
162
" TypeMatcherMacro.scala" // Re-implemented with new macro
167
- )
168
- ) ++
169
- copyDir(" scalatest/src/main/scala/org/scalatest/matchers/dsl" , " org/scalatest/matchers/dsl" , targetDir,
170
- List (
163
+ ),
164
+ " org/scalatest/matchers/dsl" -> List (
171
165
" BeWord.scala" ,
172
166
" JavaCollectionWrapper.scala" ,
173
167
" JavaMapWrapper.scala" ,
174
168
" MatchPatternWord.scala" ,
175
169
" NotWord.scala" ,
176
170
" ResultOfNotWordForAny.scala"
177
- )
178
- ) ++
179
- copyDir(" scalatest/src/main/scala/org/scalatest/matchers/should" , " org/scalatest/matchers/should" , targetDir, List .empty) ++
180
- copyDir(" scalatest/src/main/scala/org/scalatest/path" , " org/scalatest/path" , targetDir, List .empty) ++
181
- copyDir(" scalatest/src/main/scala/org/scalatest/prop" , " org/scalatest/prop" , targetDir, List .empty) ++
182
- copyDir(" scalatest/src/main/scala/org/scalatest/propspec" , " org/scalatest/propspec" , targetDir, List .empty) ++
183
- copyDir(" scalatest/src/main/scala/org/scalatest/time" , " org/scalatest/time" , targetDir, List .empty) ++
184
- copyDir(" scalatest/src/main/scala/org/scalatest/verbs" , " org/scalatest/verbs" , targetDir, List .empty) ++
185
- copyDir(" scalatest/src/main/scala/org/scalatest/tools" , " org/scalatest/tools" , targetDir, List .empty) ++
186
- copyDir(" scalatest/src/main/scala/org/scalatest/refspec" , " org/scalatest/refspec" , targetDir, List .empty) ++
187
- copyDir(" scalatest/src/main/scala/org/scalatest/words" , " org/scalatest/words" , targetDir, List .empty) ++
188
- copyDir(" scalatest/src/main/scala/org/scalatest/wordspec" , " org/scalatest/wordspec" , targetDir, List .empty)
189
- }
171
+ ),
172
+ " org/scalatest/matchers/should" -> List .empty,
173
+ " org/scalatest/path" -> List .empty,
174
+ " org/scalatest/prop" -> List .empty,
175
+ " org/scalatest/propspec" -> List .empty,
176
+ " org/scalatest/time" -> List .empty,
177
+ " org/scalatest/verbs" -> List .empty,
178
+ " org/scalatest/tools" -> List .empty,
179
+ " org/scalatest/refspec" -> List .empty,
180
+ " org/scalatest/words" -> List .empty,
181
+ " org/scalatest/wordspec" -> List .empty
182
+ )
183
+
184
+ def genScala (targetDir : File , version : String , scalaVersion : String ): Seq [File ] =
185
+ genScalaPackages.flatMap { case (packagePath, skipList) =>
186
+ copyDir(" scalatest/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
187
+ }.toList
190
188
191
189
def genTest (targetDir : File , version : String , scalaVersion : String ): Seq [File ] = {
192
190
copyFiles(" scalatest-test/src/test/scala/org/scalatest" , " org/scalatest" , targetDir,
0 commit comments