public void GenerationTest() { // Arrange PvrtcGen.InitRandomSeed(1337 /* Magic value*/); int width = 256; int height = 256; PvrtcType pvrtcType = PvrtcType.Transparent4bit; bool generateHeader = true; byte[] pvrtcBytes = PvrtcGen.GeneratePvrtcByteArray(width, height, pvrtcType, generateHeader); // Act // Assert Assert.AreEqual(256 * 256 / 2 + 52, pvrtcBytes.Length); }
private static void RunTest() { // Generates output with following settings: PvrtcGen.InitRandomSeed(1337 /* Magic value*/); Program.width = 256; Program.height = 256; Program.pvrtcType = PvrtcType.Transparent4bit; Program.generateHeader = true; byte[] pvrtcBytes = PvrtcGen.GeneratePvrtcByteArray(width, height, pvrtcType, generateHeader); // Write bytes to output stream using (Stream outputStream = Console.OpenStandardOutput()) { outputStream.Write(pvrtcBytes, 0, pvrtcBytes.Length); } }