Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    public void TestAFewLines()
    {
        var data = CreateSampleData();

        LogWriterHelper.AssertAssemblyOutputEquals(ExpectedRaw, LogWriterHelper.ExportAssembly(data, creator =>
        {
            creator.Settings = new LogWriterSettings
            {
                OutputExtraWhitespace = false
            };
        }), debugWriter);
    }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public void TestAFewLines()
 {
     LogWriterHelper.AssertAssemblyOutputEquals(ExpectedRaw, LogWriterHelper.ExportAssembly(InputRom));
 }
Esempio n. 5
0
    public void TestOneLine()
    {
        var exportAssembly = LogWriterHelper.ExportAssembly(dataFactory.Create());

        LogWriterHelper.AssertAssemblyOutputEquals(ExpectedRaw, exportAssembly);
    }