Ejemplo n.º 1
0
 private static void ShowExportResults(LogCreatorOutput.OutputResult result)
 {
     if (result.ErrorCount > 0)
     {
         MessageBox.Show("Disassembly created with errors. See errors.txt for details.", "Warning",
                         MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         MessageBox.Show("Disassembly created successfully!", "Complete", MessageBoxButtons.OK,
                         MessageBoxIcon.Asterisk);
     }
 }
Ejemplo n.º 2
0
    private void WriteAssemblyOutput(LogWriterSettings settings, bool showProgressBarUpdates = false)
    {
        var lc = new LogCreator
        {
            Settings = settings,
            Data     = new LogCreatorByteSource(Project.Data),
        };

        LogCreatorOutput.OutputResult result = null;
        DoLongRunningTask(() => result = lc.CreateLog(), "Exporting assembly source code...");

        ProjectView.OnExportFinished(result);
    }
Ejemplo n.º 3
0
        public static void AssertAssemblyOutputEquals(string expectedRaw, LogCreatorOutput.OutputResult result, ITestOutputHelper testOutputHelper = null)
        {
            testOutputHelper?.WriteLine("** EXPECTED **");
            testOutputHelper?.WriteLine(expectedRaw);

            testOutputHelper?.WriteLine("** ACTUAL **");
            testOutputHelper?.WriteLine(result.OutputStr);

            AssertGoodOutput(result);

            // parse the output so we can better pinpoint where errors are
            var expectedOut = ParseAll(expectedRaw);
            var actualOut   = ParseAll(result.OutputStr);

            AssertAssemblyOutputEqual(expectedOut, actualOut);

            // now that the parsed version passed, compare the raw strings
            // if you hit this and not the above section, your whitespace might be off.
            Assert.Equal(expectedRaw, result.OutputStr);
        }
Ejemplo n.º 4
0
 private static void AssertGoodOutput(LogCreatorOutput.OutputResult result)
 {
     Assert.True(result.LogCreator != null);
     Assert.True(result.OutputStr != null);
     Assert.True(result.ErrorCount == 0);
 }
Ejemplo n.º 5
0
 public void OnExportFinished(LogCreatorOutput.OutputResult result)
 {
     ShowExportResults(result);
 }