Added some code coverage Tests for Docsis Annex C.
Some checks failed
🚀 Pack skyscraper8 / make-zip (push) Failing after 3m0s

This commit is contained in:
feyris-tan 2025-11-07 13:21:38 +01:00
parent 5cd08b978d
commit fc8053451a
6 changed files with 238 additions and 179 deletions

View File

@ -1,100 +0,0 @@
using skyscraper5.Mpeg2;
using skyscraper5.Skyscraper.IO;
using skyscraper5.Skyscraper.Scraper.StreamAutodetection.Contestants;
using skyscraper8.Ses;
using skyscraper8.Tests.ClassDependencies.AsraBarkerTransponderTests;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace skyscraper8.Tests
{
public class AstraBarkerTransponderTests
{
private const string BARKER_TRANSPONDER_FILE_PATH = "C:\\Temp\\Astra1_12604_v_SGT-000000.ts";
private Stream GetBarkerTransponder()
{
FileInfo fi = new FileInfo(BARKER_TRANSPONDER_FILE_PATH);
if (!fi.Exists)
{
Debug.WriteLine(String.Format("Could not find file: {0}", BARKER_TRANSPONDER_FILE_PATH));
return null;
}
return fi.OpenRead();
}
[Fact]
public void TestAstraSdt()
{
Stream stream = GetBarkerTransponder();
Skip.If(stream == null, "Barker Transponder stream not available.");
SdtContestant contestant = new SdtContestant(0x002d);
TsDescriptorUnpacker descriptorUnpacker = TsDescriptorUnpacker.GetInstance();
for (byte i = 0x80; i < 0xfe; i++)
{
descriptorUnpacker.SetUserDefined(i, true);
}
descriptorUnpacker.SetUserDefined(0xfe, true);
TsContext tsContext = new TsContext();
tsContext.FilterChain = new List<skyscraper5.src.Mpeg2.PacketFilter.IPacketFilter>();
tsContext.FilterChain.Add(new DummyFilter());
tsContext.RegisterPacketProcessor(0x002d, contestant.PacketProcessor);
byte[] buffer = new byte[188];
while (stream.GetAvailableBytes() >= 188)
{
stream.Read(buffer, 0, 188);
tsContext.PushPacket(buffer);
if (contestant.Score >= 10)
break;
}
stream.Close();
}
[Fact]
public void TestAstraLcn()
{
Stream stream = GetBarkerTransponder();
Skip.If(stream == null, "Barker Transponder stream not available.");
SgtCandidate contestant = new SgtCandidate(0x0777);
SgtCandidate contestant2 = new SgtCandidate(0x0776);
TsDescriptorUnpacker descriptorUnpacker = TsDescriptorUnpacker.GetInstance();
for (byte i = 0x80; i < 0xfe; i++)
{
descriptorUnpacker.SetUserDefined(i, true);
}
descriptorUnpacker.SetUserDefined(0xfe, true);
TsContext tsContext = new TsContext();
tsContext.FilterChain = new List<skyscraper5.src.Mpeg2.PacketFilter.IPacketFilter>();
tsContext.FilterChain.Add(new DummyFilter());
tsContext.RegisterPacketProcessor(0x0777, contestant.PacketProcessor);
tsContext.RegisterPacketProcessor(0x0776, contestant2.PacketProcessor);
byte[] buffer = new byte[188];
while (stream.GetAvailableBytes() >= 188)
{
stream.Read(buffer, 0, 188);
tsContext.PushPacket(buffer);
bool winnerA = contestant.Score >= 10;
bool winnerB = contestant2.Score >= 10;
if (winnerA)
{
if (winnerB)
{
return;
}
}
}
stream.Close();
}
}
}

View File

