File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ set(TEST_TARGET ${CMAKE_PROJECT_NAME})
24
24
##########################################################################
25
25
26
26
set (TEST_SRCS
27
+ src/Common/test_makeWord.cpp
27
28
src/Common/test_max.cpp
28
29
src/Common/test_min.cpp
29
30
src/WCharacter/test_isHexadecimalDigit.cpp
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2020 Arduino. All rights reserved.
3
+ */
4
+
5
+ /* *************************************************************************************
6
+ * INCLUDE
7
+ **************************************************************************************/
8
+
9
+ #include < catch.hpp>
10
+
11
+ #include < Common.h>
12
+
13
+ /* *************************************************************************************
14
+ * TEST CODE
15
+ **************************************************************************************/
16
+
17
+ TEST_CASE (" Calling 'makeWord(w)'" , " [makeWord-01]" )
18
+ {
19
+ REQUIRE (makeWord (0xDEAD ) == 0xDEAD );
20
+ REQUIRE (makeWord (0xDE ) == 0x00DE );
21
+ }
22
+
23
+ TEST_CASE (" Calling 'makeWord(h,l)'" , " [makeWord-02]" )
24
+ {
25
+ REQUIRE (makeWord (0xDE , 0xAD ) == 0xDEAD );
26
+ }
27
+
28
+ TEST_CASE (" Calling 'word(...)'" , " [makeWord-03]" )
29
+ {
30
+ REQUIRE (word (0xDEAD ) == 0xDEAD );
31
+ REQUIRE (word (0xDE , 0xAD ) == 0xDEAD );
32
+ }
You can’t perform that action at this time.
0 commit comments