Skip to content

Commit

Permalink
Correcting the spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
prawalagarwal committed May 13, 2016
1 parent 8f14ad8 commit 3d7e3a2
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions Tasks/VsTest/Helpers.ps1
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
function CmdletHasMember {
[cmdletbinding()]
[OutputType([System.Boolean])]
param(
[string]$memberName
)
$publishParameters = (gcm Publish-TestResults).Parameters.Keys.Contains($memberName)
return $publishParameters
[cmdletbinding()]
[OutputType([System.Boolean])]
param(
[string]$memberName
)
$publishParameters = (gcm Publish-TestResults).Parameters.Keys.Contains($memberName)
return $publishParameters
}

function SetRegistryKeyForParallel {
[cmdletbinding()]
param(
[string]$vsTestVersion
)
$regkey = "HKCU\SOFTWARE\Microsoft\VisualStudio\" + $vsTestVersion + "_Config\FeatureFlags\TestingTools\UnitTesting\Taef"
reg add $regkey /v Value /t REG_DWORD /d 1 /f /reg:32 > $null
[cmdletbinding()]
param(
[string]$vsTestVersion
)
$regkey = "HKCU\SOFTWARE\Microsoft\VisualStudio\" + $vsTestVersion + "_Config\FeatureFlags\TestingTools\UnitTesting\Taef"
reg add $regkey /v Value /t REG_DWORD /d 1 /f /reg:32 > $null
}

function IsVisualStudio2015Update1OrHigherInstalled {
[cmdletbinding()]
[OutputType([System.Boolean])]
param(
[string]$vsTestVersion
)
if ([string]::IsNullOrWhiteSpace($vsTestVersion)){
$vsTestVersion = Locate-VSVersion
}
$version = [int]($vsTestVersion)
if($version -ge 14)
{
# checking for dll introduced in vs2015 update1
# since path of the dll will change in dev15+ using vstestversion>14 as a blanket yes
if((Test-Path -Path "$env:VS140COMNTools\..\IDE\CommonExtensions\Microsoft\TestWindow\TE.TestModes.dll") -Or ($version -gt 14))
{
# ensure the registry is set otherwise you need to launch VSIDE
SetRegistryKeyForParallel $vsTestVersion
return $true
}
}
return $false
[cmdletbinding()]
[OutputType([System.Boolean])]
param(
[string]$vsTestVersion
)
if ([string]::IsNullOrWhiteSpace($vsTestVersion)){
$vsTestVersion = Locate-VSVersion
}
$version = [int]($vsTestVersion)
if($version -ge 14)
{
# checking for dll introduced in vs2015 update1
# since path of the dll will change in dev15+ using vstestversion>14 as a blanket yes
if((Test-Path -Path "$env:VS140COMNTools\..\IDE\CommonExtensions\Microsoft\TestWindow\TE.TestModes.dll") -Or ($version -gt 14))
{
# ensure the registry is set otherwise you need to launch VSIDE
SetRegistryKeyForParallel $vsTestVersion
return $true
}
}
return $false
}

function SetupRunSettingsFileForParallel {
[cmdletbinding()]
[OutputType([System.String])]
param(
[string]$runInParallelFlag,
[string]$runSettingsFilePath,
[string]$defaultCpuCount
)
[cmdletbinding()]
[OutputType([System.String])]
param(
[string]$runInParallelFlag,
[string]$runSettingsFilePath,
[string]$defaultCpuCount
)

if($runInParallelFlag -eq "True")
{
if($runInParallelFlag -eq "True")
{
if([string]::Compare([io.path]::GetExtension($runSettingsFilePath), ".testsettings", $True) -eq 0)
{
Write-Warning "Run in Parallel is not supported with testsettings file."
Expand Down Expand Up @@ -101,7 +101,7 @@ function SetupRunSettingsFileForParallel {
}
}

return $runSettingsFilePath
return $runSettingsFilePath
}

function Get-SubKeysInFloatFormat($keys)
Expand Down

0 comments on commit 3d7e3a2

Please sign in to comment.