#include "a_lolly_test.hpp"
#include "lolly/data/numeral.hpp"
#include <climits>
#include <cstdint>
Go to the source code of this file.
◆ TEST_CASE() [1/7]
Definition at line 19 of file numeral_test.cpp.
19 {
40 }
62 }
84 }
88 }
89 SUBCASE (
"max int32 or min int32") {
93 }
94}
The list class represents a linked list.
void string_eq(string left, string right)
string to_roman(int32_t nr)
Generates a Roman numeral string for an integer.
◆ TEST_CASE() [2/7]
Definition at line 96 of file numeral_test.cpp.
96 {
120}
string to_hanzi(int32_t nr)
Generates a Chinese numeral for a given integer.
◆ TEST_CASE() [3/7]
| TEST_CASE |
( |
"to_padded_hex" | | ) |
|
Definition at line 122 of file numeral_test.cpp.
122 {
127 }
132 }
133}
string to_padded_hex(uint8_t i)
Converts an 8-bit unsigned integer to a fixed-length (2) hex string.
◆ TEST_CASE() [4/7]
Definition at line 135 of file numeral_test.cpp.
135 {
137 for (int i= 1; i < 10; i++) {
142 }
150 }
156 }
157}
string as_string(int16_t i)
◆ TEST_CASE() [5/7]
| TEST_CASE |
( |
"as_hexadecimal fixed" | | ) |
|
Definition at line 159 of file numeral_test.cpp.
159 {
161 for (int i= 1; i < 10; i++) {
164 }
172 }
176 }
178}
string as_hexadecimal(int i, int len)
Converts an unsigned integer to a hexadecimal string with a fixed length.
◆ TEST_CASE() [6/7]
| TEST_CASE |
( |
"uint32_to_Hex" | | ) |
|
Definition at line 180 of file numeral_test.cpp.
180 {
182 for (int i= 1; i < 10; i++) {
185 }
193 }
198 }
200}
string uint32_to_Hex(uint32_t i)
Converts an unsigned integer to a hexadecimal string.
◆ TEST_CASE() [7/7]
Definition at line 202 of file numeral_test.cpp.
202 {
208}
string binary_to_hexadecimal(string bin)
Converts a binary stream to its hexadecimal represention.