Gamp v0.0.8
Gamp: Graphics, Audio, Multimedia and Processing
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.

Classes

class  SomeClass
 

Enumerations

enum class  game_t : uint16_t {
  none , chess , pacman , mrdo ,
  none , chess , pacman , mrdo ,
  none , chess , pacman , mrdo
}
 
enum class  plainenum_t : uint16_t {
  none , lala , lili , none ,
  lala , lili , none , lala ,
  lili
}
 

Functions

template<typename... Args>
static void checkFormat (int line, const char *fmt, const Args &...args)
 
 JAU_MAKE_ENUM_STRING (game_t, chess, pacman, mrdo)
 
 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 ("integral_conversion", "[jau][std::string][jau::cfmt]")
 
 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]")
 

Enumeration Type Documentation

◆ game_t

enum class game_t : uint16_t
strong
Enumerator
none 
chess 
pacman 
mrdo 
none 
chess 
pacman 
mrdo 
none 
chess 
pacman 
mrdo 

Definition at line 208 of file test_stringfmt_format.cpp.

◆ plainenum_t

enum class plainenum_t : uint16_t
strong
Enumerator
none 
lala 
lili 
none 
lala 
lili 
none 
lala 
lili 

Definition at line 216 of file test_stringfmt_format.cpp.

Function Documentation

◆ TEST_CASE() [1/31]

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/31]

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:

◆ JAU_MAKE_ENUM_STRING()

JAU_MAKE_ENUM_STRING ( game_t ,
chess ,
pacman ,
mrdo  )

◆ TEST_CASE() [3/31]

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

Definition at line 222 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [4/31]

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

Definition at line 449 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [5/31]

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

Definition at line 474 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [6/31]

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

Definition at line 528 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [7/31]

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

Definition at line 536 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [8/31]

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

Definition at line 609 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [9/31]

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

Definition at line 677 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [10/31]

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

Definition at line 712 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [11/31]

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

Definition at line 777 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [12/31]

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

Definition at line 793 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [13/31]

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

Definition at line 843 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [14/31]

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

Definition at line 890 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [15/31]

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

Definition at line 937 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [16/31]

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

Definition at line 984 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [17/31]

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

Definition at line 1046 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [18/31]

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

Definition at line 1093 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [19/31]

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

Definition at line 1134 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [20/31]

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

Definition at line 1175 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [21/31]

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

Definition at line 1216 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [22/31]

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

Definition at line 1257 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [23/31]

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

Definition at line 1298 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [24/31]

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

Definition at line 1329 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [25/31]

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

Definition at line 1381 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [26/31]

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

Definition at line 1464 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [27/31]

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

Definition at line 1639 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [28/31]

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

Definition at line 1772 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [29/31]

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

Definition at line 1825 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [30/31]

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

Definition at line 1835 of file test_stringfmt_format.cpp.

◆ TEST_CASE() [31/31]

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

Definition at line 1862 of file test_stringfmt_format.cpp.