Extract tests to dedicated assemblies

This commit is contained in:
John Lewin 2015-05-05 07:25:47 -07:00
parent 939bafa214
commit 314496ba7b
21 changed files with 658 additions and 242 deletions

View file

@ -99,11 +99,6 @@ namespace MatterHackers.MatterControl
string commandUpper = command.ToUpper();
switch (commandUpper)
{
case "TEST":
Testing.TestingDispatch testDispatch = new Testing.TestingDispatch();
testDispatch.RunTests();
return;
case "FORCE_SOFTWARE_RENDERING":
forceSofwareRendering = true;
GL.ForceSoftwareRendering();
@ -259,13 +254,6 @@ namespace MatterHackers.MatterControl
}
#endif
MatterHackers.PolygonMesh.UnitTests.UnitTests.Run();
MatterHackers.RayTracer.UnitTests.Run();
MatterHackers.Agg.Tests.UnitTests.Run();
MatterHackers.VectorMath.Tests.UnitTests.Run();
MatterHackers.Agg.UI.Tests.UnitTests.Run();
MatterHackers.MatterControl.Slicing.Tests.UnitTests.Run();
// you can turn this on to debug some bounds issues
//GuiWidget.DebugBoundsUnderMouse = true;
}
@ -637,5 +625,33 @@ namespace MatterHackers.MatterControl
base.OnClosing(out CancelClose);
}
}
private static void AssertDebugNotDefined()
{
#if DEBUG
throw new Exception("DEBUG is defined and should not be!");
#endif
}
public static void CheckKnownAssemblyConditionalCompSymbols()
{
MatterControlApplication.AssertDebugNotDefined();
MatterHackers.GCodeVisualizer.GCodeFile.AssertDebugNotDefined();
MatterHackers.Agg.Graphics2D.AssertDebugNotDefined();
MatterHackers.Agg.UI.SystemWindow.AssertDebugNotDefined();
ClipperLib.Clipper.AssertDebugNotDefined();
MatterHackers.Csg.Utilities.AssertDebugNotDefined();
MatterHackers.Agg.ImageProcessing.InvertLightness.AssertDebugNotDefined();
MatterHackers.Localizations.TranslationMap.AssertDebugNotDefined();
MatterHackers.MarchingSquares.MarchingSquaresByte.AssertDebugNotDefined();
MatterHackers.MatterControl.PluginSystem.MatterControlPlugin.AssertDebugNotDefined();
MatterHackers.MatterSlice.MatterSlice.AssertDebugNotDefined();
MatterHackers.MeshVisualizer.MeshViewerWidget.AssertDebugNotDefined();
MatterHackers.RenderOpenGl.GLMeshTrianglePlugin.AssertDebugNotDefined();
}
}
}