public async void NewToOldHexWriteEquivalency() { /* * * Get sample file, write to the contents, and then re import them to see if they are equivalent * */ var path = Environment.CurrentDirectory + @"\TargetFileOld.txt"; var i = 0; var data = "1"; // Old HexFunctionsVb.WriteHEX(ref path, ref i, ref data); var path2 = Environment.CurrentDirectory + @"\TargetFile2Old.txt"; var i2 = 0; var data2 = "1"; // New HexFunctions.WriteHex(ref path2, ref i2, ref data2); // Strings should contain the newly written file contents var text = File.ReadLines(path); var text2 = File.ReadLines(path2); Assert.Equal(text, text2); }
public async void NewToOldReversHexEquivalency() { var data = "the quick brown fox"; var result = HexFunctionsVb.ReverseHEX(ref data); var data2 = "the quick brown fox"; var newResult = HexFunctions.ReverseHex(ref data2); Assert.Equal(result, newResult); }
public async void NewToOldReversHexStreamEquivalency() { var data = "the quick brown fox"; var result = HexFunctionsVb.ReverseHEX(ref data); var data2 = "the quick brown fox"; // var newResult = await new BaseHexReverse().ReverseAsync(data2); // Assert.Equal(result, newResult); }
public async void NewToOldHexReadEquivalency() { var path = @"E:\1986 - Pokemon Emerald (U)(TrashMan).gba"; var i = 0; var length = 500; // New var hexOriginal = HexFunctions.ReadHex(ref path, ref i, ref length); // Old var hexVb = HexFunctionsVb.ReadHEX(ref path, ref i, ref length); Assert.Equal(hexOriginal, hexVb); }