Macros | Functions | Variables
bloaty/third_party/abseil-cpp/absl/flags/flag_test.cc File Reference
#include "absl/flags/flag.h"
#include <stddef.h>
#include <stdint.h>
#include <atomic>
#include <cmath>
#include <new>
#include <string>
#include <thread>
#include <vector>
#include "gtest/gtest.h"
#include "absl/base/attributes.h"
#include "absl/base/macros.h"
#include "absl/flags/config.h"
#include "absl/flags/declare.h"
#include "absl/flags/internal/flag.h"
#include "absl/flags/marshalling.h"
#include "absl/flags/reflection.h"
#include "absl/flags/usage_config.h"
#include "absl/strings/match.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
Include dependency graph for bloaty/third_party/abseil-cpp/absl/flags/flag_test.cc:

Go to the source code of this file.

Macros

#define DEFINE_CONSTRUCTED_FLAG(T, dflt, dflt_kind)
 
#define TEST_CONSTRUCTED_FLAG(T)   TestConstructionFor(f1##T, f2##T);
 

Functions

 ABSL_DECLARE_FLAG (absl::Duration, test_flag_12)
 
 ABSL_DECLARE_FLAG (bool, test_flag_01)
 
 ABSL_DECLARE_FLAG (double, test_flag_09)
 
 ABSL_DECLARE_FLAG (float, test_flag_10)
 
 ABSL_DECLARE_FLAG (int, test_flag_02)
 
 ABSL_DECLARE_FLAG (int16_t, test_flag_03)
 
 ABSL_DECLARE_FLAG (int32_t, test_flag_05)
 
 ABSL_DECLARE_FLAG (int64_t, mistyped_int_flag)
 
 ABSL_DECLARE_FLAG (int64_t, test_flag_07)
 
 ABSL_DECLARE_FLAG (std::string, test_flag_11)
 
 ABSL_DECLARE_FLAG (std::vector< std::string >, mistyped_string_flag)
 
 ABSL_DECLARE_FLAG (uint16_t, test_flag_04)
 
 ABSL_DECLARE_FLAG (uint32_t, test_flag_06)
 
 ABSL_DECLARE_FLAG (uint64_t, test_flag_08)
 
 ABSL_FLAG (absl::Duration, test_flag_12, absl::Minutes(10), "test flag 12")
 
 ABSL_FLAG (bool, test_flag_01, true, "test flag 01")
 
 ABSL_FLAG (bool, test_flag_eb_01, {}, "")
 
 ABSL_FLAG (bool, test_flag_with_non_const_help, true, absl::StrCat("test ", "flag ", "non const help"))
 
 ABSL_FLAG (ConversionTestVal, test_flag_implicit_conv, ConversionTestVal::ViaImplicitConv::kTen, "test flag init via implicit conversion")
 
 ABSL_FLAG (CustomUDT, test_flag_custom_udt, CustomUDT(), "test flag custom UDT")
 
 ABSL_FLAG (double, test_flag_09, -9.876e-50, "test flag 09")
 
 ABSL_FLAG (double, test_flag_eb_04, {}, "")
 
 ABSL_FLAG (float, test_flag_10, 1.234e12f, "test flag 10")
 
 ABSL_FLAG (int, test_flag_02, 1234, "test flag 02")
 
 ABSL_FLAG (int, test_flag_with_cb, 100, "").OnUpdate(TestFlagCB)
 
 ABSL_FLAG (int, test_flag_with_lambda_cb, 200, "").OnUpdate([]()
 
 ABSL_FLAG (int, test_int_flag_with_non_const_default, GetDflt1(), "test int flag non const default")
 
 ABSL_FLAG (int16_t, test_flag_03, -34, "test flag 03")
 
 ABSL_FLAG (int32_t, test_flag_05, 10765, "test flag 05")
 
 ABSL_FLAG (int32_t, test_flag_eb_02, {}, "")
 
 ABSL_FLAG (int64_t, test_flag_07, -1234567, "test flag 07")
 
 ABSL_FLAG (int64_t, test_flag_eb_03, {}, "")
 
 ABSL_FLAG (NonDfltConstructible, ndc_flag1, NonDfltConstructible('1'), "Flag with non default constructible type")
 
 ABSL_FLAG (NonDfltConstructible, ndc_flag2, 0, "Flag with non default constructible type")
 
 ABSL_FLAG (NonTriviallyCopyableAggregate, test_flag_eb_06, {}, "")
 
 ABSL_FLAG (NonTriviallyCopyableUDT, test_flag_ntc_udt, {}, "help")
 
 ABSL_FLAG (SmallAlignUDT, test_flag_sa_udt, {}, "help")
 
 ABSL_FLAG (std::string, test_flag_11, "", "test flag 11")
 
 ABSL_FLAG (std::string, test_flag_eb_05, {}, "")
 
 ABSL_FLAG (std::string, test_string_flag_with_non_const_default, absl::StrCat("AAA", "BBB"), "test string flag non const default")
 
 ABSL_FLAG (uint16_t, test_flag_04, 189, "test flag 04")
 
 ABSL_FLAG (uint32_t, test_flag_06, 40000, "test flag 06")
 
 ABSL_FLAG (uint64_t, test_flag_08, 9876543, "test flag 08")
 
 ABSL_RETIRED_FLAG (bool, old_bool_flag, true, "old descr")
 
 ABSL_RETIRED_FLAG (int, old_int_flag,(int) std::sqrt(10), "old descr")
 
 ABSL_RETIRED_FLAG (std::string, old_str_flag, "", absl::StrCat("old ", "descr"))
 

Variables

bool initializaion_order_fiasco_test
 

Macro Definition Documentation

◆ DEFINE_CONSTRUCTED_FLAG

#define DEFINE_CONSTRUCTED_FLAG (   T,
  dflt,
  dflt_kind 
)
Value:
constexpr flags::FlagDefaultArg f1default##T{ \
flags::FlagDefaultSrc{dflt}, flags::FlagDefaultKind::dflt_kind}; \
constexpr absl::Flag<T> f1##T{"f1", "file", help_arg, f1default##T}; \
ABSL_CONST_INIT absl::Flag<T> f2##T { \
"f2", "file", \
{flags::FlagHelpMsg(&TestHelpMsg), flags::FlagHelpKind::kGenFunc}, \
flags::FlagDefaultArg { \
flags::FlagDefaultSrc(&TestMakeDflt<T>), \
flags::FlagDefaultKind::kGenFunc \
} \
}

