-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into 30-system-implement-r…
…ide-task
- Loading branch information
Showing
9 changed files
with
294 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
jupyter | ||
numpy | ||
matplotlib | ||
schema |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* @file Endianness utility functions unit tests | ||
* @author Nathan Hui ([email protected]) | ||
* @brief | ||
* @version 0.1 | ||
* @date 2024-10-31 | ||
* | ||
* @copyright Copyright (c) 2024 | ||
* | ||
*/ | ||
#include "util.hpp" | ||
|
||
#include <gtest/gtest.h> | ||
|
||
TEST(EndiannessTests, EndiannessConsistency) | ||
{ | ||
uint16_t test_value2 = 0xf00d; | ||
ASSERT_EQ(test_value2, N_TO_B_ENDIAN_2(B_TO_N_ENDIAN_2(test_value2))); | ||
|
||
uint32_t test_value4 = 0xbaadf00d; | ||
ASSERT_EQ(test_value4, N_TO_B_ENDIAN_4(B_TO_N_ENDIAN_4(test_value4))); | ||
} | ||
|
||
TEST(EndiannessTests, OneWayTest) | ||
{ | ||
uint16_t test_value2 = 0xf00d; | ||
ASSERT_EQ(0x0df0, N_TO_B_ENDIAN_2(test_value2)); | ||
|
||
uint32_t test_value4 = 0xbaadf00d; | ||
ASSERT_EQ(0x0df0adba, N_TO_B_ENDIAN_4(test_value4)); | ||
} |