From f1eeadb7f3339212cae6e894a8d155c9f5e10b2d Mon Sep 17 00:00:00 2001 From: Lucas Scharenbroich Date: Tue, 29 Nov 2016 00:54:37 -0600 Subject: [PATCH] Simple fix for correcting unit tests --- SpriteCompiler.Test/Tests.cs | 4 ++-- SpriteCompiler/Problem/CodeSequence.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SpriteCompiler.Test/Tests.cs b/SpriteCompiler.Test/Tests.cs index de2b443..30a1cef 100644 --- a/SpriteCompiler.Test/Tests.cs +++ b/SpriteCompiler.Test/Tests.cs @@ -47,10 +47,10 @@ namespace SpriteCompiler.Test // LONG A = 14 cycles Assert.AreEqual(5, solution.Count()); - Assert.AreEqual(14, solution.First().PathCost); + Assert.AreEqual(14, (int)solution.Last().PathCost); // Write out the solution - foreach (var step in solution) + foreach (var step in solution.Skip(1)) { Trace.WriteLine(step.Action.ToString()); } diff --git a/SpriteCompiler/Problem/CodeSequence.cs b/SpriteCompiler/Problem/CodeSequence.cs index 7dc3d3b..bc58162 100644 --- a/SpriteCompiler/Problem/CodeSequence.cs +++ b/SpriteCompiler/Problem/CodeSequence.cs @@ -25,7 +25,7 @@ namespace SpriteCompiler.Problem // Helper function for ToString implementations protected string FormatLine(string label, string opcode, string operand, string comment) { - return String.Format("{0}\t{1}\t{2}\t; {3}"); + return String.Format("{0}\t{1}\t{2}\t; {3}", label, opcode, operand, comment); } }