Definition at line 139 of file bloaty/third_party/abseil-cpp/absl/flags/flag_test.cc.

◆ TEST_CONSTRUCTED_FLAG

#define TEST_CONSTRUCTED_FLAG (   T)    TestConstructionFor(f1##T, f2##T);

Function Documentation

◆ ABSL_DECLARE_FLAG() [1/14]

ABSL_DECLARE_FLAG ( absl::Duration  ,
test_flag_12   
)

◆ ABSL_DECLARE_FLAG() [2/14]

ABSL_DECLARE_FLAG ( bool  ,
test_flag_01   
)

◆ ABSL_DECLARE_FLAG() [3/14]

ABSL_DECLARE_FLAG ( double  ,
test_flag_09   
)

◆ ABSL_DECLARE_FLAG() [4/14]

ABSL_DECLARE_FLAG ( float  ,
test_flag_10   
)

◆ ABSL_DECLARE_FLAG() [5/14]

ABSL_DECLARE_FLAG ( int  ,
test_flag_02   
)

◆ ABSL_DECLARE_FLAG() [6/14]

ABSL_DECLARE_FLAG ( int16_t  ,
test_flag_03   
)

◆ ABSL_DECLARE_FLAG() [7/14]

ABSL_DECLARE_FLAG ( int32_t  ,
test_flag_05   
)

◆ ABSL_DECLARE_FLAG() [8/14]

