You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement SE-0129 to update the test naming conventions. Instead of
automatically and silently appending a `TestSuite` suffix, tests are
now expected to have a `Tests` suffix in the module name. Right now
we make sure there are no tests under `Sources` and no non-tests
under `Tests`, but we expect to lift that restriction in the future
to allow test support libraries etc.
return"the name of a test module has no ‘Tests’ suffix"
135
+
case.hasTestSuffix:
136
+
return"the name of a non-test module has a ‘Tests’ suffix"
137
+
}
138
+
}
139
+
varfix:String?{
140
+
switchself{
141
+
case.emptyName:
142
+
return"give the module a name"
143
+
case.noTestSuffix:
144
+
return"add a ‘Tests’ suffix"
145
+
case.hasTestSuffix:
146
+
return"remove the ‘Tests’ suffix"
147
+
}
148
+
}
149
+
}
150
+
151
+
108
152
extensionProduct{
109
153
/// An error in a product definition.
110
154
enumError:Swift.Error{
@@ -349,8 +393,26 @@ public struct PackageBuilder {
349
393
return modules
350
394
}
351
395
396
+
/// Private function that checks whether a module name is valid. This method doesn't return anything, but rather, if there's a problem, it throws an error describing what the problem is.
397
+
// FIXME: We will eventually be loosening this restriction to allow test-only libraries etc
/// Private function that constructs a single Module object for the moduel at `path`, having the name `name`. If `isTest` is true, the module is constructed as a test module; if false, it is a regular module.
0 commit comments