skyscraper8/skyscraper8.Tests/GsType1SanityTest.cs
feyris-tan 980cec0332
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 1m46s
Added sanity tests for BFBS BBFrames
2025-11-06 15:34:56 +01:00

21 lines
606 B
C#

using skyscraper5.Mpeg2;
using skyscraper8.Tests.Properties;
namespace skyscraper8.Tests;
public class GsType1SanityTest
{
[Fact]
public void CheckBfbsCrc()
{
byte[] blob = Resources.Frame00001343_TSGS1_MIS000_SYNC001;
MemoryStream ms = new MemoryStream(blob, false);
bool result = DvbCrc32.ValidateCrc(ms, 0, (int)ms.Length);
Assert.True(result);
blob = Resources.Frame00000008_TSGS1_MIS000_SYNC001;
ms = new MemoryStream(blob, false);
result = DvbCrc32.ValidateCrc(ms, 0, (int)ms.Length);
Assert.True(result);
}
}