ABSL_DECLARE_FLAG ( int64_t  ,
mistyped_int_flag   
)

◆ ABSL_DECLARE_FLAG() [9/14]

ABSL_DECLARE_FLAG ( int64_t  ,
test_flag_07   
)

◆ ABSL_DECLARE_FLAG() [10/14]

ABSL_DECLARE_FLAG ( std::string  ,
test_flag_11   
)

◆ ABSL_DECLARE_FLAG() [11/14]

ABSL_DECLARE_FLAG ( std::vector< std::string >  ,
mistyped_string_flag   
)

◆ ABSL_DECLARE_FLAG() [12/14]

ABSL_DECLARE_FLAG ( uint16_t  ,
test_flag_04   
)

◆ ABSL_DECLARE_FLAG() [13/14]

ABSL_DECLARE_FLAG ( uint32_t  ,
test_flag_06   
)

◆ ABSL_DECLARE_FLAG() [14/14]

ABSL_DECLARE_FLAG ( uint64_t  ,
test_flag_08   
)

◆ ABSL_FLAG() [1/29]

ABSL_FLAG ( absl::Duration  ,
test_flag_12  ,
absl::Minutes(10)  ,
"test flag 12"   
)

◆ ABSL_FLAG() [2/29]

ABSL_FLAG ( bool  ,
test_flag_01  ,
true  ,
"test flag 01"   
)

◆ ABSL_FLAG() [3/29]

ABSL_FLAG ( bool  ,
test_flag_eb_01  ,
{}  ,
""   
)

◆ ABSL_FLAG() [4/29]

ABSL_FLAG ( bool  ,
test_flag_with_non_const_help  ,
true  ,
absl::StrCat("test ", "flag ", "non const help")   
)

◆ ABSL_FLAG() [5/29]

ABSL_FLAG ( ConversionTestVal  ,
test_flag_implicit_conv  ,
ConversionTestVal::ViaImplicitConv::kTen  ,
"test flag init via implicit conversion"   
)

◆ ABSL_FLAG() [6/29]

ABSL_FLAG ( CustomUDT  ,
test_flag_custom_udt  ,
CustomUDT()  ,
"test flag custom UDT  
)

◆ ABSL_FLAG() [7/29]

ABSL_FLAG ( double  ,
test_flag_09  ,
-9.876e-  50,
"test flag 09"   
)

◆ ABSL_FLAG() [8/29]

ABSL_FLAG ( double  ,
test_flag_eb_04  ,
{}  ,
""   
)

◆ ABSL_FLAG() [9/29]

ABSL_FLAG ( float  ,
test_flag_10  ,
1.  234e12f,
"test flag 10"   
)

◆ ABSL_FLAG() [10/29]

ABSL_FLAG ( int  ,
test_flag_02  ,
1234  ,
"test flag 02"   
)

◆ ABSL_FLAG() [11/29]

ABSL_FLAG ( int  ,
test_flag_with_cb  ,
100  ,
""   
)

◆ ABSL_FLAG() [12/29]

ABSL_FLAG ( int  ,
test_flag_with_lambda_cb  ,
200  ,
""   
)

◆ ABSL_FLAG() [13/29]

ABSL_FLAG ( int  ,
test_int_flag_with_non_const_default  ,
GetDflt1()  ,
"test int flag non const default"   
)

◆ ABSL_FLAG() [14/29]

ABSL_FLAG ( int16_t  ,
test_flag_03  ,
34,
"test flag 03"   
)

◆ ABSL_FLAG() [15/29]

ABSL_FLAG ( int32_t  ,
test_flag_05  ,
10765  ,
"test flag 05"   
)

◆ ABSL_FLAG() [16/29]

ABSL_FLAG ( int32_t  ,
test_flag_eb_02  ,
{}  ,
""   
)

◆ ABSL_FLAG() [17/29]

ABSL_FLAG ( int64_t  ,
test_flag_07  ,
1234567,
"test flag 07"   
)

◆ ABSL_FLAG() [18/29]