@ -1,69 +0,0 @@
using skyscraper5.Mpeg2;
using skyscraper5.Skyscraper.Scraper.Storage.Filesystem;
using skyscraper5.Skyscraper.Scraper.Storage.InMemory;
using skyscraper5.Skyscraper.Scraper.Storage;
using skyscraper5.Skyscraper.Scraper;
using skyscraper5;
using skyscraper8.Skyscraper.IO;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper8.Skyscraper.Scraper.Storage;
namespace skyscraper8.Tests
{
public class DocsisTestsLong
{
[Fact]
public void TestLongBoiSingleStreams()
{
DirectoryInfo di = new DirectoryInfo("D:\\DocsisDemo");
if (!di.Exists)
{
Debug.WriteLine("Files not available!");
return;
}
FilesystemScraperStorageFactory storageFactory = new FilesystemScraperStorageFactory();
storageFactory.Directory = "docsis_longboi";
Passing passing = new Passing();
passing.DataStorage = storageFactory.CreateDataStorage();
passing.MassImportDirectory(di);
}
[Fact]
public void TestM3u8Stream()
{
FileInfo docsisM3u8 = new FileInfo("D:\\DocsisDemo\\docsis.m3u8");
if (!docsisM3u8.Exists)
{
Debug.WriteLine("File not available!");
return;
}
FileInfo alreadyTested = new FileInfo("docsis_m3u8_test.complete");
if (alreadyTested.Exists)
{
Debug.WriteLine("Hello!");
return;
}
M3U8Stream m3u8 = new M3U8Stream(docsisM3u8.FullName);
TsContext tsContext = new TsContext();
InMemoryScraperStorageFactory storageFactory = new InMemoryScraperStorageFactory();
DataStorage scraperStorage = storageFactory.CreateDataStorage();
SkyscraperContext skyscraperContext = new SkyscraperContext(tsContext, scraperStorage, null);
skyscraperContext.InitalizeFilterChain();
skyscraperContext.IngestFromStream(m3u8);
File.WriteAllText("docsis_m3u8_test.complete", "1");
}
}
}

View File

