This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
Create tailored Eq instance for PacketStreamM2S #39
Labels
Ethernet Data Link Layer
We want the core to handle the ethernet data link layer
Feature description
The current instance declaration of class Eq for PacketStreamM2S is done with a deriving declaration.
This derived implementation means that two PacketStreamM2S values will just be compared for equality of all their arguments.
For testing of the up- and downconverter, we want to compare PacketStreamM2S instances that come out of the converter only on the datavector entries that are enabled. We could hardcode this into the test function, but since two PacketStreamM2S objects should be semantically equal already if they are equal in all enabled entries of the datavector, it is clean if we implement this equality in an explicit declaration of the Eq instance for PacketStreamM2S
Expected behaviour
A tailored Eq instance for PacketStreamM2S that only checks for equality of semantically relevant fields of the packet.
Expected steps
Implement the == function in a separate instance declaration
Additional Context
The text was updated successfully, but these errors were encountered: