Skip to content

Commit

Permalink
Fixing test execution bug after removing sonarqube warinings
Browse files Browse the repository at this point in the history
  • Loading branch information
pavzaj committed Jan 31, 2017
1 parent 6804216 commit 678a0b3
Show file tree
Hide file tree
Showing 36 changed files with 130 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
<None Include="SampleLogic.ruleset" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\..\..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\..\..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.dll" />
<Analyzer Include="..\..\..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\..\..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\..\..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SonarAnalyzer.CSharp" version="1.20.1" targetFramework="net452" developmentDependency="true" />
<package id="SonarAnalyzer.CSharp" version="1.21.0" targetFramework="net452" developmentDependency="true" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
<Compile Include="SampleClass1Tests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SampleLogic\SampleLogic.csproj">
<Project>{46BC2CBB-8F2D-489F-87FD-E2E943D5F5AB}</Project>
<Name>SampleLogic</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
Expand Down
8 changes: 8 additions & 0 deletions Tests/VisualMutator.OperatorTests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@

<bindingRedirect oldVersion="0.0.0.0-3.1.1.0" newVersion="3.1.1.0" />
</dependentAssembly>
<dependentAssembly>

<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />

<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />

</dependentAssembly>

</assemblyBinding>
</runtime>
</configuration>
2 changes: 1 addition & 1 deletion Tests/VisualMutator.Tests/Infrastructure/ProcessTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[TestFixture]
public class ProcessTests
{
[Test, Ignore("What does it do?")]
[Test, Ignore("What it does?")]
public void Test1()
{
var processes = new Processes();
Expand Down
4 changes: 2 additions & 2 deletions Tests/VisualMutator.Tests/Util/TestProjects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public class TestProjects
public static readonly string AutoMapperTests = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), @"..\..\..\..\packages\AutoMapper.5.2.0\lib\net45\AutoMapper.dll"));

public static readonly string NUnitConsoleDirPath =
Path.GetFullPath(Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), @"..\..\..\..\packages\NUnit.ConsoleRunner.3.6.0\tools"));
Path.GetFullPath(Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), @"..\..\..\..\packages\NUnit.ConsoleRunner.3.5.0\tools"));

public static readonly string NUnitConsolePath =
Path.GetFullPath(Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), @"..\..\..\..\packages\NUnit.ConsoleRunner.3.6.0\tools\nunit3-console.exe"));
Path.GetFullPath(Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), @"..\..\..\..\packages\NUnit.ConsoleRunner.3.5.0\tools\nunit3-console.exe"));

