/// <summary> /// Initializes a new instance of the <see cref="LogWriter"/> class. /// </summary> /// <param name="logger">Serilog.ILogger.</param> /// <param name="writerHelper">Log Writer Helper.</param> public LogWriter( ILogger logger, LogWriterHelper writerHelper) { this.writerHelper = writerHelper; this.logger = logger; }
public void TestEmptyRom(string expectedAsm) { var emptyData = dataFactory.Create(); emptyData.Apis.AddIfDoesntExist(new SnesApi(emptyData)); var result = LogWriterHelper.ExportAssembly(emptyData); LogWriterHelper.AssertAssemblyOutputEquals(expectedAsm, result, debugWriter); }
public void TestAFewLines() { var data = CreateSampleData(); LogWriterHelper.AssertAssemblyOutputEquals(ExpectedRaw, LogWriterHelper.ExportAssembly(data, creator => { creator.Settings = new LogWriterSettings { OutputExtraWhitespace = false }; }), debugWriter); }
public static void RunTestRom() { // C# ROM -> Assembly Text var exportAssembly = LogWriterHelper.ExportAssembly(GetSampleData()).OutputStr; // Assembly Text -> Asar -> SFC file var bytes = AsarRunner.AssembleToRom(exportAssembly); Assert.Equal(0x8D, bytes[0]); Assert.Equal(0x16, bytes[1]); Assert.Equal(0x21, bytes[2]); Assert.Equal(3, bytes.Count); }
public void TestAFewLines() { LogWriterHelper.AssertAssemblyOutputEquals(ExpectedRaw, LogWriterHelper.ExportAssembly(InputRom)); }
public void TestOneLine() { var exportAssembly = LogWriterHelper.ExportAssembly(dataFactory.Create()); LogWriterHelper.AssertAssemblyOutputEquals(ExpectedRaw, exportAssembly); }