2022-06-25 01:03:08 +01:00
|
|
|
package voicemeeter_test
|
|
|
|
|
|
|
|
import (
|
2022-08-23 03:35:34 +01:00
|
|
|
"log"
|
2022-06-25 01:03:08 +01:00
|
|
|
"testing"
|
|
|
|
|
2022-07-09 19:01:58 +01:00
|
|
|
"github.com/onyx-and-iris/voicemeeter-api-go"
|
2022-06-25 01:03:08 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2022-09-14 16:05:15 +01:00
|
|
|
vm, err = voicemeeter.NewRemote("potato", 30)
|
2022-06-25 01:03:08 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
2022-08-23 03:16:43 +01:00
|
|
|
if err != nil {
|
2022-08-23 03:35:34 +01:00
|
|
|
log.Fatal(err)
|
2022-08-23 03:16:43 +01:00
|
|
|
}
|
2022-06-30 23:08:35 +01:00
|
|
|
|
2022-09-14 16:05:15 +01:00
|
|
|
err = vm.Login()
|
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
2022-06-30 23:08:35 +01:00
|
|
|
}
|
2022-09-14 16:05:15 +01:00
|
|
|
defer vm.Logout()
|
|
|
|
|
|
|
|
m.Run()
|
2022-06-30 23:08:35 +01:00
|
|
|
}
|