jaulib v1.3.6
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
test_enumutil.cpp File Reference
#include <cassert>
#include <cstring>
#include <string_view>
#include <jau/enum_util.hpp>
#include <jau/file_util.hpp>
#include <jau/test/catch2_ext.hpp>
Include dependency graph for test_enumutil.cpp:

Go to the source code of this file.

Namespaces

namespace  jau
 __pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
 
namespace  jau::fs
 Author: Sven Gothel sgoth.nosp@m.el@j.nosp@m.ausof.nosp@m.t.co.nosp@m.m Copyright (c) 2022 Gothel Software e.K.
 
namespace  test
 
namespace  test::local
 

Enumerations

enum class  test_type1_t : uint8_t { none = 0 , one = 1 , two = 2 , three = 3 }
 Author: Sven Gothel sgoth.nosp@m.el@j.nosp@m.ausof.nosp@m.t.co.nosp@m.m Copyright Gothel Software e.K. More...
 
enum class  test_type2_t : uint8_t { none = 0 , one , two , three }
 
enum class  test_type3_t : uint8_t { none = 0 , one = 1 << 0 , two = 1 << 1 , three = 1 << 2 }
 
enum class  test::local::test_type4_t : uint8_t { test::local::none = 0 , test::local::one = 1 << 0 , test::local::two = 1 << 1 , test::local::three = 1 << 2 }
 
enum class  test::local::test_type5_t : uint8_t { test::local::none = 0 , test::local::one = 10 , test::local::two = 20 , test::local::three = 30 }
 

Functions

 JAU_MAKE_BITFIELD_ENUM_STRING (test_type3_t, one, two, three)
 
 test::local::JAU_MAKE_BITFIELD_ENUM_STRING (test_type4_t, one, two, three)
 
 jau::fs::JAU_MAKE_ENUM_INFO (fmode_t, none, sock, blk, chr, fifo, dir, file, link, no_access, not_existing)
 
 jau::fs::JAU_MAKE_ENUM_INFO (mountflags_linux, none, rdonly, nosuid, nodev, noexec, synchronous, remount, mandlock, dirsync, noatime, nodiratime, bind, move, rec, silent, posixacl, unbindable, private_, slave, shared, relatime, kernmount, i_version, strictatime, lazytime, active, nouser)
 
 JAU_MAKE_ENUM_INFO (test_type1_t, none, one, two, three)
 
 JAU_MAKE_ENUM_INFO (test_type2_t, none, one, two, three)
 
 JAU_MAKE_ENUM_INFO (test_type3_t, none, one, two, three)
 
 test::local::JAU_MAKE_ENUM_INFO (test_type4_t, one, two, three)
 
 test::local::JAU_MAKE_ENUM_INFO (test_type5_t, one, two, three)
 
 JAU_MAKE_ENUM_STRING (test_type1_t, one, two, three)
 
 JAU_MAKE_ENUM_STRING (test_type2_t, one, two, three)
 
 test::local::JAU_MAKE_ENUM_STRING (test_type5_t, one, two, three)
 
 TEST_CASE ("Enum Class Value Type Test 10", "[enum][type]")
 
 TEST_CASE ("Enum Class Value Type Test 11", "[enum][type]")
 
template<typename enum_info_t>
void test_enum_info (size_t size)
 

Enumeration Type Documentation

◆ test_type1_t

enum class test_type1_t : uint8_t
strong

Author: Sven Gothel sgoth.nosp@m.el@j.nosp@m.ausof.nosp@m.t.co.nosp@m.m Copyright Gothel Software e.K.

SPDX-License-Identifier: MIT

This Source Code Form is subject to the terms of the MIT License If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/license/mit/.

Enumerator
none 
one 
two 
three 

Definition at line 20 of file test_enumutil.cpp.

◆ test_type2_t

enum class test_type2_t : uint8_t
strong
Enumerator
none 
one 
two 
three 

Definition at line 31 of file test_enumutil.cpp.

◆ test_type3_t

enum class test_type3_t : uint8_t
strong
Enumerator
none 
one 
two 
three 

Definition at line 42 of file test_enumutil.cpp.

Function Documentation

◆ JAU_MAKE_ENUM_STRING() [1/2]

JAU_MAKE_ENUM_STRING ( test_type1_t ,
one ,
two ,
three  )

◆ JAU_MAKE_ENUM_INFO() [1/3]

JAU_MAKE_ENUM_INFO ( test_type1_t ,
none ,
one ,
two ,
three  )

◆ JAU_MAKE_ENUM_STRING() [2/2]

JAU_MAKE_ENUM_STRING ( test_type2_t ,
one ,
two ,
three  )

◆ JAU_MAKE_ENUM_INFO() [2/3]

JAU_MAKE_ENUM_INFO ( test_type2_t ,
none ,
one ,
two ,
three  )

◆ JAU_MAKE_BITFIELD_ENUM_STRING()

JAU_MAKE_BITFIELD_ENUM_STRING ( test_type3_t ,
one ,
two ,
three  )

◆ JAU_MAKE_ENUM_INFO() [3/3]

JAU_MAKE_ENUM_INFO ( test_type3_t ,
none ,
one ,
two ,
three  )

◆ test_enum_info()

template<typename enum_info_t>
void test_enum_info ( size_t size)

Definition at line 60 of file test_enumutil.cpp.

Here is the caller graph for this function:

◆ TEST_CASE() [1/2]

TEST_CASE ( "Enum Class Value Type Test 10" ,
"" [enum][type] )

Definition at line 77 of file test_enumutil.cpp.

◆ TEST_CASE() [2/2]

TEST_CASE ( "Enum Class Value Type Test 11" ,
"" [enum][type] )

Definition at line 168 of file test_enumutil.cpp.