jaulib v1.4.0-2-g788cf73
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
test_stringfmt01.cpp File Reference
#include <sys/types.h>
#include <cassert>
#include <cinttypes>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <sstream>
#include <string_view>
#include <type_traits>
#include <jau/basic_types.hpp>
#include <jau/cpp_lang_util.hpp>
#include <jau/cpp_pragma.hpp>
#include <jau/float_types.hpp>
#include <jau/int_types.hpp>
#include <jau/string_cfmt.hpp>
#include <jau/string_util.hpp>
#include <jau/test/catch2_ext.hpp>
#include <jau/type_traits_queries.hpp>
#include "string_cfmt2.hpp"
Include dependency graph for test_stringfmt01.cpp:

Go to the source code of this file.

Functions

template<typename... Targs>
static constexpr jau::cfmt2::PResult check (const std::string_view fmt, const Targs &...) noexcept
 
static std::string format_000a_vsnprintf (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
static std::string format_000b_vsnprintf (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
static std::string format_010a_jaufmtstr (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
static std::string format_010b_jaufmtstr (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
static constexpr std::string format_020a_jaufmtstr_n (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
static std::string format_020b_jaufmtstr_n (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
static std::string format_030a_strstream (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
static std::string format_030b_strstream (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
static void format_0a ()
 
static void format_0b ()
 
template<typename... Args>
static constexpr std::string format_string000 (const std::size_t maxStrLen, const std::string &format, const Args &...args)
 
template<typename... Args>
static constexpr std::string format_string_static2 (const std::string_view fmt, const Args &...)
 
template<typename... Targs>
static constexpr std::string format_string_static3 (const std::string_view format, const Targs &...args)
 
 TEST_CASE ("jau::cfmt_00", "[jau][std::string][jau::cfmt]")
 
 TEST_CASE ("jau::cfmt_01", "[jau][std::string][format_string]")
 
 TEST_CASE ("jau::cfmt_10", "[benchmark][jau][std::string][format_string]")
 Execute with test_stringfmt --perf_analysis
 
template<typename Func>
static size_t test_format (const Func func, bool output)
 

Function Documentation

◆ format_string000()

template<typename... Args>
static constexpr std::string format_string000 ( const std::size_t maxStrLen,
const std::string & format,
const Args &... args )
staticconstexpr

Definition at line 48 of file test_stringfmt01.cpp.

◆ format_000a_vsnprintf()

static std::string format_000a_vsnprintf ( float fa,
float fb,
size_t sz1,
uint64_t a_u64,
int i )
static

Definition at line 66 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_010a_jaufmtstr()

static std::string format_010a_jaufmtstr ( float fa,
float fb,
size_t sz1,
uint64_t a_u64,
int i )
static

Definition at line 90 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_020a_jaufmtstr_n()

static constexpr std::string format_020a_jaufmtstr_n ( float fa,
float fb,
size_t sz1,
uint64_t a_u64,
int i )
staticconstexpr

Definition at line 97 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_030a_strstream()

static std::string format_030a_strstream ( float fa,
float fb,
size_t sz1,
uint64_t a_u64,
int i )
static

Definition at line 104 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_000b_vsnprintf()

static std::string format_000b_vsnprintf ( float fa,
float fb,
size_t sz1,
uint64_t a_u64,
int i )
static

Definition at line 122 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_010b_jaufmtstr()

static std::string format_010b_jaufmtstr ( float fa,
float fb,
size_t sz1,
uint64_t a_u64,
int i )
static

Definition at line 145 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_020b_jaufmtstr_n()

static std::string format_020b_jaufmtstr_n ( float fa,
float fb,
size_t sz1,
uint64_t a_u64,
int i )
static

Definition at line 152 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_030b_strstream()

static std::string format_030b_strstream ( float fa,
float fb,
size_t sz1,
uint64_t a_u64,
int i )
static

Definition at line 159 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ test_format()

template<typename Func>
static size_t test_format ( const Func func,
bool output )
static

Definition at line 181 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_0a()

static void format_0a ( )
static

Definition at line 197 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_0b()

static void format_0b ( )
static

Definition at line 207 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_string_static2()

template<typename... Args>
static constexpr std::string format_string_static2 ( const std::string_view fmt,
const Args & ... )
staticconstexpr

Definition at line 219 of file test_stringfmt01.cpp.

◆ check()

template<typename... Targs>
static constexpr jau::cfmt2::PResult check ( const std::string_view fmt,
const Targs & ... )
staticconstexprnoexcept

Definition at line 230 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_string_static3()

template<typename... Targs>
static constexpr std::string format_string_static3 ( const std::string_view format,
const Targs &... args )
staticconstexpr

Definition at line 235 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ TEST_CASE() [1/3]

TEST_CASE ( "jau::cfmt_00" ,
"" [jau][std::string][jau::cfmt] )

Definition at line 246 of file test_stringfmt01.cpp.

◆ TEST_CASE() [2/3]

TEST_CASE ( "jau::cfmt_01" ,
"" [jau][std::string][format_string] )

Definition at line 455 of file test_stringfmt01.cpp.

◆ TEST_CASE() [3/3]

TEST_CASE ( "jau::cfmt_10" ,
"" [benchmark][jau][std::string][format_string] )

Execute with test_stringfmt --perf_analysis

Definition at line 461 of file test_stringfmt01.cpp.