mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
MACAddress: Unit testing for basic functionality
Problem: - There are no unit tests for `MACAddress` class. This makes it difficult to refactor and ensure the same behavior. - `m_data` private member variable is uninitialized leading to undefined behavior of `is_zero()`. Solution: - Add unit tests to cover basic functionality. - Initialize `m_data`.
This commit is contained in:
parent
f23d9a73aa
commit
fd97f23cef
2 changed files with 80 additions and 1 deletions
|
@ -71,7 +71,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
u8 m_data[6];
|
||||
u8 m_data[6] {};
|
||||
};
|
||||
|
||||
static_assert(sizeof(MACAddress) == 6);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue