2023-11-28 00:30:36 +00:00
|
|
|
#include <data_handler.hpp>
|
|
|
|
#include <unity.h>
|
|
|
|
|
2024-09-27 22:03:18 +00:00
|
|
|
template<size_t N>
|
|
|
|
std::string joinArrayWithBrackets(const std::array<std::string, N>& arr, const std::string& separator = " ") {
|
|
|
|
std::ostringstream result;
|
|
|
|
for (size_t i = 0; i < N; ++i) {
|
|
|
|
if (i > 0) {
|
|
|
|
result << separator;
|
|
|
|
}
|
|
|
|
result << '[' << arr[i] << ']';
|
|
|
|
}
|
|
|
|
return result.str();
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void setUp(void)
|
|
|
|
{
|
2023-11-28 00:30:36 +00:00
|
|
|
// set stuff up here
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void tearDown(void)
|
|
|
|
{
|
2023-11-28 00:30:36 +00:00
|
|
|
// clean stuff up here
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_CorrectSatsPerDollarConversion(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parseSatsPerCurrency(37253, CURRENCY_USD, false);
|
2023-11-28 00:30:36 +00:00
|
|
|
TEST_ASSERT_EQUAL_STRING("MSCW/TIME", output[0].c_str());
|
2024-09-09 14:52:23 +00:00
|
|
|
TEST_ASSERT_EQUAL_STRING("2", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("6", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("8", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("4", output[NUM_SCREENS - 1].c_str());
|
2023-11-28 00:30:36 +00:00
|
|
|
}
|
|
|
|
|
2024-12-05 17:22:59 +00:00
|
|
|
void test_SatsPerDollarAfter1B(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parseSatsPerCurrency(120000000, CURRENCY_USD, false);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("SATS/USD", output[0].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("0", output[NUM_SCREENS - 5].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING(".", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("8", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("3", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("3", output[NUM_SCREENS - 1].c_str());
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_CorrectSatsPerPoundConversion(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parseSatsPerCurrency(37253, CURRENCY_GBP, false);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("SATS/GBP", output[0].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("2", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("6", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("8", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("4", output[NUM_SCREENS - 1].c_str());
|
|
|
|
}
|
2023-11-28 00:30:36 +00:00
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_SixCharacterBlockHeight(void)
|
|
|
|
{
|
2023-11-28 00:30:36 +00:00
|
|
|
std::array<std::string, NUM_SCREENS> output = parseBlockHeight(999999);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("BLOCK/HEIGHT", output[0].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("9", output[1].c_str());
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_SevenCharacterBlockHeight(void)
|
|
|
|
{
|
2023-11-28 00:30:36 +00:00
|
|
|
std::array<std::string, NUM_SCREENS> output = parseBlockHeight(1000000);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("1", output[0].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("0", output[1].c_str());
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_FeeRateDisplay(void)
|
|
|
|
{
|
2024-03-10 19:24:55 +00:00
|
|
|
uint testValue = 21;
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parseBlockFees(static_cast<std::uint16_t>(testValue));
|
|
|
|
TEST_ASSERT_EQUAL_STRING("FEE/RATE", output[0].c_str());
|
2024-09-09 14:52:23 +00:00
|
|
|
TEST_ASSERT_EQUAL_STRING("2", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("1", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("sat/vB", output[NUM_SCREENS - 1].c_str());
|
2024-03-10 19:24:55 +00:00
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_PriceOf100kusd(void)
|
|
|
|
{
|
2023-11-28 00:30:36 +00:00
|
|
|
std::array<std::string, NUM_SCREENS> output = parsePriceData(100000, '$');
|
|
|
|
TEST_ASSERT_EQUAL_STRING("$", output[0].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("1", output[1].c_str());
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_PriceOf1MillionUsd(void)
|
|
|
|
{
|
2023-11-28 00:30:36 +00:00
|
|
|
std::array<std::string, NUM_SCREENS> output = parsePriceData(1000000, '$');
|
2023-11-28 01:05:04 +00:00
|
|
|
TEST_ASSERT_EQUAL_STRING("BTC/USD", output[0].c_str());
|
2024-09-09 14:52:23 +00:00
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING("1", output[NUM_SCREENS - 5].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING(".", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("0", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("0", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("M", output[NUM_SCREENS - 1].c_str());
|
2023-11-28 00:30:36 +00:00
|
|
|
}
|
|
|
|
|
2024-11-27 10:33:12 +00:00
|
|
|
void test_PriceSuffixMode(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parsePriceData(93000, '$', true, false);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("BTC/USD", output[0].c_str());
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING("9", output[NUM_SCREENS - 5].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("3", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING(".", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("0", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("K", output[NUM_SCREENS - 1].c_str());
|
|
|
|
}
|
|
|
|
|
2024-12-05 03:32:32 +00:00
|
|
|
void test_PriceSuffixModeCompact1(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parsePriceData(100000, '$', true, false, true);
|
|
|
|
|
2024-12-05 17:22:59 +00:00
|
|
|
std::string joined = joinArrayWithBrackets(output);
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("BTC/USD", output[0].c_str(), joined.c_str());
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("$", output[NUM_SCREENS - 6].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("1", output[NUM_SCREENS - 5].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("0", output[NUM_SCREENS - 4].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("0.", output[NUM_SCREENS - 3].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("0", output[NUM_SCREENS - 2].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("K", output[NUM_SCREENS - 1].c_str(), joined.c_str());
|
2024-12-05 03:32:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void test_PriceSuffixModeCompact2(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parsePriceData(1000000, '$', true, false, true);
|
|
|
|
|
2024-12-05 17:22:59 +00:00
|
|
|
std::string joined = joinArrayWithBrackets(output);
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("BTC/USD", output[0].c_str(), joined.c_str());
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("$", output[NUM_SCREENS - 6].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("1.", output[NUM_SCREENS - 5].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("0", output[NUM_SCREENS - 4].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("0", output[NUM_SCREENS - 3].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("0", output[NUM_SCREENS - 2].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("M", output[NUM_SCREENS - 1].c_str(), joined.c_str());
|
2024-12-05 03:32:32 +00:00
|
|
|
}
|
|
|
|
|
2024-11-27 10:33:12 +00:00
|
|
|
void test_PriceSuffixModeMow(void)
|
|
|
|
{
|
2024-12-10 14:18:04 +00:00
|
|
|
std::array<std::string, NUM_SCREENS> output = parsePriceData(93600, '$', true, true);
|
2024-11-27 10:33:12 +00:00
|
|
|
|
|
|
|
std::string joined = joinArrayWithBrackets(output);
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("$", output[0].c_str(), joined.c_str());
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE(".", output[NUM_SCREENS - 5].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("0", output[NUM_SCREENS - 4].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("9", output[NUM_SCREENS - 3].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("3", output[NUM_SCREENS - 2].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("M", output[NUM_SCREENS - 1].c_str(), joined.c_str());
|
|
|
|
}
|
|
|
|
|
2024-11-28 17:22:07 +00:00
|
|
|
void test_PriceSuffixModeMowCompact(void)
|
|
|
|
{
|
2024-12-10 14:18:04 +00:00
|
|
|
std::array<std::string, NUM_SCREENS> output = parsePriceData(93600, '$', true, true, true);
|
2024-11-28 17:22:07 +00:00
|
|
|
|
|
|
|
std::string joined = joinArrayWithBrackets(output);
|
|
|
|
|
2024-12-10 14:18:04 +00:00
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("MOW/UNITS", output[0].c_str(), joined.c_str());
|
2024-12-05 17:22:59 +00:00
|
|
|
|
2024-11-28 17:22:07 +00:00
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("$", output[NUM_SCREENS - 6].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("0.", output[NUM_SCREENS - 5].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("0", output[NUM_SCREENS - 4].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("9", output[NUM_SCREENS - 3].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("3", output[NUM_SCREENS - 2].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("M", output[NUM_SCREENS - 1].c_str(), joined.c_str());
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_McapLowerUsd(void)
|
|
|
|
{
|
2024-03-10 11:35:20 +00:00
|
|
|
std::array<std::string, NUM_SCREENS> output = parseMarketCap(810000, 26000, '$', true);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("USD/MCAP", output[0].c_str());
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
// TEST_ASSERT_EQUAL_STRING("$", output[NUM_SCREENS-6].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("$", output[NUM_SCREENS - 5].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("5", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("0", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("7", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("B", output[NUM_SCREENS - 1].c_str());
|
2024-03-10 11:35:20 +00:00
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_Mcap1TrillionUsd(void)
|
|
|
|
{
|
2024-03-10 11:35:20 +00:00
|
|
|
std::array<std::string, NUM_SCREENS> output = parseMarketCap(831000, 52000, '$', true);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("USD/MCAP", output[0].c_str());
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
TEST_ASSERT_EQUAL_STRING("$", output[NUM_SCREENS - 6].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("1", output[NUM_SCREENS - 5].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING(".", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("0", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("2", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("T", output[NUM_SCREENS - 1].c_str());
|
2024-03-10 11:35:20 +00:00
|
|
|
}
|
|
|
|
|
2024-09-27 22:03:18 +00:00
|
|
|
void test_Mcap1TrillionUsdSmallChars(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parseMarketCap(831000, 52000, '$', false);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("USD/MCAP", output[0].c_str());
|
|
|
|
|
|
|
|
std::string joined = joinArrayWithBrackets(output);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE(" $ ", output[NUM_SCREENS - 6].c_str(), joined.c_str());
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE(" 1", output[NUM_SCREENS - 5].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("020", output[NUM_SCREENS - 4].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("825", output[NUM_SCREENS - 3].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("000", output[NUM_SCREENS - 2].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("000", output[NUM_SCREENS - 1].c_str(), joined.c_str());
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_Mcap1TrillionEur(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parseMarketCap(831000, 52000, CURRENCY_EUR, true);
|
2024-03-10 11:35:20 +00:00
|
|
|
TEST_ASSERT_EQUAL_STRING("EUR/MCAP", output[0].c_str());
|
2024-09-09 14:52:23 +00:00
|
|
|
TEST_ASSERT_TRUE(CURRENCY_EUR == output[NUM_SCREENS - 6].c_str()[0]);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("1", output[NUM_SCREENS - 5].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING(".", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("0", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("2", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("T", output[NUM_SCREENS - 1].c_str());
|
|
|
|
}
|
|
|
|
|
2024-09-27 22:03:18 +00:00
|
|
|
void test_Mcap1TrillionEurSmallChars(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parseMarketCap(831000, 52000, CURRENCY_EUR, false);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("EUR/MCAP", output[0].c_str());
|
|
|
|
|
|
|
|
std::string joined = joinArrayWithBrackets(output);
|
|
|
|
|
|
|
|
char result[4];
|
|
|
|
snprintf(result, sizeof(result), " %c ", CURRENCY_EUR);
|
|
|
|
TEST_ASSERT_EQUAL_STRING(result, output[NUM_SCREENS - 6].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE(" 1", output[NUM_SCREENS - 5].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("020", output[NUM_SCREENS - 4].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("825", output[NUM_SCREENS - 3].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("000", output[NUM_SCREENS - 2].c_str(), joined.c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING_MESSAGE("000", output[NUM_SCREENS - 1].c_str(), joined.c_str());
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
void test_Mcap1TrillionJpy(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parseMarketCap(831000, 52000, CURRENCY_JPY, true);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("JPY/MCAP", output[0].c_str());
|
|
|
|
TEST_ASSERT_TRUE(CURRENCY_JPY == output[NUM_SCREENS - 6].c_str()[0]);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("1", output[NUM_SCREENS - 5].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING(".", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("0", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("2", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("T", output[NUM_SCREENS - 1].c_str());
|
2024-03-10 11:35:20 +00:00
|
|
|
}
|
|
|
|
|
2024-09-27 22:03:18 +00:00
|
|
|
void test_Mcap1TrillionJpySmallChars(void)
|
|
|
|
{
|
|
|
|
std::array<std::string, NUM_SCREENS> output = parseMarketCap(831000, 52000, CURRENCY_JPY, false);
|
|
|
|
TEST_ASSERT_EQUAL_STRING("JPY/MCAP", output[0].c_str());
|
|
|
|
|
|
|
|
char result[4];
|
|
|
|
snprintf(result, sizeof(result), " %c ", CURRENCY_JPY);
|
|
|
|
TEST_ASSERT_EQUAL_STRING(result, output[NUM_SCREENS - 6].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING(" 1", output[NUM_SCREENS - 5].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("020", output[NUM_SCREENS - 4].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("825", output[NUM_SCREENS - 3].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("000", output[NUM_SCREENS - 2].c_str());
|
|
|
|
TEST_ASSERT_EQUAL_STRING("000", output[NUM_SCREENS - 1].c_str());
|
|
|
|
}
|
|
|
|
|
2023-11-28 00:30:36 +00:00
|
|
|
// not needed when using generate_test_runner.rb
|
2024-09-09 14:52:23 +00:00
|
|
|
int runUnityTests(void)
|
|
|
|
{
|
2023-11-28 00:30:36 +00:00
|
|
|
UNITY_BEGIN();
|
2023-11-28 01:05:04 +00:00
|
|
|
RUN_TEST(test_CorrectSatsPerDollarConversion);
|
2024-09-09 14:52:23 +00:00
|
|
|
RUN_TEST(test_CorrectSatsPerPoundConversion);
|
2024-12-05 17:22:59 +00:00
|
|
|
RUN_TEST(test_SatsPerDollarAfter1B);
|
2023-11-28 01:05:04 +00:00
|
|
|
RUN_TEST(test_SixCharacterBlockHeight);
|
|
|
|
RUN_TEST(test_SevenCharacterBlockHeight);
|
2024-03-10 19:24:55 +00:00
|
|
|
RUN_TEST(test_FeeRateDisplay);
|
2023-11-28 01:05:04 +00:00
|
|
|
RUN_TEST(test_PriceOf100kusd);
|
2024-03-10 11:35:20 +00:00
|
|
|
RUN_TEST(test_McapLowerUsd);
|
|
|
|
RUN_TEST(test_Mcap1TrillionUsd);
|
2024-09-27 22:03:18 +00:00
|
|
|
RUN_TEST(test_Mcap1TrillionUsdSmallChars);
|
2024-03-10 11:35:20 +00:00
|
|
|
RUN_TEST(test_Mcap1TrillionEur);
|
2024-09-27 22:03:18 +00:00
|
|
|
RUN_TEST(test_Mcap1TrillionEurSmallChars);
|
2024-09-09 14:52:23 +00:00
|
|
|
RUN_TEST(test_Mcap1TrillionJpy);
|
2024-09-27 22:03:18 +00:00
|
|
|
RUN_TEST(test_Mcap1TrillionJpySmallChars);
|
2024-11-27 10:33:12 +00:00
|
|
|
RUN_TEST(test_PriceSuffixMode);
|
2024-12-05 03:32:32 +00:00
|
|
|
RUN_TEST(test_PriceSuffixModeCompact1);
|
|
|
|
RUN_TEST(test_PriceSuffixModeCompact2);
|
2024-11-27 10:33:12 +00:00
|
|
|
RUN_TEST(test_PriceSuffixModeMow);
|
2024-11-28 17:22:07 +00:00
|
|
|
RUN_TEST(test_PriceSuffixModeMowCompact);
|
2023-11-28 00:30:36 +00:00
|
|
|
|
|
|
|
return UNITY_END();
|
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
return runUnityTests();
|
2023-11-28 01:05:04 +00:00
|
|
|
}
|
|
|
|
|
2024-09-09 14:52:23 +00:00
|
|
|
extern "C" void app_main()
|
|
|
|
{
|
|
|
|
runUnityTests();
|
2023-11-28 00:30:36 +00:00
|
|
|
}
|