ABSL_FLAG ( int64_t  ,
test_flag_eb_03  ,
{}  ,
""   
)

◆ ABSL_FLAG() [19/29]

ABSL_FLAG ( NonDfltConstructible  ,
ndc_flag1  ,
NonDfltConstructible( '1')  ,
"Flag with non default constructible type  
)

◆ ABSL_FLAG() [20/29]

ABSL_FLAG ( NonDfltConstructible  ,
ndc_flag2  ,
,
"Flag with non default constructible type  
)

◆ ABSL_FLAG() [21/29]

ABSL_FLAG ( NonTriviallyCopyableAggregate  ,
test_flag_eb_06  ,
{}  ,
""   
)

◆ ABSL_FLAG() [22/29]

ABSL_FLAG ( NonTriviallyCopyableUDT  ,
test_flag_ntc_udt  ,
{}  ,
"help"   
)

◆ ABSL_FLAG() [23/29]

ABSL_FLAG ( SmallAlignUDT  ,
test_flag_sa_udt  ,
{}  ,
"help"   
)

◆ ABSL_FLAG() [24/29]

ABSL_FLAG ( std::string  ,
test_flag_11  ,
""  ,
"test flag 11"   
)

◆ ABSL_FLAG() [25/29]

ABSL_FLAG ( std::string  ,
test_flag_eb_05  ,
{}  ,
""   
)

◆ ABSL_FLAG() [26/29]

ABSL_FLAG ( std::string  ,
test_string_flag_with_non_const_default  ,
absl::StrCat("AAA", "BBB")  ,
"test string flag non const default"   
)

◆ ABSL_FLAG() [27/29]

ABSL_FLAG ( uint16_t  ,
test_flag_04  ,
189  ,
"test flag 04"   
)

◆ ABSL_FLAG() [28/29]

ABSL_FLAG ( uint32_t  ,
test_flag_06  ,
40000  ,
"test flag 06"   
)

◆ ABSL_FLAG() [29/29]

ABSL_FLAG ( uint64_t  ,
test_flag_08  ,
9876543  ,
"test flag 08"   
)

◆ ABSL_RETIRED_FLAG() [1/3]

ABSL_RETIRED_FLAG ( bool  ,
old_bool_flag  ,
true  ,
"old descr"   
)

◆ ABSL_RETIRED_FLAG() [2/3]

ABSL_RETIRED_FLAG ( int  ,
old_int_flag  ,
(int) std::sqrt(10)  ,
"old descr"   
)

◆ ABSL_RETIRED_FLAG() [3/3]

ABSL_RETIRED_FLAG ( std::string  ,
old_str_flag  ,
""  ,
absl::StrCat("old ", "descr")   
)

Variable Documentation

◆ initializaion_order_fiasco_test

bool initializaion_order_fiasco_test
Initial value:
= [] {
auto* handle1 = absl::FindCommandLineFlag("flag_on_separate_file");
auto* handle2 = absl::FindCommandLineFlag("retired_flag_on_separate_file");
if (handle1 != nullptr && handle2 != nullptr) {
return handle1->Name() == handle2->Name();
}
return true;
}()

Definition at line 854 of file bloaty/third_party/abseil-cpp/absl/flags/flag_test.cc.

xds_manager.f1
f1
Definition: xds_manager.py:42
absl::FindCommandLineFlag
CommandLineFlag * FindCommandLineFlag(absl::string_view name)
Definition: abseil-cpp/absl/flags/reflection.cc:336
T
#define T(upbtypeconst, upbtype, ctype, default_value)
absl::flags_internal::FlagHelpMsg
Definition: abseil-cpp/absl/flags/internal/flag.h:203
absl::flags_internal::Flag
Definition: abseil-cpp/absl/flags/declare.h:36
absl::flags_internal::FlagDefaultArg
Definition: abseil-cpp/absl/flags/internal/flag.h:271
xds_manager.f2
f2
Definition: xds_manager.py:85


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:13