jaulib v1.4.1-14-g15926ba
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
test_stringfmt_format.cpp File Reference
#include <sys/types.h>
#include <cassert>
#include <cinttypes>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string_view>
#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_literal.hpp>
#include <jau/string_util.hpp>
#include <jau/test/catch2_ext.hpp>
#include <jau/type_concepts.hpp>
#include <jau/type_traits_queries.hpp>
Include dependency graph for test_stringfmt_format.cpp:

Go to the source code of this file.

Functions

template<typename... Args>
static void checkFormat (int line, const char *fmt, const Args &...args)
 
 TEST_CASE ("binary", "[jau][std::string][jau::cfmt][flags]")
 
 TEST_CASE ("float padding_neg_numbers", "[jau][std::string][jau::cfmt][float]")
 
 TEST_CASE ("float", "[jau][std::string][jau::cfmt][float]")
 
 TEST_CASE ("hash_flag", "[jau][std::string][jau::cfmt][flags]")
 
 TEST_CASE ("hash_width_20", "[jau][std::string][jau::cfmt][padding]")
 
 TEST_CASE ("hash_zero_width_20", "[jau][std::string][jau::cfmt][padding]")
 
 TEST_CASE ("left_flag", "[jau][std::string][jau::cfmt][flags]")
 
 TEST_CASE ("length", "[jau][std::string][jau::cfmt][length]")
 
 TEST_CASE ("misc", "[jau][std::string][jau::cfmt][misc]")
 
 TEST_CASE ("padding neg_numbers", "[jau][std::string][jau::cfmt][padding]")
 
 TEST_CASE ("parse: width precision from arg", "[jau][std::string][jau::cfmt]")
 
 TEST_CASE ("parse: width precision from format", "[jau][std::string][jau::cfmt]")
 
 TEST_CASE ("plus_flag", "[jau][std::string][jau::cfmt][flags]")
 
 TEST_CASE ("pointer", "[jau][std::string][jau::cfmt][pointer]")
 
 TEST_CASE ("precision_20", "[jau][std::string][jau::cfmt][padding]")
 
 TEST_CASE ("single_conversion", "[jau][std::string][jau::cfmt]")
 
 TEST_CASE ("space_flag", "[jau][std::string][jau::cfmt][flags]")
 
 TEST_CASE ("specifier", "[jau][std::string][jau::cfmt][specifier]")
 
 TEST_CASE ("string length", "[jau][std::string][jau::cfmt][stringlen]")
 
 TEST_CASE ("thousands_flag", "[jau][std::string][jau::cfmt][flags]")
 
 TEST_CASE ("types", "[jau][std::string][jau::cfmt][types]")
 
 TEST_CASE ("unknown flag", "[jau][std::string][jau::cfmt][error]")
 
 TEST_CASE ("width", "[jau][std::string][jau::cfmt][width]")
 
 TEST_CASE ("width_20", "[jau][std::string][jau::cfmt][padding]")
 
 TEST_CASE ("width_20", "[jau][std::string][jau::cfmt][width]")
 
 TEST_CASE ("width_20_precision_5", "[jau][std::string][jau::cfmt][padding]")
 
 TEST_CASE ("width_left_20", "[jau][std::string][jau::cfmt][width]")
 
 TEST_CASE ("width_star_20", "[jau][std::string][jau::cfmt][width]")
 
 TEST_CASE ("zero_flag", "[jau][std::string][jau::cfmt][flags]")
 
 TEST_CASE ("zero_width_left_20", "[jau][std::string][jau::cfmt][width]")
 

Function Documentation

◆ TEST_CASE() [1/30]

TEST_CASE ( "parse: width precision from format" ,
"" [jau][std::string][jau::cfmt] )

Definition at line 45 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [2/30]

TEST_CASE ( "parse: width precision from arg" ,
"" [jau][std::string][jau::cfmt] )

Definition at line 118 of file test_stringfmt_format.cpp.

◆ checkFormat()

template<typename... Args>
static void checkFormat ( int line,
const char * fmt,
const Args &... args )
static
Examples
test_stringfmt_format.cpp.

Definition at line 192 of file test_stringfmt_format.cpp.

Here is the caller graph for this function:

◆ TEST_CASE() [3/30]

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

Definition at line 204 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [4/30]

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

Definition at line 381 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [5/30]

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

Definition at line 398 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [6/30]

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

Definition at line 406 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [7/30]

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

Definition at line 479 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [8/30]

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

Definition at line 547 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [9/30]

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

Definition at line 582 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [10/30]

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

Definition at line 647 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [11/30]

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

Definition at line 663 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [12/30]

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

Definition at line 713 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [13/30]

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

Definition at line 760 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [14/30]

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

Definition at line 807 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [15/30]

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

Definition at line 854 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [16/30]

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

Definition at line 916 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [17/30]

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

Definition at line 963 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [18/30]

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

Definition at line 1004 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [19/30]

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

Definition at line 1045 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [20/30]

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

Definition at line 1086 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [21/30]

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

Definition at line 1127 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [22/30]

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

Definition at line 1168 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [23/30]

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

Definition at line 1199 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [24/30]

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

Definition at line 1251 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [25/30]

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

Definition at line 1334 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [26/30]

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

Definition at line 1509 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [27/30]

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

Definition at line 1642 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [28/30]

TEST_CASE ( "unknown flag" ,
"" [jau][std::string][jau::cfmt][error] )

Definition at line 1695 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [29/30]

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

Definition at line 1705 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [30/30]

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

Definition at line 1732 of file test_stringfmt_format.cpp.