jaulib v1.3.6
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/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>
constexpr jau::cfmt2::PResult check (const std::string_view fmt, const Targs &...) noexcept
 
std::string format_000a_vsnprintf (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
std::string format_000b_vsnprintf (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
std::string format_010a_vsnprintf (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
std::string format_010b_vsnprintf (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
constexpr std::string format_020a_tsnprintf (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
std::string format_020b_tsnprintf (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
std::string format_030a_strstream (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
std::string format_030b_strstream (float fa, float fb, size_t sz1, uint64_t a_u64, int i)
 
void format_0a ()
 
void format_0b ()
 
template<typename... Args>
constexpr std::string format_string000 (const std::size_t maxStrLen, const std::string_view format, const Args &...args)
 
template<typename... Args>
constexpr std::string format_string_static2 (const std::string_view fmt, const Args &...)
 
template<typename... Targs>
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>
size_t test_format (const Func func, bool output)
 

Function Documentation

◆ format_string000()

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

Definition at line 47 of file test_stringfmt01.cpp.

◆ format_000a_vsnprintf()

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

Definition at line 65 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_010a_vsnprintf()

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

Definition at line 87 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_020a_tsnprintf()

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

Definition at line 92 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_030a_strstream()

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

Definition at line 97 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_000b_vsnprintf()

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

Definition at line 115 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_010b_vsnprintf()

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

Definition at line 136 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_020b_tsnprintf()

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

Definition at line 141 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_030b_strstream()

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

Definition at line 146 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ test_format()

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

Definition at line 168 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_0a()

void format_0a ( )

Definition at line 184 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_0b()

void format_0b ( )

Definition at line 194 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_string_static2()

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

Definition at line 206 of file test_stringfmt01.cpp.

◆ check()

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

Definition at line 217 of file test_stringfmt01.cpp.

Here is the caller graph for this function:

◆ format_string_static3()

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

Definition at line 222 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 233 of file test_stringfmt01.cpp.

◆ TEST_CASE() [2/3]

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

Definition at line 425 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 431 of file test_stringfmt01.cpp.