diff --git a/src/microfmt.hpp b/src/microfmt.hpp index cc8d9b1..614c04c 100644 --- a/src/microfmt.hpp +++ b/src/microfmt.hpp @@ -17,7 +17,7 @@ // https://github.com/jeremy-rifkin/microfmt // Format: {[align][width][:[fill][base]]} # width: number or {} -namespace microfmt { +namespace libassert::microfmt { namespace detail { inline std::uint64_t clz(std::uint64_t value) { #ifdef _MSC_VER diff --git a/tests/unit/assertion_tests.cpp b/tests/unit/assertion_tests.cpp index bd4cada..2752c60 100644 --- a/tests/unit/assertion_tests.cpp +++ b/tests/unit/assertion_tests.cpp @@ -82,7 +82,7 @@ std::string prepare(std::string_view string, location loc) { auto message = replace( join(lines, "\n"), "", - microfmt::format("{}:{}: {}", loc.file, loc.line, loc.signature) + libassert::microfmt::format("{}:{}: {}", loc.file, loc.line, loc.signature) ); return message; } diff --git a/tests/unit/literals.cpp b/tests/unit/literals.cpp index a407119..95775ce 100644 --- a/tests/unit/literals.cpp +++ b/tests/unit/literals.cpp @@ -136,16 +136,16 @@ int main() { static std::regex int_hex = std::regex("^0[Xx](?!')(?:'?[\\da-fA-F])+" + optional_integer_suffix + "$"); static std::string digit_sequence = "\\d(?:'?\\d)*"; - static std::string fractional_constant = microfmt::format("(?:(?:{})?\\.{}|{}\\.)", digit_sequence, digit_sequence, digit_sequence); + static std::string fractional_constant = libassert::microfmt::format("(?:(?:{})?\\.{}|{}\\.)", digit_sequence, digit_sequence, digit_sequence); static std::string exponent_part = "(?:[Ee][\\+-]?" + digit_sequence + ")"; static std::string suffix = "[FfLl]"; - static std::regex float_decimal = std::regex(microfmt::format("^(?:{}{}?|{}{}){}?$", + static std::regex float_decimal = std::regex(libassert::microfmt::format("^(?:{}{}?|{}{}){}?$", fractional_constant, exponent_part, digit_sequence, exponent_part, suffix)); static std::string hex_digit_sequence = "[\\da-fA-F](?:'?[\\da-fA-F])*"; - static std::string hex_frac_const = microfmt::format("(?:(?:{})?\\.{}|{}\\.)", hex_digit_sequence, hex_digit_sequence, hex_digit_sequence); + static std::string hex_frac_const = libassert::microfmt::format("(?:(?:{})?\\.{}|{}\\.)", hex_digit_sequence, hex_digit_sequence, hex_digit_sequence); static std::string binary_exp = "[Pp][\\+-]?" + digit_sequence; - static std::regex float_hex = std::regex(microfmt::format("^0[Xx](?:{}|{}){}{}?$", + static std::regex float_hex = std::regex(libassert::microfmt::format("^0[Xx](?:{}|{}){}{}?$", hex_frac_const, hex_digit_sequence, binary_exp, suffix)); let matches_any = [&](const std::string& str) { let matches = [](const std::string& value, const std::regex& re) {