@ -1,3 +1,5 @@
using skyscraper5.Docsis;
using skyscraper5.Docsis.AnnexC;
using skyscraper5.Mpeg2;
namespace skyscraper8.Tests;
@ -10,4 +12,231 @@ public class UselessCodeCoverageTests
PsiSection section = new PsiSection();
section.Append(new byte[] { 3 });
}
[Fact]
void MacManagementMessageTypeAttributeTest()
{
MacManagementMessageTypeAttribute mmmta = new MacManagementMessageTypeAttribute(1, 2);
Console.WriteLine(mmmta.ToString());
}
[Fact]
void RcpIdEncodingTest()
{
RcpIdEncoding rie = new RcpIdEncoding(new byte[] { 7, 1, 0 });
SimplifiedReceiveChannelAssignmentEncoding simplifiedReceiveChannelAssignmentEncoding = rie.SimplifiedReceiveChannelConfiguration;
Assert.NotNull(simplifiedReceiveChannelAssignmentEncoding);
Assert.Throws<NotImplementedException>(() => new RcpIdEncoding(new byte[] { 255, 1, 0 }));
}
[Fact]
void EthernetLlcPacketClassificationEncodingTest()
{
EthernetLlcPacketClassificationEncoding epce = new EthernetLlcPacketClassificationEncoding(new byte[] { 3, 3, 1, 0, 1 });
ushort epceEProt = epce.EProt;
Assert.Equal(1, epce.EProt);
Assert.Equal(1, epce.Type);
Assert.Throws<NotImplementedException>(() => new EthernetLlcPacketClassificationEncoding(new byte[] { 255, 1, 0 }));
}
[Fact]
void SimplifiedReceiveChannelAssignmentEncodingTest()
{
SimplifiedReceiveChannelAssignmentEncoding srcae =
new SimplifiedReceiveChannelAssignmentEncoding(new byte[] { 1, 1, 0, 2, 1, 0, 3, 1, 0 });
Assert.Equal(0,srcae.DownstreamChannelAssignment[0]);
Assert.Equal(0, srcae.DownstreamProfileAssignment[0]);
Assert.Equal(0, srcae.PrimaryDownstreamChannelAssignment[0]);
Assert.Throws<NotImplementedException>(() => new SimplifiedReceiveChannelAssignmentEncoding(new byte[] { 254,0,1 }));
}
[Fact]
void TransmitChannelConfigurationObjectTest()
{
CommonTlvEncodingObject.TransmitChannelConfigurationObject tcco =
new CommonTlvEncodingObject.TransmitChannelConfigurationObject(
new byte[]
{
1, 1, 0,
2, 1, 0,
3, 1, 0,
5, 4, 0, 0, 0, 0,
6, 2, 0, 0,
7, 1, 1,
9, 1, 0,
10, 1, 0,
11, 1, 0
});
Assert.Equal(0, tcco.TccReferenceId.Value);
Assert.Equal(CommonTlvEncodingObject.TransmitChannelConfigurationObject.UpstreamChannelActionEnum.NoAction, tcco.UpstreamChannelAction.Value);
Assert.Equal(0, tcco.UpstreamChannelId.Value);
Assert.NotNull(tcco.UpstreamChannelDescriptor);
Assert.Equal(0, tcco.RangingSid.Value);
Assert.Equal(InitalizationTechniqueEnum.BroadcastInitialRanging, tcco.InitializationTechnique.Value);
Assert.Equal(0, tcco.DynamicRangeWindow);
Assert.Equal(0, tcco.P16Hi);
Assert.Equal(0, tcco.ListOfIucs[0]);
Assert.Throws<NotImplementedException>(() =>
new CommonTlvEncodingObject.TransmitChannelConfigurationObject(new byte[] { 254, 1, 0 }));
}
[Fact]
void CommonTlvEncodingObjectTest()
{
MemoryStream ms = new MemoryStream(new byte[]
{
5, 1, 0,
47, 1, 0,
49, 1, 0,
31, 1, 0,
27, 1, 0,
30, 1, 0,
52, 2, 0, 1
});
CommonTlvEncodingObject commonTlv = new CommonTlvEncodingObject(ms);
Assert.NotNull(commonTlv.ModemCapabilitiesEncoding);
Assert.NotNull(commonTlv.ServiceFlowSidClusterAssignment);
Assert.NotNull(commonTlv.RcpId);
Assert.Equal(0, commonTlv.KeySequenceNumber);
Assert.Equal(0, commonTlv.HmacDigest[0]);
Assert.NotNull(commonTlv.AuthorizationHint);
Assert.Equal(new TimeSpan(0, 0, 1), commonTlv.InitializingChannelTimeout);
ms = new MemoryStream(new byte[] { 254, 1, 0 });
Assert.Throws<NotImplementedException>(() => new CommonTlvEncodingObject(ms));
}
[Fact]
void GeneralPacketClassifierEncodingTest()
{
GeneralPacketClassifierEncoding gpce = new GeneralPacketClassifierEncoding(new byte[]
{
6, 1, 1,
5, 1, 0,
9, 1, 0,
3, 2, 0, 1,
1, 1, 0,
2, 2, 0, 1,
4, 4, 0, 0, 0, 1,
7, 1, 0,
10, 1, 0,
12, 16,
//IPv6 Packet Classification Encoding
3, 2, 0, 1,
4, 4, 127, 0, 0, 1,
6, 4, 127, 0, 0, 1
});
Assert.True(gpce.ClassifierActivationState.Value);
Assert.Equal(0, gpce.RulePriority.Value);
Assert.NotNull(gpce.Ipv4PacketClassification);
Assert.Equal(1, gpce.ServiceFlowReference.Value);
Assert.Equal(0, gpce.ClassifierReference.Value);
Assert.Equal(1, gpce.ClassifierIdentifier.Value);
Assert.Equal((uint)1, gpce.ServiceFlowIdentifier.Value);
Assert.Equal(GeneralPacketClassifierEncoding.DynamicServiceChangeActionEnum.Add, gpce.DynamicServiceChangeAction.Value);
Assert.NotNull(gpce.EthernetLlcPacketClassificationEncodings);
Assert.Throws<NotImplementedException>(() => new GeneralPacketClassifierEncoding(new byte[]
{
12, 4,
255, 1, 0, 0
}));
Assert.Throws<NotImplementedException>(() => new GeneralPacketClassifierEncoding(new byte[]
{
254, 1, 0
}));
}
[Fact]
public void Ipv4PacketClassificationEncodingTest()
{
GeneralPacketClassifierEncoding.Ipv4PacketClassificationEncodings ipce =
new GeneralPacketClassifierEncoding.Ipv4PacketClassificationEncodings(new byte[]
{
3, 4, 127, 0, 0, 1,
5, 4, 127, 0, 0, 1,
2, 2, 0, 1,
4, 4, 255, 255, 255, 0,
6, 4, 255, 255, 255, 0,
9, 2, 0, 1,
10, 2, 0, 1,
7, 2, 0, 1,
8, 2, 0, 1
});
Assert.NotNull(ipce.Ipv4SourceAddress);
Assert.NotNull(ipce.Ipv4DestinationAddress);
Assert.Equal(1, ipce.IpProtocol.Value);
Assert.NotNull(ipce.Ipv4SourceMask);
Assert.NotNull(ipce.Ipv4DestinationMask);
Assert.Equal(1, ipce.DestinationPortStart.Value);
Assert.Equal(1, ipce.DestinationPortEnd.Value);
Assert.Equal(1, ipce.SourcePortStart.Value);
Assert.Equal(1, ipce.SourcePortEnd.Value);
Assert.Throws<NotImplementedException>(() =>
new GeneralPacketClassifierEncoding.Ipv4PacketClassificationEncodings(new byte[]
{
255, 1, 0
}));
}
[Fact]
public void ServiceFlowSidClusterAssignmentObjectTest()
{
ServiceFlowSidClusterAssignmentObject sfscao = new ServiceFlowSidClusterAssignmentObject(new byte[]
{
1, 4, 0, 0, 0, 1,
2, 1, 0,
3, 1, 0,
});
Assert.Equal(1u, sfscao.SFID.Value);
Assert.NotNull(sfscao.SidClusterEncoding);
Assert.NotNull(sfscao.SidClusterSwitchoverCriteria);
Assert.Throws<NotImplementedException>(() => new ServiceFlowSidClusterAssignmentObject(new byte[]
{
255, 1, 0
}));
}
[Fact]
public void SidClusterEncodingObjectTest()
{
ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject sceo =
new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject(new byte[]
{
1, 1, 1,
2, 1, 0
});
Assert.Equal(1, sceo.SidClusterId.Value);
Assert.NotNull(sceo.SidToChannelMapping);
Assert.Throws<NotImplementedException>(() => new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject(new byte[]
{
255, 1, 0
}));
}
[Fact]
public void SidToChannelMappingObjectTest()
{
ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject stcmo =
new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject(new byte[]
{
1,1,1,
2,2,0,1,
3,1,1
});
Assert.Equal(1, stcmo.UpstreamChannelId.Value);
Assert.Equal(1, stcmo.SID.Value);
Assert.Equal(ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject.ActionEnum.Add,stcmo.Action.Value);
Assert.Throws<NotImplementedException>(() =>
new ServiceFlowSidClusterAssignmentObject.SidClusterEncodingObject.SidToChannelMappingObject(new byte[]
{
255, 1, 0
}));
}
}

