#include <catch2/catch.hpp>

auto is_digit(char const c) -> bool
{
    switch (c) {
    case '0':
        [[fallthrough]];
    case '1':
        [[fallthrough]];
    case '2':
        [[fallthrough]];
    case '3':
        [[fallthrough]];
    case '4':
        [[fallthrough]];
    case '5':
        [[fallthrough]];
    case '6':
        [[fallthrough]];
    case '7':
        [[fallthrough]];
    case '8':
        [[fallthrough]];
    case '9':
        return true;
    default:
        return false;
    }
}

TEST_CASE()
{
    CHECK(is_digit('6'));
    CHECK(not is_digit('A'));
}