diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-10-25 18:01:11 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-10-25 18:01:11 +0300 |
commit | d41e098831fad3c4326e5ce5a3560f776bcd76fe (patch) | |
tree | 54df02c66cbf225a55eb2d6737d42db60b4e3061 | |
parent | 78aefcbae05e609002accae257f7fb3299ff324c (diff) |
Multiplatform text compartion in tests.
-rw-r--r-- | Tests/Program.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Tests/Program.cs b/Tests/Program.cs index 6c12747..a2c1197 100644 --- a/Tests/Program.cs +++ b/Tests/Program.cs @@ -207,8 +207,8 @@ namespace com.clusterrr.Famicom.NesTiler.Tests Assert.That(File.ReadAllBytes(PalettePath(prefix, 2)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 2)))), "palette 2");
Assert.That(File.ReadAllBytes(PalettePath(prefix, 3)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 3)))), "palette 3");
- Assert.That(File.ReadAllBytes(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
- Assert.That(File.ReadAllBytes(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
+ Assert.That(File.ReadAllLines(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
+ Assert.That(File.ReadAllLines(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
}
public void DoTestSharedPattern(string imagePath1, string imagePath2)
@@ -247,8 +247,8 @@ namespace com.clusterrr.Famicom.NesTiler.Tests Assert.That(File.ReadAllBytes(PalettePath(prefix, 2)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 2)))), "palette 2");
Assert.That(File.ReadAllBytes(PalettePath(prefix, 3)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 3)))), "palette 3");
- Assert.That(File.ReadAllBytes(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
- Assert.That(File.ReadAllBytes(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
+ Assert.That(File.ReadAllLines(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
+ Assert.That(File.ReadAllLines(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
}
public void DoTestSplit2(string imagePath)
@@ -288,8 +288,8 @@ namespace com.clusterrr.Famicom.NesTiler.Tests Assert.That(File.ReadAllBytes(PalettePath(prefix, 2)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 2)))), "palette 2");
Assert.That(File.ReadAllBytes(PalettePath(prefix, 3)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 3)))), "palette 3");
- Assert.That(File.ReadAllBytes(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
- Assert.That(File.ReadAllBytes(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
+ Assert.That(File.ReadAllLines(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
+ Assert.That(File.ReadAllLines(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
}
public void DoTestSplit2Lossy(string imagePath)
@@ -330,8 +330,8 @@ namespace com.clusterrr.Famicom.NesTiler.Tests Assert.That(File.ReadAllBytes(PalettePath(prefix, 2)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 2)))), "palette 2");
Assert.That(File.ReadAllBytes(PalettePath(prefix, 3)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 3)))), "palette 3");
- Assert.That(File.ReadAllBytes(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
- Assert.That(File.ReadAllBytes(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
+ Assert.That(File.ReadAllLines(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
+ Assert.That(File.ReadAllLines(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
}
public void DoTestSplit4(string imagePath)
@@ -385,8 +385,8 @@ namespace com.clusterrr.Famicom.NesTiler.Tests Assert.That(File.ReadAllBytes(PalettePath(prefix, 2)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 2)))), "palette 2");
Assert.That(File.ReadAllBytes(PalettePath(prefix, 3)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 3)))), "palette 3");
- Assert.That(File.ReadAllBytes(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
- Assert.That(File.ReadAllBytes(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
+ Assert.That(File.ReadAllLines(TilesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, TilesCsvPath(prefix)))), "tiles CSV");
+ Assert.That(File.ReadAllLines(PalettesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, PalettesCsvPath(prefix)))), "palette CSV");
}
public void DoTestSprites8x8(string imagePath)
@@ -407,7 +407,7 @@ namespace com.clusterrr.Famicom.NesTiler.Tests Assert.That(File.ReadAllBytes(PatternTablePath(prefix, 0)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PatternTablePath(prefix, 0)))), "pattern table 0");
Assert.That(File.ReadAllBytes(PalettePath(prefix, 0)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 0)))), "palette 0");
- Assert.That(File.ReadAllBytes(SpritesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, SpritesCsvPath(prefix)))), "sprites CSV");
+ Assert.That(File.ReadAllLines(SpritesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, SpritesCsvPath(prefix)))), "sprites CSV");
}
public void DoTestSprites8x16(string imagePath)
@@ -428,7 +428,7 @@ namespace com.clusterrr.Famicom.NesTiler.Tests Assert.That(File.ReadAllBytes(PatternTablePath(prefix, 0)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PatternTablePath(prefix, 0)))), "pattern table 0");
Assert.That(File.ReadAllBytes(PalettePath(prefix, 0)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, PalettePath(prefix, 0)))), "palette 0");
- Assert.That(File.ReadAllBytes(SpritesCsvPath(prefix)), Is.EqualTo(File.ReadAllBytes(Path.Combine(ReferencesDir, SpritesCsvPath(prefix)))), "sprites CSV");
+ Assert.That(File.ReadAllLines(SpritesCsvPath(prefix)), Is.EqualTo(File.ReadAllLines(Path.Combine(ReferencesDir, SpritesCsvPath(prefix)))), "sprites CSV");
}
}
}
\ No newline at end of file |