View File

@ -1,5 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F6e_003Fd247db11_003FArray_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAssert_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa840692e98b74557bc005b38213a22c72dad0_003Fc8_003F58c2e0c9_003FAssert_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFileInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F5a_003Fcf76af61_003FFileInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AInterop_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fea_003F7d70064b_003FInterop_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F6b_003Fa410ee2c_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@ -7,16 +8,14 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullable_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F0d_003F6549c49b_003FNullable_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AObject_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F55_003F6efc7017_003FObject_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AQueue_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Fb6_003F498e7c75_003FQueue_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASkip_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FSourcesCache_003Fd8c543d93f1559af2ea2be8e9d55839b5bb1a3605f22daa45ea63772e3b4bc_003FSkip_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003Feb_003F3c476997_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe1ab690537c44e02a014076312b886b7b2e200_003F4f_003F7bfc5050_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ATuple_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F57d616db882b441b8c50720b4477e03db2e200_003F9f_003F0d16f921_003FTuple_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/Environment/Highlighting/HighlightingSourceSnapshotLocation/@EntryValue">/home/schiemas/.cache/JetBrains/Rider2025.1/resharper-host/temp/Rider/vAny/CoverageData/_skyscraper8.1808907683/Snapshot/snapshot.utdcvr</s:String>
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=1108d3f2_002D5e6f_002D416b_002Da8ee_002D3c9502a978e2/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="CheckBfbsCrc #2" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;&#xD;
&lt;Solution /&gt;&#xD;
&lt;/SessionState&gt;</s:String>
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=8cbe9c8f_002Dfc55_002D47f1_002D9df1_002Dcb4c7fbbc56b/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" Name="CheckBfbsCrc" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;&#xD;
&lt;TestAncestor&gt;&#xD;
&lt;TestId&gt;xUnit::84EE9FCD-2C7F-DF84-C1BA-99D018CE9412::net8.0::skyscraper8.Tests.GsType1SanityTest.CheckBfbsCrc&lt;/TestId&gt;&#xD;
&lt;/TestAncestor&gt;&#xD;
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=94eea68c_002Dcaa0_002D4657_002Da521_002D7b96c8ead0ec/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from &amp;lt;skyscraper8.Tests&amp;gt;" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;
&lt;Project Location="/home/schiemas/RiderProjects/skyscraper8/skyscraper8.Tests" Presentation="&amp;lt;skyscraper8.Tests&amp;gt;" /&gt;
&lt;/SessionState&gt;</s:String>
<s:String x:Key="/Default/Profiling/Configurations/=1/@EntryIndexedValue">&lt;data&gt;&lt;HostParameters type="LocalHostParameters" /&gt;&lt;Argument type="StandaloneArgument"&gt;&lt;Arguments IsNull="False"&gt;&lt;/Arguments&gt;&lt;FileName IsNull="False"&gt;&lt;/FileName&gt;&lt;WorkingDirectory IsNull="False"&gt;&lt;/WorkingDirectory&gt;&lt;Scope&gt;&lt;ProcessFilters /&gt;&lt;/Scope&gt;&lt;/Argument&gt;&lt;Info type="TimelineInfo" /&gt;&lt;CoreOptions type="CoreOptions"&gt;&lt;CoreTempPath IsNull="False"&gt;&lt;/CoreTempPath&gt;&lt;RemoteEndPoint IsNull="False"&gt;&lt;/RemoteEndPoint&gt;&lt;AdditionalEnvironmentVariables /&gt;&lt;/CoreOptions&gt;&lt;HostOptions type="HostOptions"&gt;&lt;HostTempPath IsNull="False"&gt;&lt;/HostTempPath&gt;&lt;/HostOptions&gt;&lt;/data&gt;</s:String></wpf:ResourceDictionary>

