Skip to content

Commit

Permalink
Merge branch 'master' into github_master
Browse files Browse the repository at this point in the history
  • Loading branch information
martin211 committed Feb 1, 2023
2 parents ea350de + 57031d3 commit c5ae9d2
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 26 deletions.
4 changes: 2 additions & 2 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
<PackageReference Include="NuGet.CommandLine" Version="6.3.0">
<PackageReference Include="NuGet.CommandLine" Version="6.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nuke.Common" Version="6.2.1" />
<PackageReference Include="Nuke.Common" Version="6.3.0" />
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
<PackageDownload Include="dotnet-sonarscanner" Version="[5.4.1]" />
<PackageDownload Include="GitVersion.Tool" Version="[5.11.1]" />
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "6.0.403"
"version": "7.0.102"
}
}
9 changes: 9 additions & 0 deletions src/Plugins/dotnet_menu/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"profiles": {
"AIMP5.10.2414": {
"commandName": "Executable",
"executablePath": "F:\\code\\aimp\\AIMP5.10.2414\\AIMP.exe",
"workingDirectory": "F:\\code\\aimp\\AIMP5.10.2414\\"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public enum ParentMenuType
MlMainDB = 60,

/// <summary>
/// The ml main funtions
/// The ml main functions
/// </summary>
MlMainFunctions = 61,

Expand Down
2 changes: 1 addition & 1 deletion src/SDK/aimp_dotnet/SDK/PropertyListHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ ActionResultType PropertyListExtension::GetBool(IAIMPPropertyList* propertyList,
int val = 0;
const auto result = Utils::CheckResult(propertyList->GetValueAsInt32(propertyId, &val));
VALIDATE_RESULT(result, "Unable to get a Bool property.")
value = val > 0;
value = val != 0;
return result;
}

Expand Down
15 changes: 6 additions & 9 deletions src/Tests/IntegrationTests/AimpTestRunner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,14 @@
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.engine, Version=3.15.2.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.Engine.3.15.2\lib\net20\nunit.engine.dll</HintPath>
<Reference Include="nunit.engine, Version=3.16.2.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.Engine.3.16.2\lib\net462\nunit.engine.dll</HintPath>
</Reference>
<Reference Include="nunit.engine.api, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.Engine.3.15.2\lib\net20\nunit.engine.api.dll</HintPath>
<HintPath>..\..\packages\NUnit.Engine.3.16.2\lib\net462\nunit.engine.api.dll</HintPath>
</Reference>
<Reference Include="nunit.engine.core, Version=3.15.2.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.Engine.3.15.2\lib\net20\nunit.engine.core.dll</HintPath>
<Reference Include="nunit.engine.core, Version=3.16.2.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.Engine.3.16.2\lib\net462\nunit.engine.core.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.13.3.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -101,7 +98,7 @@
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="testcentric.engine.metadata, Version=1.7.1.0, Culture=neutral, PublicKeyToken=6fe0a02d2036aa1d, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.Engine.3.15.2\lib\net20\testcentric.engine.metadata.dll</HintPath>
<HintPath>..\..\packages\NUnit.Engine.3.16.2\lib\net462\testcentric.engine.metadata.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/IntegrationTests/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<CopyScriptPath>$(SolutionDir)..\nuget\tools\CopyPlugin.ps1</CopyScriptPath>
<AimpVersion>AIMP5.03.2398</AimpVersion>
<AimpVersion>AIMP5.10.2414</AimpVersion>
</PropertyGroup>

<Target Name="CopyPlugin" AfterTargets="Build" Condition="'$(Configuration)'=='DEBUG'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,45 @@ public void DeleteChildren_ShouldDeleteChildrenItems()
parent.Id = Guid.NewGuid().ToString();
parent.Name = "Parent item";

var result = Player.ServiceMenuManager.Add(ParentMenuType.CommonUtilities, parent);

AimpAssert.AreEqual(ActionResultType.OK, result.ResultType, "Add item to menu");

var child = Player.Core.CreateAimpObject<IAimpMenuItem>().Result;
child.Id = Guid.NewGuid().ToString();
child.Name = "Child item";
child.Parent = parent;

var result = Player.ServiceMenuManager.Add(ParentMenuType.CommonUtilities, parent);

AimpAssert.AreEqual(ActionResultType.OK, result.ResultType, "Add item to menu");

result = parent.DeleteChildren();
AimpAssert.AreEqual(ActionResultType.OK, result.ResultType, "Delete child items");
});
}

[Test]
public void Enabled_True_ShouldBeCorrect()
{
ExecuteInMainThread(() =>
{
var item = Player.Core.CreateAimpObject<IAimpMenuItem>().Result;
item.Id = Guid.NewGuid().ToString();
item.Name = "Parent item";

item.Enabled = true;
AimpAssert.IsTrue(item.Enabled);
});
}

[Test]
public void Enabled_False_ShouldBeCorrect()
{
ExecuteInMainThread(() =>
{
var item = Player.Core.CreateAimpObject<IAimpMenuItem>().Result;
item.Id = Guid.NewGuid().ToString();
item.Name = "Parent item";

item.Enabled = false;
AimpAssert.IsFalse(item.Enabled);
});
}
}
6 changes: 1 addition & 5 deletions src/Tests/IntegrationTests/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="nunit.engine.core" publicKeyToken="2638cd05610744eb" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.15.2.0" newVersion="3.15.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.16.2.0" newVersion="3.16.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
3 changes: 1 addition & 2 deletions src/Tests/IntegrationTests/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="NUnit" version="3.13.2" targetFramework="net48" />
<package id="NUnit.Engine" version="3.15.2" targetFramework="net48" />
<package id="NUnit.Engine" version="3.16.2" targetFramework="net48" />
<package id="System.Diagnostics.Contracts" version="4.3.0" targetFramework="net48" />
</packages>

0 comments on commit c5ae9d2

Please sign in to comment.