white space

This commit is contained in:
Lars Brubaker 2015-12-22 16:44:54 -08:00
parent e46797d259
commit 695aa2d891
6 changed files with 247 additions and 247 deletions

View file

@ -11,18 +11,18 @@ using System.Xml.Linq;
namespace MatterControl.Tests
{
[TestFixture]
public class ReleaseBuildTests
{
private static Type debuggableAttribute = typeof(DebuggableAttribute);
[TestFixture]
public class ReleaseBuildTests
{
private static Type debuggableAttribute = typeof(DebuggableAttribute);
[Test, Category("ReleaseQuality")]
public void MatterControlAssemblyIsOptimized()
{
#if(!DEBUG)
[Test, Category("ReleaseQuality")]
public void MatterControlAssemblyIsOptimized()
{
#if (!DEBUG)
IsAssemblyOptimized(Assembly.Load("MatterControl, Culture=neutral, PublicKeyToken=null"));
#endif
}
}
[Test, Category("ReleaseQuality")]
public void MatterControlKnownAssembliesAreOptimized()
@ -100,9 +100,9 @@ namespace MatterControl.Tests
[Test, Category("ReleaseQuality")]
public void MatterControlDependenciesAreOptimized()
{
#if(!DEBUG)
public void MatterControlDependenciesAreOptimized()
{
#if (!DEBUG)
var matterControl = Assembly.Load("MatterControl, Culture=neutral, PublicKeyToken=null");
// Loop over all referenced assemblies to verify they are optimized and lack (symbols and Debug compile flag)
@ -121,27 +121,27 @@ namespace MatterControl.Tests
}
[Test, Category("ReleaseQuality")]
public void ClassicDebugComplicationFlagTests()
{
#if(!DEBUG)
public void ClassicDebugComplicationFlagTests()
{
#if (!DEBUG)
MatterControlApplication.CheckKnownAssemblyConditionalCompSymbols();
#endif
}
}
private static void IsAssemblyOptimized(Assembly assm)
{
var matchedAttributes = assm.GetCustomAttributes(debuggableAttribute, false);
var assemblyName = assm.GetName();
private static void IsAssemblyOptimized(Assembly assm)
{
var matchedAttributes = assm.GetCustomAttributes(debuggableAttribute, false);
var assemblyName = assm.GetName();
if (matchedAttributes.Count() == 0)
{
Assert.Inconclusive("Symbols likely missing from Release build: " + assemblyName.FullName + ". \r\n\r\nTo resolve the issue, switch Project Properties -> Build -> Advanced -> Debug Info property to 'pdb-only'");
}
if (matchedAttributes.Count() == 0)
{
Assert.Inconclusive("Symbols likely missing from Release build: " + assemblyName.FullName + ". \r\n\r\nTo resolve the issue, switch Project Properties -> Build -> Advanced -> Debug Info property to 'pdb-only'");
}
var debuggable = matchedAttributes.First() as DebuggableAttribute;
Assert.IsFalse(debuggable.IsJITOptimizerDisabled, "Referenced assembly is not optimized: " + assemblyName.Name);
Assert.IsFalse(debuggable.IsJITTrackingEnabled, "Referenced assembly is has symbols: " + assemblyName.Name);
Console.WriteLine("Assembly is optimized: " + assemblyName.Name);
}
}
var debuggable = matchedAttributes.First() as DebuggableAttribute;
Assert.IsFalse(debuggable.IsJITOptimizerDisabled, "Referenced assembly is not optimized: " + assemblyName.Name);
Assert.IsFalse(debuggable.IsJITTrackingEnabled, "Referenced assembly is has symbols: " + assemblyName.Name);
Console.WriteLine("Assembly is optimized: " + assemblyName.Name);
}
}
}