mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Aaru.Tests] Reformat and cleanup.
This commit is contained in:
@@ -16,30 +16,20 @@ public class Marshal
|
||||
{
|
||||
0x27, 0x50, 0x48, 0x53, 0x44, 0x31, 0x36, 0x47, 0x60, 0x01, 0x1a, 0x77, 0xd2, 0x01, 0x47, 0x01
|
||||
},
|
||||
new byte[]
|
||||
{
|
||||
0x02, 0x35, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00
|
||||
},
|
||||
new byte[]
|
||||
{
|
||||
0xba, 0xbe, 0xfa, 0xce
|
||||
},
|
||||
new byte[]
|
||||
{
|
||||
0xce, 0xfa, 0xad, 0xde
|
||||
}
|
||||
new byte[] { 0x02, 0x35, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00 }, new byte[] { 0xba, 0xbe, 0xfa, 0xce },
|
||||
new byte[] { 0xce, 0xfa, 0xad, 0xde }
|
||||
};
|
||||
|
||||
[Test]
|
||||
public void ConvertFromHexAscii()
|
||||
{
|
||||
for(int i = 0; i < _testStrings.Length; i++)
|
||||
for(var i = 0; i < _testStrings.Length; i++)
|
||||
{
|
||||
int count = Aaru.Helpers.Marshal.ConvertFromHexAscii(_testStrings[i], out byte[] buf);
|
||||
|
||||
Assert.AreEqual(_resultBytes[i].Length, buf.Length);
|
||||
Assert.AreEqual(_resultBytes[i].Length, count);
|
||||
Assert.AreEqual(_resultBytes[i], buf);
|
||||
Assert.AreEqual(_resultBytes[i], buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user