View File

@ -11,7 +11,7 @@ namespace skyscraper5.Docsis.AnnexC
public EthernetLlcPacketClassificationEncoding(byte[] buffer)
{
MemoryStream ms = new MemoryStream(buffer, false);
while (ms.GetAvailableBytes() > 3)
while (ms.GetAvailableBytes() >= 3)
{
byte type = ms.ReadUInt8();
ushort length = ms.ReadUInt8();

View File

@ -27,7 +27,7 @@ namespace skyscraper5.Docsis.AnnexC
SimplifiedReceiveChannelConfiguration = new SimplifiedReceiveChannelAssignmentEncoding(v);
break;
default:
throw new NotFiniteNumberException(String.Format("{0} {1}", nameof(ModemCapabilitiesEncoding), type));
throw new NotImplementedException(String.Format("{0} {1}", nameof(ModemCapabilitiesEncoding), type));
}
}
}
@ -59,7 +59,7 @@ namespace skyscraper5.Docsis.AnnexC
break;
default:
//page 728, CM-SP-MULPIv4.0-I01-190815.pdf
throw new NotFiniteNumberException(String.Format("{0} {1}", nameof(SimplifiedReceiveChannelAssignmentEncoding), type));
throw new NotImplementedException(String.Format("{0} {1}", nameof(SimplifiedReceiveChannelAssignmentEncoding), type));
}
}
}