mirror of
https://github.com/lscharen/iigs-sprite-compiler.git
synced 2025-08-15 04:27:29 +00:00
Improved code generation required reducing the optimal cost of the single-byte test
This commit is contained in:
@@ -64,7 +64,7 @@ namespace SpriteCompiler.Test
|
|||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var problem = SpriteGeneratorSearchProblem.CreateSearchProblem();
|
var problem = SpriteGeneratorSearchProblem.CreateSearchProblem();
|
||||||
var search = SpriteGeneratorSearchProblem.Create(80); // max budget of 80 cycles
|
var search = SpriteGeneratorSearchProblem.Create(); // max budget of 80 cycles
|
||||||
var sprite = new List<SpriteByte>
|
var sprite = new List<SpriteByte>
|
||||||
{
|
{
|
||||||
new SpriteByte(0x11, 0x00, 3),
|
new SpriteByte(0x11, 0x00, 3),
|
||||||
|
@@ -44,14 +44,14 @@ namespace SpriteCompiler.Test
|
|||||||
// TCS
|
// TCS
|
||||||
// SHORT A
|
// SHORT A
|
||||||
// LDA #$AA
|
// LDA #$AA
|
||||||
// STA 0,s
|
// PHA
|
||||||
// LONG A = 14 cycles
|
// LONG A = 13 cycles
|
||||||
|
|
||||||
// Write out the solution
|
// Write out the solution
|
||||||
WriteOutSolution(solution);
|
WriteOutSolution(solution);
|
||||||
|
|
||||||
Assert.AreEqual(5, solution.Count());
|
Assert.AreEqual(5, solution.Count());
|
||||||
Assert.AreEqual(14, (int)solution.Last().PathCost);
|
Assert.AreEqual(13, (int)solution.Last().PathCost);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
Reference in New Issue
Block a user