Put everything into a new 'const_fmt' namespace; Renamed namespace detail to const_fmt_detail

This commit is contained in:
2022-02-13 17:48:24 +01:00
parent 70fd273a70
commit 2ecc001a64
8 changed files with 86 additions and 73 deletions

View File

@@ -2,7 +2,8 @@
#include <gtest/gtest.h>
using namespace detail;
using namespace const_fmt;
using namespace const_fmt::const_fmt_detail;
TEST(Format, positive_int) {

View File

@@ -2,7 +2,7 @@
#include <const_fmt/parse.h>
using namespace detail;
using namespace const_fmt::const_fmt_detail;
TEST(Parse, parse_number) {

View File

@@ -1,9 +1,11 @@
#include <const_fmt/utility.h>
#include <gtest/gtest.h>
using namespace const_fmt;
TEST(Utility, const_pow) {
EXPECT_EQ(detail::const_pow(10, 0), 1);
EXPECT_EQ(detail::const_pow(0, 1), 0);
EXPECT_EQ(detail::const_pow(2, 8), 0b1'0000'0000);
EXPECT_EQ(const_fmt_detail::const_pow(10, 0), 1);
EXPECT_EQ(const_fmt_detail::const_pow(0, 1), 0);
EXPECT_EQ(const_fmt_detail::const_pow(2, 8), 0b1'0000'0000);
}