diff --git a/BizHawk.sln b/BizHawk.sln index 12dd4ec6b3..e816b2e712 100644 --- a/BizHawk.sln +++ b/BizHawk.sln @@ -51,7 +51,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.WinForms.Controls", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{74391239-9BC1-40CE-A3D7-180737C5302A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Common.Tests", "src\BizHawk.Tests\BizHawk.Common.Tests.csproj", "{284E19E2-661D-4A7D-864A-AC2FC91E7C25}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Tests", "src\BizHawk.Tests\BizHawk.Tests.csproj", "{284E19E2-661D-4A7D-864A-AC2FC91E7C25}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/BizHawk.Client.Common/Properties/AssemblyInfo.cs b/src/BizHawk.Client.Common/Properties/AssemblyInfo.cs index 65864f6ebe..6dd6499e23 100644 --- a/src/BizHawk.Client.Common/Properties/AssemblyInfo.cs +++ b/src/BizHawk.Client.Common/Properties/AssemblyInfo.cs @@ -1,4 +1,5 @@ using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -19,3 +20,5 @@ using System.Runtime.InteropServices; // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("8281b376-a1d5-4157-97b8-dab7246ef4c8")] + +[assembly: InternalsVisibleTo("BizHawk.Tests")] \ No newline at end of file diff --git a/src/BizHawk.Tests/BizHawk.Common.Tests.csproj b/src/BizHawk.Tests/BizHawk.Tests.csproj similarity index 100% rename from src/BizHawk.Tests/BizHawk.Common.Tests.csproj rename to src/BizHawk.Tests/BizHawk.Tests.csproj diff --git a/src/BizHawk.Tests/Client.Common/Movie/LogGeneratorTests.cs b/src/BizHawk.Tests/Client.Common/Movie/LogGeneratorTests.cs new file mode 100644 index 0000000000..be56a09503 --- /dev/null +++ b/src/BizHawk.Tests/Client.Common/Movie/LogGeneratorTests.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using BizHawk.Client.Common; +using BizHawk.Emulation.Common; + +namespace BizHawk.Common.Tests.Client.Common.Movie +{ + [TestClass] + public class LogGeneratorTests + { + [TestMethod] + public void GenerateLogEntry_ExclamationForUnknownButtons() + { + var controller = new SimpleController + { + Definition = new ControllerDefinition + { + BoolButtons = new List {"Unknown Button"} + }, + ["Unknown Button"] = true + }; + + var lg = new Bk2LogEntryGenerator("NES", controller); + var actual = lg.GenerateLogEntry(); + Assert.IsNotNull(lg); + Assert.AreEqual("|!|", actual); + } + } +} \ No newline at end of file