Skip to content

Commit

Permalink
feat: test against v9.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jun 12, 2024
1 parent 8fa6964 commit 2548f60
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 10 additions & 7 deletions LibAtem.MockTests/LibAtem.MockTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="log4net" Version="2.0.13" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="PcapngFile" Version="1.0.4" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="log4net" Version="2.0.17" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="PcapngFile" Version="1.0.5" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="1.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions LibAtem.MockTests/SdkState/SourceStateBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion LibAtem.MockTests/TestAuxiliaries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion LibAtem.MockTests/Util/AtemStateComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static IEnumerable<string> CompareObject(string name, IReadOnlyList<strin
}

if (state1.GetType() != state2.GetType())
Assert.True(false, "Mismatched types: " + state1.GetType().Name + ", " + state2.GetType().Name);
Assert.Fail("Mismatched types: " + state1.GetType().Name + ", " + state2.GetType().Name);

foreach (PropertyInfo prop in state1.GetType().GetProperties())
{
Expand Down

0 comments on commit 2548f60

Please sign in to comment.