update tests, small fixes.

remove offset in bus.gain tests, higher

set expected/value for strip.label, lower.
This commit is contained in:
onyx-and-iris 2022-01-24 20:39:31 +00:00
parent 0a2733f865
commit be8e5a0e82
2 changed files with 14 additions and 8 deletions

View File

@ -109,12 +109,18 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
}
}
Context 'Bus, one physical, one virtual' -ForEach @(
@{ Index = 0; Offset = 30 }, @{ Index = 4; Offset = -3 }
Describe 'Bus tests' {
Context 'one physical, one virtual' -ForEach @(
@{ Index = 0 }, @{ Index = 4 }
){
It "Should set Strip[$index].Gain to $($value - $offset)" {
$vmr.bus[$index].gain = $($value - $offset)
$vmr.bus[$index].gain | Should -Be $($value - $offset)
Context 'gain' -ForEach @(
@{ Value = 5.2; Expected = 5.2 }, @{ Value = -38.2; Expected = -38.2 }
){
It "Should set Bus[$index].Gain to $value" {
$vmr.bus[$index].gain = $value
$vmr.bus[$index].gain | Should -Be $expected
}
}
}
}
}

View File

@ -33,7 +33,7 @@ Describe -Tag 'lower', -TestName 'All Lower Tests' {
){
It "Should set Strip[0].$param to 1" {
Param_Set -PARAM "Strip[$index].$param" -VALUE $value
Param_Get -PARAM "Strip[$index].$param" | Should -Be $value
Param_Get -PARAM "Strip[$index].$param" | Should -Be $expected
}
}
}
@ -48,7 +48,7 @@ Describe -Tag 'lower', -TestName 'All Lower Tests' {
){
It "Should set Strip[$index].Label to $value" {
Param_Set -PARAM "Strip[$index].Label" -VALUE $value
Param_Get -PARAM "Strip[$index].Label" -IS_STRING $true | Should -Be $value
Param_Get -PARAM "Strip[$index].Label" -IS_STRING $true | Should -Be $expected
}
}
}