16#include <jau/test/catch2_ext.hpp> 
   52    JAU_MAKE_ENUM_INFO(
fmode_t, 
none, 
sock, 
blk, 
chr, 
fifo, 
dir, 
file, 
link, 
no_access, 
not_existing);
 
   53    JAU_MAKE_ENUM_INFO(
mountflags_linux, 
none, 
rdonly, 
nosuid, 
nodev, 
noexec, 
synchronous, 
remount, 
mandlock, 
dirsync, 
noatime,
 
   54                       nodiratime, 
bind, 
move, 
rec, 
silent, 
posixacl, 
unbindable, 
private_, 
slave, 
shared, 
relatime,
 
   58template<
typename enum_info_t>
 
   63    typedef typename enum_info_t::iterator iterator;
 
   64    typedef typename enum_info_t::value_type enum_t;
 
   65    const enum_info_t& ei = enum_info_t::get();
 
   66    std::cout << ei << std::endl;
 
   67    std::cout << 
"Enum type: " << ei.name() << std::endl;
 
   69    for(iterator iter = ei.begin(); iter != ei.end(); ++iter, ++i) {
 
   71        std::cout << 
"#" << i << 
": " << ev << 
", value: " << std::to_string( *ev ) << std::endl;
 
   73    REQUIRE( size == enum_info_t::size() );
 
 
   76TEST_CASE( 
"Enum Class Value Type Test 10", 
"[enum][type]" ) {
 
   96            for(std::string_view sv : nt.names) {
 
   97                std::cout << 
"NameTable: val -> string: " << sv << std::endl;
 
   98                REQUIRE( 
false == sv.empty() );
 
  102                std::cout << 
"ValueTable: val: " << 
static_cast<int>(v) << std::endl;
 
  108        static_assert( 4 == test_type2_t_info_t::size() );
 
  117        static_assert( 4 == test_type3_t_info_t::size() );
 
 
  167TEST_CASE( 
"Enum Class Value Type Test 11", 
"[enum][type]" ) {
 
  170        static_assert( 3 == test_type4_t_info_t::size() );
 
  188        static_assert( 3 == test_type5_t_info_t::size() );
 
 
consteval_cxx20 std::string_view name() noexcept
 
constexpr std::underlying_type_t< E > number(const E v) noexcept
 
consteval_cxx20 NameTable< Vargs... > get_names() noexcept
 
#define JAU_MAKE_ENUM_STRING(type,...)
 
constexpr ValueTable< std::common_type_t< Args... >, sizeof...(Args)> get_values(Args... args) noexcept
 
#define JAU_MAKE_BITFIELD_ENUM_STRING(type,...)
 
consteval_cxx20 bool is_enum() noexcept
 
consteval_cxx20 std::string_view long_name() noexcept
 
#define JAU_MAKE_ENUM_INFO(type,...)
 
mountflags_linux
Flag bit values for mount() flags under GNU/Linux.
 
fmode_t
Generic file type and POSIX protection mode bits as used in file_stats, touch(), mkdir() etc.
 
@ no_access
Type: Entity gives no access to user, exclusive bit.
 
@ link
Type: Entity is a symbolic link, might be in combination with file or dir, fifo, chr,...
 
@ sock
Type: Entity is a socket, might be in combination with link.
 
@ chr
Type: Entity is a character device, might be in combination with link.
 
@ dir
Type: Entity is a directory, might be in combination with link.
 
@ file
Type: Entity is a file, might be in combination with link.
 
@ blk
Type: Entity is a block device, might be in combination with link.
 
@ not_existing
Type: Entity does not exist, exclusive bit.
 
@ fifo
Type: Entity is a fifo/pipe, might be in combination with link.
 
Author: Sven Gothel sgothel@jausoft.com Copyright Gothel Software e.K.
 
Author: Sven Gothel sgothel@jausoft.com Copyright (c) 2022 Gothel Software e.K.
 
std::string to_string(const bit_order_t v) noexcept
Return std::string representation of the given bit_order_t.
 
TEST_CASE("Enum Class Value Type Test 10", "[enum][type]")
 
static void test_enum_info(size_t size)
 
test_type1_t
Author: Sven Gothel sgothel@jausoft.com Copyright Gothel Software e.K.