We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd0fa76 commit ff804bfCopy full SHA for ff804bf
tests/test_private_crc.cpp
@@ -1,24 +1,23 @@
1
// This software is distributed under the terms of the MIT License.
2
// Copyright (c) 2016-2020 OpenCyphal Development Team.
3
// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
-
+
5
#include "exposed.hpp"
6
#include "catch.hpp"
7
8
TEST_CASE("TransferCRC")
9
{
10
using exposed::crcAdd;
11
using exposed::crcValue;
12
std::uint32_t crc = 0xFFFFFFFFU;
13
14
crc = crcAdd(crc, 1, "1");
15
REQUIRE(0x90F599E3U == crcValue(crc));
16
crc = crcAdd(crc, 1, "2");
17
REQUIRE(0x7355C460U == crcValue(crc));
18
crc = crcAdd(crc, 1, "3");
19
REQUIRE(0x107B2FB2U == crcValue(crc));
20
21
crc = crcAdd(crc, 6, "456789");
22
REQUIRE(0xE3069283U == crcValue(crc));
23
}
24
0 commit comments