From 930b387b859f4370aff31070412f5f13a8243eb1 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 21 Jun 2025 20:27:17 +0100 Subject: [PATCH] newContext now requires a StyleConfig, update tests. --- filter_test.go | 6 +++--- group_test.go | 8 ++++---- input_test.go | 8 ++++---- record_test.go | 6 +++--- replaybuffer_test.go | 6 +++--- scene_test.go | 4 ++-- sceneitem_test.go | 2 +- stream_test.go | 6 +++--- studiomode_test.go | 4 ++-- version_test.go | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/filter_test.go b/filter_test.go index 749b1f9..a805c4a 100644 --- a/filter_test.go +++ b/filter_test.go @@ -11,7 +11,7 @@ func TestFilterList(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &FilterListCmd{ SourceName: "Mic/Aux", @@ -30,7 +30,7 @@ func TestFilterListScene(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &FilterListCmd{ SourceName: "gobs-test", @@ -49,7 +49,7 @@ func TestFilterListEmpty(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &FilterListCmd{ SourceName: "NonExistentSource", diff --git a/group_test.go b/group_test.go index f3c34e1..f44a094 100644 --- a/group_test.go +++ b/group_test.go @@ -11,7 +11,7 @@ func TestGroupList(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &GroupListCmd{ SceneName: "Scene", @@ -30,7 +30,7 @@ func TestGroupShow(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &GroupShowCmd{ SceneName: "Scene", @@ -50,7 +50,7 @@ func TestGroupToggle(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdStatus := &GroupStatusCmd{ SceneName: "Scene", @@ -91,7 +91,7 @@ func TestGroupStatus(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdShow := &GroupShowCmd{ SceneName: "Scene", diff --git a/input_test.go b/input_test.go index 36ac5dc..4d1d967 100644 --- a/input_test.go +++ b/input_test.go @@ -11,7 +11,7 @@ func TestInputList(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &InputListCmd{} err := cmd.Run(context) @@ -39,7 +39,7 @@ func TestInputListFilterInput(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &InputListCmd{Input: true} err := cmd.Run(context) @@ -73,7 +73,7 @@ func TestInputListFilterOutput(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &InputListCmd{Output: true} err := cmd.Run(context) @@ -107,7 +107,7 @@ func TestInputListFilterColour(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &InputListCmd{Colour: true} err := cmd.Run(context) diff --git a/record_test.go b/record_test.go index e44b436..e9c49bb 100644 --- a/record_test.go +++ b/record_test.go @@ -12,7 +12,7 @@ func TestRecordStart(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdStatus := &RecordStatusCmd{} err := cmdStatus.Run(context) @@ -52,7 +52,7 @@ func TestRecordStop(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdStatus := &RecordStatusCmd{} err := cmdStatus.Run(context) @@ -92,7 +92,7 @@ func TestRecordToggle(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdStatus := &RecordStatusCmd{} err := cmdStatus.Run(context) diff --git a/replaybuffer_test.go b/replaybuffer_test.go index e55bae8..de112ad 100644 --- a/replaybuffer_test.go +++ b/replaybuffer_test.go @@ -11,7 +11,7 @@ func TestReplayBufferStart(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &ReplayBufferStartCmd{} err := cmd.Run(context) @@ -28,7 +28,7 @@ func TestReplayBufferStop(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &ReplayBufferStopCmd{} err := cmd.Run(context) @@ -45,7 +45,7 @@ func TestReplayBufferToggle(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdStatus := &ReplayBufferStatusCmd{} err := cmdStatus.Run(context) diff --git a/scene_test.go b/scene_test.go index 4ccab8f..94691b2 100644 --- a/scene_test.go +++ b/scene_test.go @@ -10,7 +10,7 @@ func TestSceneList(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &SceneListCmd{} err := cmd.Run(context) @@ -27,7 +27,7 @@ func TestSceneCurrent(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) // Set the current scene to "gobs-test" cmdSwitch := &SceneSwitchCmd{ diff --git a/sceneitem_test.go b/sceneitem_test.go index 53d4108..68296c2 100644 --- a/sceneitem_test.go +++ b/sceneitem_test.go @@ -11,7 +11,7 @@ func TestSceneItemList(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &SceneItemListCmd{ SceneName: "gobs-test", diff --git a/stream_test.go b/stream_test.go index b58cb17..b107023 100644 --- a/stream_test.go +++ b/stream_test.go @@ -12,7 +12,7 @@ func TestStreamStart(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdStatus := &StreamStatusCmd{} err := cmdStatus.Run(context) @@ -51,7 +51,7 @@ func TestStreamStop(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdStatus := &StreamStatusCmd{} err := cmdStatus.Run(context) @@ -90,7 +90,7 @@ func TestStreamToggle(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdStatus := &StreamStatusCmd{} err := cmdStatus.Run(context) diff --git a/studiomode_test.go b/studiomode_test.go index dac44f2..40adbc0 100644 --- a/studiomode_test.go +++ b/studiomode_test.go @@ -10,7 +10,7 @@ func TestStudioModeEnable(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdEnable := &StudioModeEnableCmd{} err := cmdEnable.Run(context) @@ -38,7 +38,7 @@ func TestStudioModeDisable(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmdDisable := &StudioModeDisableCmd{} err := cmdDisable.Run(context) diff --git a/version_test.go b/version_test.go index fa991e5..8955d1c 100644 --- a/version_test.go +++ b/version_test.go @@ -11,7 +11,7 @@ func TestVersion(t *testing.T) { defer disconnect() var out bytes.Buffer - context := newContext(client, &out, "") + context := newContext(client, &out, StyleConfig{}) cmd := &ObsVersionCmd{} err := cmd.Run(context)