#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"
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 |
| #define DEFINE_CONSTRUCTED_FLAG | ( | T, | |
| dflt, | |||
| dflt_kind | |||
| ) |
Definition at line 139 of file bloaty/third_party/abseil-cpp/absl/flags/flag_test.cc.
Definition at line 190 of file bloaty/third_party/abseil-cpp/absl/flags/flag_test.cc.
| 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_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 | ( | 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_with_cb | , | ||
| 100 | , | ||
| "" | |||
| ) |
| ABSL_FLAG | ( | int | , |
| test_flag_with_lambda_cb | , | ||
| 200 | , | ||
| "" | |||
| ) |
Definition at line 668 of file bloaty/third_party/abseil-cpp/absl/flags/flag_test.cc.
| ABSL_FLAG | ( | int | , |
| test_int_flag_with_non_const_default | , | ||
| GetDflt1() | , | ||
| "test int flag non const default" | |||
| ) |
| ABSL_FLAG | ( | int32_t | , |
| test_flag_eb_02 | , | ||
| {} | , | ||
| "" | |||
| ) |
| 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_RETIRED_FLAG | ( | std::string | , |
| old_str_flag | , | ||
| "" | , | ||
| absl::StrCat("old ", "descr") | |||
| ) |
| bool initializaion_order_fiasco_test |
Definition at line 854 of file bloaty/third_party/abseil-cpp/absl/flags/flag_test.cc.