public const string XUnitConsoleDirPath =
@"C:\PLIKI\VisualMutator\xunitconsole";
Expand Down
9 changes: 7 additions & 2 deletions Tests/VisualMutator.Tests/VisualMutator.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
<HintPath>..\..\packages\AutoMapper.5.2.0\lib\net45\AutoMapper.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="log4net, Version=2.0.7.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
Expand Down Expand Up @@ -305,6 +305,11 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>echo Nunit.Extensions &gt; $(TargetDir)nunit.nuget.addins
Expand Down
4 changes: 4 additions & 0 deletions Tests/VisualMutator.Tests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
Expand Down
3 changes: 2 additions & 1 deletion Tests/VisualMutator.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="adjunct-JetBrains.Annotations.Core" version="1.0.0" targetFramework="net45" />
<package id="AutoMapper" version="5.2.0" targetFramework="net461" />
<package id="Castle.Core" version="3.3.3" targetFramework="net461" />
<package id="Castle.Core" version="4.0.0" targetFramework="net461" />
<package id="log4net" version="2.0.7" targetFramework="net461" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net461" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net461" />
Expand All @@ -20,6 +20,7 @@
<package id="Roslyn.Services.Common" version="1.2.20906.2" targetFramework="net45" />
<package id="Roslyn.Services.CSharp" version="1.2.20906.2" targetFramework="net45" />
<package id="RunProcessAsTask" version="1.1.3" targetFramework="net461" />
<package id="SonarAnalyzer.CSharp" version="1.21.0" targetFramework="net461" developmentDependency="true" />
<package id="Strilanc.Value.May" version="1.0.2" targetFramework="net45" />
<package id="System.AppContext" version="4.3.0" targetFramework="net461" />
<package id="System.Collections" version="4.3.0" targetFramework="net461" />
Expand Down
4 changes: 4 additions & 0 deletions VisualMutator.Console/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
10 changes: 5 additions & 5 deletions VisualMutator.Console/VisualMutator.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
Expand Down Expand Up @@ -212,9 +212,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
4 changes: 2 additions & 2 deletions VisualMutator.Console/packages.config
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net45" />
<package id="Castle.Core" version="4.0.0" targetFramework="net461" />
<package id="CommandLineParser" version="1.9.71" targetFramework="net45" />
<package id="log4net" version="2.0.7" targetFramework="net461" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net461" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net461" />
<package id="Moq" version="4.5.30" targetFramework="net461" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net461" />
<package id="Ninject" version="3.2.2.0" targetFramework="net45" />
<package id="SonarAnalyzer.CSharp" version="1.20.1" targetFramework="net461" developmentDependency="true" />
<package id="SonarAnalyzer.CSharp" version="1.21.0" targetFramework="net461" developmentDependency="true" />
<package id="System.AppContext" version="4.3.0" targetFramework="net461" />
<package id="System.Collections" version="4.3.0" targetFramework="net461" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@
<None Include="VisualMutator.Extensibility.ruleset" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
2 changes: 1 addition & 1 deletion VisualMutator.Extensibility/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SonarAnalyzer.CSharp" version="1.20.1" targetFramework="net461" developmentDependency="true" />
<package id="SonarAnalyzer.CSharp" version="1.21.0" targetFramework="net461" developmentDependency="true" />
<package id="UsefulTools" version="1.0.0" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@
<None Include="VisualMutator.OperatorsObject.ruleset" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
2 changes: 1 addition & 1 deletion VisualMutator.OperatorsObject/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<packages>
<package id="LinqExtLibrary" version="1.0.4.2" targetFramework="net45" />
<package id="log4net" version="2.0.7" targetFramework="net461" />
<package id="SonarAnalyzer.CSharp" version="1.20.1" targetFramework="net461" developmentDependency="true" />
<package id="SonarAnalyzer.CSharp" version="1.21.0" targetFramework="net461" developmentDependency="true" />
<package id="UsefulTools" version="1.0.0" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class LCRVisitor : OperatorCodeVisitor
{
public override void Visit(IConditional cond)
{
var passes = new List<string>();
var boundCondition = cond.Condition as BoundExpression;

if (boundCondition != null && boundCondition.Type.TypeCode == PrimitiveTypeCode.Boolean)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
2 changes: 1 addition & 1 deletion VisualMutator.OperatorsStandard/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.7" targetFramework="net461" />
<package id="SonarAnalyzer.CSharp" version="1.20.1" targetFramework="net461" developmentDependency="true" />
<package id="SonarAnalyzer.CSharp" version="1.21.0" targetFramework="net461" developmentDependency="true" />
<package id="UsefulTools" version="1.0.0" targetFramework="net45" />
</packages>
Binary file modified VisualMutator.VSPackage.vsix
Binary file not shown.
10 changes: 10 additions & 0 deletions VisualMutator.VSPackage/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,15 @@ public Settings()
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}

private void SettingChangingEventHandler(object sender, SettingChangingEventArgs e)
{
// Add code to handle the SettingChangingEvent event here.
}

private void SettingsSavingEventHandler(object sender, CancelEventArgs e)
{
// Add code to handle the SettingsSaving event here.
}
}
}
10 changes: 5 additions & 5 deletions VisualMutator.VSPackage/VisualMutator.VSPackage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<WarningLevel>4</WarningLevel>
<CopyVsixExtensionFiles>False</CopyVsixExtensionFiles>
<Prefer32Bit>false</Prefer32Bit>
<DeployExtension>False</DeployExtension>
<CreateVsixContainer>False</CreateVsixContainer>
<DeployExtension>True</DeployExtension>
<CreateVsixContainer>True</CreateVsixContainer>
<CodeAnalysisRuleSet>VisualMutator.VSPackage.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Expand Down Expand Up @@ -357,9 +357,9 @@
</Content>
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.20.1\analyzers\SonarAnalyzer.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\Google.Protobuf.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.CSharp.dll" />
<Analyzer Include="..\packages\SonarAnalyzer.CSharp.1.21.0\analyzers\SonarAnalyzer.dll" />
</ItemGroup>
<PropertyGroup>
<UseCodebase>true</UseCodebase>
Expand Down
2 changes: 1 addition & 1 deletion VisualMutator.VSPackage/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<package id="Ninject.Extensions.ContextPreservation" version="3.2.0.0" targetFramework="net45" />
<package id="Ninject.Extensions.NamedScope" version="3.2.0.0" targetFramework="net45" />
<package id="RunProcessAsTask" version="1.1.3" targetFramework="net45" />
<package id="SonarAnalyzer.CSharp" version="1.20.1" targetFramework="net461" developmentDependency="true" />
<package id="SonarAnalyzer.CSharp" version="1.21.0" targetFramework="net461" developmentDependency="true" />
<package id="System.AppContext" version="4.3.0" targetFramework="net461" />
<package id="System.Collections" version="4.3.0" targetFramework="net461" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" />
Expand Down
2 changes: 2 additions & 0 deletions VisualMutator/Controllers/SessionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ public async Task RunCore()
IObjectRoot<TestingMutant> testingMutant = _testingMutantFactory
.CreateWithParams(_sessionEventsSubject, changelessMutant);

