Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some cleanup/simplification related to Tests namespace

  • Loading branch information...
commit 220b5c8de94f28e867c90fc817621651f173fdbf 1 parent 7767ce0
@nikhilk authored
View
9 src/Core/App/Application.cs
@@ -162,15 +162,6 @@ compile code.
CompilerOptions compilerOptions = CreateCompilerOptions(commandLine);
-#if DEBUG
- if (compilerOptions.InternalTestMode) {
- // HACK: Our tests are currently in the Tests subnamespace, which is now
- // used as a pattern for writing unit tests. This hack allows postponing
- // modifying all tests and baselines.
- compilerOptions.TestsSubnamespace = "UnitTests";
- }
-#endif // DEBUG
-
string errorMessage;
if (compilerOptions.Validate(out errorMessage) == false) {
ShowUsage(errorMessage);
View
4 src/Core/Compiler/Compiler/MetadataBuilder.cs
@@ -812,8 +812,8 @@ internal sealed class MetadataBuilder {
BuildType(typeSymbol, typeNode);
- if (namespaceSymbol.Name.EndsWith("." + _options.TestsSubnamespace, StringComparison.Ordinal) ||
- (namespaceSymbol.Name.IndexOf("." + _options.TestsSubnamespace + ".", StringComparison.Ordinal) > 0)) {
+ if (namespaceSymbol.Name.EndsWith(".Tests", StringComparison.Ordinal) ||
+ (namespaceSymbol.Name.IndexOf(".Tests.", StringComparison.Ordinal) > 0)) {
typeSymbol.SetTestType();
}
}
View
12 src/Core/Compiler/CompilerOptions.cs
@@ -26,8 +26,6 @@ public sealed class CompilerOptions {
private bool _minimize;
private ScriptInfo _scriptInfo;
- private string _testsSubnamespace;
-
private bool _hasTestTypes;
// TODO: Get rid of internal test mode/type...
@@ -36,7 +34,6 @@ public sealed class CompilerOptions {
public CompilerOptions() {
_scriptInfo = new ScriptInfo();
- _testsSubnamespace = "Tests";
}
public ICollection<string> Defines {
@@ -150,15 +147,6 @@ public sealed class CompilerOptions {
}
}
- public string TestsSubnamespace {
- get {
- return _testsSubnamespace;
- }
- set {
- _testsSubnamespace = value;
- }
- }
-
public bool Validate(out string errorMessage) {
errorMessage = String.Empty;
Please sign in to comment.
Something went wrong with that request. Please try again.