|
| 1 | +Clear-Host |
1 | 2 | if (-not $PSScriptRoot) { |
2 | 3 | $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent |
3 | 4 | } |
@@ -29,6 +30,37 @@ Describe 'Get-BuildConfiguration' { |
29 | 30 | Get-BuildConfiguration $Assembly |
30 | 31 | } |
31 | 32 |
|
| 33 | + $Job = Start-Job $RunAs32Bit -RunAs32 -Arg $Assembly |
| 34 | + $Job | Wait-Job | Receive-Job | Should -Be $Expected |
| 35 | + } |
| 36 | + } |
| 37 | +} |
| 38 | + |
| 39 | +Describe 'Test-JitOptimized' { |
| 40 | + Context "Check test DLLs - x64" { |
| 41 | + It "Given valid -Assembly '<Assembly>', it returns <Expected>" -TestCases @( |
| 42 | + @{ Assembly = "$PSScriptRoot\bin\Debug\AssemblyInfoTest.dll"; Expected = $false } |
| 43 | + @{ Assembly = "$PSScriptRoot\bin\Release\AssemblyInfoTest.dll"; Expected = $true } |
| 44 | + @{ Assembly = "$PSScriptRoot\bin\x64\Debug\AssemblyInfoTest.dll"; Expected = $false } |
| 45 | + @{ Assembly = "$PSScriptRoot\bin\x64\Release\AssemblyInfoTest.dll"; Expected = $true } |
| 46 | + ) { |
| 47 | + param ($Assembly, $Expected) |
| 48 | + Test-JitOptimized $Assembly | Should -Be $Expected |
| 49 | + } |
| 50 | + } |
| 51 | + |
| 52 | + Context "Check test DLLs - x86" { |
| 53 | + It "Given valid -Assembly '<Assembly>', it returns <Expected>" -TestCases @( |
| 54 | + @{ Assembly = "$PSScriptRoot\bin\x86\Debug\AssemblyInfoTest.dll"; Expected = $false } |
| 55 | + @{ Assembly = "$PSScriptRoot\bin\x86\Release\AssemblyInfoTest.dll"; Expected = $true } |
| 56 | + ) { |
| 57 | + param ($Assembly, $Expected) |
| 58 | + $RunAs32Bit = { |
| 59 | + param($Assembly) |
| 60 | + Import-Module .\DLLInfo\DLLInfo.psm1 -Force |
| 61 | + Test-JitOptimized $Assembly |
| 62 | + } |
| 63 | + |
32 | 64 | $Job = Start-Job $RunAs32Bit -RunAs32 -Arg $Assembly |
33 | 65 | $Job | Wait-Job | Receive-Job | Should -Be $Expected |
34 | 66 | } |
|
0 commit comments