var result = await testingMutant.Get.RunAsync();

verifiEvents.Dispose();

_choices.MutantsTestingOptions.TestingTimeoutSeconds
Expand Down
2 changes: 2 additions & 0 deletions VisualMutator/Infrastructure/Processes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class Processes : IProcesses
{
private readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

private HashSet<CancellationTokenRegistration> registrations = new HashSet<CancellationTokenRegistration>();

public Task<ProcessResults> RunAsync(ProcessStartInfo processStartInfo)
{
return ProcessEx.RunAsync(processStartInfo);
Expand Down
13 changes: 13 additions & 0 deletions VisualMutator/Infrastructure/VisualStudioCodeElementsFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,18 @@ private string AppendMethodParameters(string methodName, IList<string> parameter
}
return methodName + ('(' + parameters.Aggregate((a, b) => a + ", " + b) + ')');
}

private string ConvertGenericNotation(string fullName)
{
string result = fullName;
var reg = new Regex(@"<(\w+,? *)+>");
var matches = reg.Matches(fullName);
foreach (Match match in matches.Cast<Match>())
{
var capturesCount = match.Groups[1].Captures.Cast<Capture>().Count();
result = result.Replace(match.Value, "`" + capturesCount);
}
return result;
}
}
}
5 changes: 5 additions & 0 deletions VisualMutator/Model/CciModuleSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ public CciModuleSource(string path) : this()
_moduleInfoList.Add(m);
}

private CciModuleSource(MetadataReaderHost host, IAssembly module) : this(host)
{
_moduleInfoList.Add(new ModuleInfo(module));
}

public MetadataReaderHost Host
{
get
Expand Down
2 changes: 1 addition & 1 deletion VisualMutator/Model/Mutations/MutantsContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public IList<AssemblyNode> InitMutantsForOperators(ProgressCounter percentComple
var mergedTargets = _mutationExecutor.FindTargets(module, subProgress);
var assemblyNode = BuildMutantsTree(module.Module.Name, mergedTargets);

_log.Info("Found total of: " + mergedTargets.Values.Count + " mutation targets in " + assemblyNode.Name);
_log.Info("Found total of: " + mergedTargets.Values.Count() + " mutation targets in " + assemblyNode.Name);

assNodes.Add(assemblyNode);
percentCompleted.Progress();
Expand Down
Loading

0 comments on commit 678a0b3

Please sign in to comment.