mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-21 17:30:49 +00:00
more higher tests added
This commit is contained in:
parent
721fb53012
commit
c87c0768b8
1
.gitignore
vendored
1
.gitignore
vendored
@ -58,5 +58,6 @@ Gemfile.lock
|
||||
|
||||
# test
|
||||
quick.rb
|
||||
config.yaml
|
||||
|
||||
.vscode/
|
@ -387,19 +387,19 @@ get may return nil if no value for requested key in midi cache
|
||||
```ruby
|
||||
vm.apply(
|
||||
{
|
||||
strip_0: {
|
||||
"strip-0" => {
|
||||
mute: true,
|
||||
gain: 3.2,
|
||||
A1: true
|
||||
},
|
||||
bus_3: {
|
||||
"bus-3" => {
|
||||
gain: -3.2,
|
||||
eq: true
|
||||
},
|
||||
button_39: {
|
||||
"button-39" => {
|
||||
stateonly: true
|
||||
},
|
||||
vban_outstream_3: {
|
||||
"vban-outstream-3" => {
|
||||
on: true,
|
||||
bit: 24
|
||||
}
|
||||
|
@ -10,19 +10,19 @@ class StripTest < Minitest::Test
|
||||
end
|
||||
|
||||
class BusTest < Minitest::Test
|
||||
[false, true].each do |val|
|
||||
define_method("test_it_sets_and_gets_bus_#{Test.data.phys_out}_mute_#{val}") do
|
||||
Test.vm.bus[Test.data.phys_out].mute = val
|
||||
assert_equal(val, Test.vm.bus[Test.data.phys_out].mute)
|
||||
[-8.2, 3.2].each do |val|
|
||||
define_method("test_it_sets_and_gets_bus_#{Test.data.phys_out}_gain_#{val}") do
|
||||
Test.vm.bus[Test.data.phys_out].gain = val
|
||||
assert_equal(val, Test.vm.bus[Test.data.phys_out].gain)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class VbanTest < Minitest::Test
|
||||
[false, true].each do |val|
|
||||
define_method("test_it_sets_and_gets_vban_#{Test.data.phys_in}_on_#{val}") do
|
||||
Test.vm.vban.instream[0].on = val
|
||||
assert_equal(val, Test.vm.vban.instream[0].on)
|
||||
["test0", "test1"].each do |val|
|
||||
define_method("test_it_sets_and_gets_vban_#{Test.data.vban_in}_name_#{val}") do
|
||||
Test.vm.vban.instream[Test.data.vban_in].name = val
|
||||
assert_equal(val, Test.vm.vban.instream[Test.data.vban_in].name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,15 @@
|
||||
require_relative "../minitest_helper"
|
||||
|
||||
class SetGetParamTest < Minitest::Test
|
||||
def test_it_sets_and_gets_float_parameter
|
||||
Test.vm.set("Fx.Reverb.On", 1)
|
||||
assert_equal(1, Test.vm.get("Fx.Reverb.On"))
|
||||
end
|
||||
end
|
||||
|
||||
class SetGetButtonTest < Minitest::Test
|
||||
def test_it_sets_and_gets_macrobutton_parameter
|
||||
Test.vm.set_buttonstatus(0, 3, 1) # button0, trigger, true
|
||||
assert_equal(1, Test.vm.get_buttonstatus(0, 3))
|
||||
end
|
||||
end
|
@ -11,9 +11,18 @@ class Test
|
||||
@vm
|
||||
end
|
||||
|
||||
TestMap = Data.define(:name, :phys_in, :virt_in, :phys_out, :virt_out, :button_lower, :button_higher)
|
||||
TestMap = Data.define(:name, :phys_in, :virt_in, :phys_out, :virt_out, :button_lower, :button_higher, :vban_in, :vban_out)
|
||||
|
||||
@data = TestMap.new(@vm.kind.name, @vm.kind.phys_in - 1, @vm.kind.virt_in - 1, @vm.kind.phys_out - 1, @vm.kind.virt_out - 1, 0, 79)
|
||||
@data = TestMap.new(
|
||||
@vm.kind.name,
|
||||
@vm.kind.phys_in - 1,
|
||||
@vm.kind.virt_in - 1,
|
||||
@vm.kind.phys_out - 1,
|
||||
@vm.kind.virt_out - 1,
|
||||
0, 79,
|
||||
@vm.kind.vban[0] - 1,
|
||||
@vm.kind.vban[1] - 1
|
||||
)
|
||||
|
||||
def self.data
|
||||
@data
|
||||
|
Loading…
Reference in New Issue
Block a user