From 2548f60e09f23a302a7c13b0c4e9b84397c39699 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Wed, 12 Jun 2024 06:38:32 +0100 Subject: [PATCH] feat: test against v9.5.0 --- .github/workflows/test.yml | 4 ++-- LibAtem.MockTests/LibAtem.MockTests.csproj | 17 ++++++++++------- .../SdkState/SourceStateBuilder.cs | 3 +-- LibAtem.MockTests/TestAuxiliaries.cs | 2 +- LibAtem.MockTests/Util/AtemStateComparer.cs | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cbb0d9..7b7a704 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,6 +44,6 @@ jobs: - name: Test run: | $Env:WORKFLOW_VERSION = 'v8.1.1' - regsvr32 $Env:GITHUB_WORKSPACE/AtemSDK/v8.3.0/BMDSwitcherAPI.dll /s - regsvr32 $Env:GITHUB_WORKSPACE/AtemSDK/v8.3.0/BMDSwitcherAPI64.dll /s + # regsvr32 $Env:GITHUB_WORKSPACE/AtemSDK/v9.5.0/BMDSwitcherAPI.dll /s + regsvr32 $Env:GITHUB_WORKSPACE/AtemSDK/v9.5.0/BMDSwitcherAPI64.dll /s dotnet test LibAtem.MockTests -c Release diff --git a/LibAtem.MockTests/LibAtem.MockTests.csproj b/LibAtem.MockTests/LibAtem.MockTests.csproj index dbb0b1f..3c98fff 100644 --- a/LibAtem.MockTests/LibAtem.MockTests.csproj +++ b/LibAtem.MockTests/LibAtem.MockTests.csproj @@ -17,16 +17,19 @@ - - - - - - + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/LibAtem.MockTests/SdkState/SourceStateBuilder.cs b/LibAtem.MockTests/SdkState/SourceStateBuilder.cs index 39a2f75..6c92a81 100644 --- a/LibAtem.MockTests/SdkState/SourceStateBuilder.cs +++ b/LibAtem.MockTests/SdkState/SourceStateBuilder.cs @@ -55,8 +55,7 @@ private static InputState BuildOne(IBMDSwitcherInput props) state.Properties.ShortName = name; props.GetLongName(out string longName); state.Properties.LongName = longName; - int isDefault = 0; - props.AreNamesDefault(ref isDefault); + props.AreNamesDefault(out int isDefault); state.Properties.AreNamesDefault = isDefault != 0; props.IsProgramTallied(out int progTally); state.Tally.ProgramTally = progTally != 0; diff --git a/LibAtem.MockTests/TestAuxiliaries.cs b/LibAtem.MockTests/TestAuxiliaries.cs index 6466c9f..aa02bb0 100644 --- a/LibAtem.MockTests/TestAuxiliaries.cs +++ b/LibAtem.MockTests/TestAuxiliaries.cs @@ -41,7 +41,7 @@ public void TestSource() // GetInputAvailabilityMask is used when checking if another input can be used for this output. // We track this another way aux.GetInputAvailabilityMask(out _BMDSwitcherInputAvailability availabilityMask); - Assert.Equal(availabilityMask, (_BMDSwitcherInputAvailability)((int)SourceAvailability.Auxiliary << 2)); + Assert.Equal((_BMDSwitcherInputAvailability)((int)SourceAvailability.Auxiliary << 2), availabilityMask); AtemState stateBefore = helper.Helper.BuildLibState(); diff --git a/LibAtem.MockTests/Util/AtemStateComparer.cs b/LibAtem.MockTests/Util/AtemStateComparer.cs index 0683e1f..baa68ed 100644 --- a/LibAtem.MockTests/Util/AtemStateComparer.cs +++ b/LibAtem.MockTests/Util/AtemStateComparer.cs @@ -53,7 +53,7 @@ public static IEnumerable CompareObject(string name, IReadOnlyList