diff --git a/include/libbase b/include/libbase new file mode 100644 index 0000000..90c42e7 --- /dev/null +++ b/include/libbase @@ -0,0 +1,3 @@ +#include +#include +#include \ No newline at end of file diff --git a/src/hex.cpp b/src/hex.cpp index e70974e..f784548 100644 --- a/src/hex.cpp +++ b/src/hex.cpp @@ -9,7 +9,7 @@ static const int8_t hexmap[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -22,6 +22,7 @@ static const int8_t hexmap[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // }; namespace hex diff --git a/test/hash/test-sha256.cpp b/test/hash/test-sha256.cpp index 6c991aa..391fda4 100644 --- a/test/hash/test-sha256.cpp +++ b/test/hash/test-sha256.cpp @@ -11,7 +11,7 @@ TEST(hash, sha256) TEST(hash, sha256_1e4) { std::vector data(32); - for(uint64_t i = 0; i < 1e4; i++) + for (uint64_t i = 0; i < 1e4; i++) { sha256(data); } diff --git a/test/test-baseN.cpp b/test/test-baseN.cpp index 1b081d4..232a4c3 100644 --- a/test/test-baseN.cpp +++ b/test/test-baseN.cpp @@ -11,8 +11,8 @@ static const int8_t b58map[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, -1, - -1, 9, 10, 11, 12, 13, 14, 15, 16, -1, 17, 18, 19, 20, 21, -1, + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, -1, + -1, 9, 10, 11, 12, 13, 14, 15, 16, -1, 17, 18, 19, 20, 21, -1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, @@ -24,6 +24,7 @@ static const int8_t b58map[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + // }; TEST(baseN, isValid) diff --git a/test/test-hex.cpp b/test/test-hex.cpp index 85c21e0..31252ed 100644 --- a/test/test-hex.cpp +++ b/test/test-hex.cpp @@ -5,7 +5,7 @@ using namespace hex; TEST(hex, encode) { - std::vector data = { 0x74, 0x65, 0x73, 0x74 }; + std::vector data = {0x74, 0x65, 0x73, 0x74}; EXPECT_EQ("74657374", encode(data)); } TEST(hex, encode_1e6) @@ -15,7 +15,7 @@ TEST(hex, encode_1e6) } TEST(hex, decode) { - std::vector data = { 0x61, 0x6e, 0x6f }; + std::vector data = {0x61, 0x6e, 0x6f}; EXPECT_EQ(decode("616e6f"), data); } TEST(hex, decode_1e6)