Gamp v0.0.7-67-g7798ac4
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
test_stringconv01.cpp File Reference
#include <cassert>
#include <cstring>
#include "jau/base_math.hpp"
#include "test_datatype01.hpp"
#include <jau/basic_types.hpp>
#include <jau/cpp_lang_util.hpp>
#include <jau/string_cfmt.hpp>
#include <jau/string_util.hpp>
#include <jau/test/catch2_ext.hpp>
#include <jau/type_traits_queries.hpp>
Include dependency graph for test_stringconv01.cpp:

Go to the source code of this file.

Typedefs

typedef std::vector< int > std_vec_int
 
typedef std_vec_int::const_iterator std_vec_int_citer
 
typedef std_vec_int_citer::pointer std_vec_int_citer_pointer
 
typedef decltype(std::declval< std_vec_int_citer >().operator->()) std_vec_int_citer_ptrop_retval
 
typedef std_vec_int::iterator std_vec_int_iter
 

Functions

 TEST_CASE ("Test 00 - to_string/appendIntString, fromIntString", "[jau][string][to_string][from_string]")
 
 TEST_CASE ("Test 03 - toBitString()", "[jau][string][toBitString]")
 
template<typename value_type>
static void testDecTo (int line, value_type v, std::string_view exp_s, const uint32_t min_width=0, const char separator=0)
 
template<typename value_type>
static void testFrom (int line, value_type exp_v, std::string_view in_s, uint32_t radix=10, const char separator=0)
 
template<typename value_type>
static void testTo (int line, value_type v, std::string_view exp_s, uint32_t radix, jau::LoUpCase capitalization=jau::LoUpCase::lower, jau::PrefixOpt prefix=jau::PrefixOpt::prefix, const uint32_t min_width=0, const char separator=0, const char padding='0')
 
static void testToBitString (std::string_view prefix, std::string_view exp_be_s, const uint64_t &exp_be_v, size_t max_bits, bool check_value=true)
 
static void testToBitString (std::string_view prefix, std::string_view s_be1, const uint32_t &v_be1)
 
template<typename value_type>
static void testToFrom (int line, value_type exp_v, const std::string &exp_s, uint32_t radix=10, jau::LoUpCase capitalization=jau::LoUpCase::lower, jau::PrefixOpt prefix=jau::PrefixOpt::prefix, const uint32_t min_width=0, const char separator=0, const char padding='0')
 
template<typename value_type>
static void testToFrom (int line, value_type exp_v, std::string_view exp_s, std::string_view in_s, uint32_t radix=10, jau::LoUpCase capitalization=jau::LoUpCase::lower, jau::PrefixOpt prefix=jau::PrefixOpt::prefix, const uint32_t min_width=0, const char separator=0, const char padding='0')
 

Typedef Documentation

◆ std_vec_int

typedef std::vector<int> std_vec_int

Definition at line 37 of file test_stringconv01.cpp.

◆ std_vec_int_iter

typedef std_vec_int::iterator std_vec_int_iter

Definition at line 39 of file test_stringconv01.cpp.

◆ std_vec_int_citer

typedef std_vec_int::const_iterator std_vec_int_citer

Definition at line 41 of file test_stringconv01.cpp.

◆ std_vec_int_citer_pointer

typedef std_vec_int_citer::pointer std_vec_int_citer_pointer

Definition at line 43 of file test_stringconv01.cpp.

◆ std_vec_int_citer_ptrop_retval

typedef decltype( std::declval<std_vec_int_citer>().operator->() ) std_vec_int_citer_ptrop_retval

Definition at line 45 of file test_stringconv01.cpp.

Function Documentation

◆ testDecTo()

template<typename value_type>
static void testDecTo ( int line,
value_type v,
std::string_view exp_s,
const uint32_t min_width = 0,
const char separator = 0 )
static

Definition at line 50 of file test_stringconv01.cpp.

Here is the caller graph for this function:

◆ testTo()

template<typename value_type>
static void testTo ( int line,
value_type v,
std::string_view exp_s,
uint32_t radix,
jau::LoUpCase capitalization = jau::LoUpCase::lower,
jau::PrefixOpt prefix = jau::PrefixOpt::prefix,
const uint32_t min_width = 0,
const char separator = 0,
const char padding = '0' )
static

Definition at line 67 of file test_stringconv01.cpp.

Here is the caller graph for this function:

◆ testToFrom() [1/2]

template<typename value_type>
static void testToFrom ( int line,
value_type exp_v,
std::string_view exp_s,
std::string_view in_s,
uint32_t radix = 10,
jau::LoUpCase capitalization = jau::LoUpCase::lower,
jau::PrefixOpt prefix = jau::PrefixOpt::prefix,
const uint32_t min_width = 0,
const char separator = 0,
const char padding = '0' )
static

Definition at line 127 of file test_stringconv01.cpp.

Here is the caller graph for this function:

◆ testToFrom() [2/2]

template<typename value_type>
static void testToFrom ( int line,
value_type exp_v,
const std::string & exp_s,
uint32_t radix = 10,
jau::LoUpCase capitalization = jau::LoUpCase::lower,
jau::PrefixOpt prefix = jau::PrefixOpt::prefix,
const uint32_t min_width = 0,
const char separator = 0,
const char padding = '0' )
static

Definition at line 141 of file test_stringconv01.cpp.

◆ testFrom()

template<typename value_type>
static void testFrom ( int line,
value_type exp_v,
std::string_view in_s,
uint32_t radix = 10,
const char separator = 0 )
static

Definition at line 149 of file test_stringconv01.cpp.

◆ TEST_CASE() [1/2]

TEST_CASE ( "Test 00 - to_string/ appendIntString,
fromIntString" ,
"" [jau][string][to_string][from_string] )

Definition at line 160 of file test_stringconv01.cpp.

◆ testToBitString() [1/2]

static void testToBitString ( std::string_view prefix,
std::string_view exp_be_s,
const uint64_t & exp_be_v,
size_t max_bits,
bool check_value = true )
static

Definition at line 442 of file test_stringconv01.cpp.

Here is the caller graph for this function:

◆ testToBitString() [2/2]

static void testToBitString ( std::string_view prefix,
std::string_view s_be1,
const uint32_t & v_be1 )
static

Definition at line 458 of file test_stringconv01.cpp.

◆ TEST_CASE() [2/2]

TEST_CASE ( "Test 03 - toBitString()" ,
"" [jau][string][toBitString] )

Definition at line 462 of file test_stringconv01.cpp.