Home
last modified time | relevance | path

Searched refs:opt (Results 1 – 25 of 61) sorted by relevance

123

/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/optional/optional.object/optional.object.assign/
Demplace.pass.cpp63 optional<int> opt; in main() local
64 opt.emplace(); in main()
65 assert(static_cast<bool>(opt) == true); in main()
66 assert(*opt == 0); in main()
69 optional<int> opt; in main() local
70 opt.emplace(1); in main()
71 assert(static_cast<bool>(opt) == true); in main()
72 assert(*opt == 1); in main()
75 optional<int> opt(2); in main() local
76 opt.emplace(); in main()
[all …]
Dassign_value.pass.cpp40 optional<int> opt; in main() local
41 opt = 1; in main()
42 assert(static_cast<bool>(opt) == true); in main()
43 assert(*opt == 1); in main()
46 optional<int> opt; in main() local
48 opt = i; in main()
49 assert(static_cast<bool>(opt) == true); in main()
50 assert(*opt == i); in main()
53 optional<int> opt(3); in main() local
55 opt = i; in main()
[all …]
Dcopy.pass.cpp42 optional<int> opt; in main() local
44 opt = opt2; in main()
46 assert(static_cast<bool>(opt) == static_cast<bool>(opt2)); in main()
49 optional<int> opt; in main() local
51 opt = opt2; in main()
54 assert(static_cast<bool>(opt) == static_cast<bool>(opt2)); in main()
55 assert(*opt == *opt2); in main()
58 optional<int> opt(3); in main() local
60 opt = opt2; in main()
62 assert(static_cast<bool>(opt) == static_cast<bool>(opt2)); in main()
[all …]
Dnullopt_t.pass.cpp38 optional<int> opt; in main() local
39 static_assert(noexcept(opt = nullopt) == true, ""); in main()
40 opt = nullopt; in main()
41 assert(static_cast<bool>(opt) == false); in main()
44 optional<int> opt(3); in main() local
45 opt = nullopt; in main()
46 assert(static_cast<bool>(opt) == false); in main()
49 optional<X> opt; in main() local
50 static_assert(noexcept(opt = nullopt) == true, ""); in main()
52 opt = nullopt; in main()
[all …]
Dmove.pass.cpp51 optional<int> opt; in main() local
53 opt = std::move(opt2); in main()
55 assert(static_cast<bool>(opt) == static_cast<bool>(opt2)); in main()
58 optional<int> opt; in main() local
60 opt = std::move(opt2); in main()
63 assert(static_cast<bool>(opt) == static_cast<bool>(opt2)); in main()
64 assert(*opt == *opt2); in main()
67 optional<int> opt(3); in main() local
69 opt = std::move(opt2); in main()
71 assert(static_cast<bool>(opt) == static_cast<bool>(opt2)); in main()
[all …]
Demplace_initializer_list.pass.cpp80 optional<X> opt(x); in main() local
82 opt.emplace({1, 2}); in main()
84 assert(*opt == X({1, 2})); in main()
88 optional<std::vector<int>> opt; in main() local
89 opt.emplace({1, 2, 3}, std::allocator<int>()); in main()
90 assert(static_cast<bool>(opt) == true); in main()
91 assert(*opt == std::vector<int>({1, 2, 3})); in main()
94 optional<Y> opt; in main() local
95 opt.emplace({1, 2}); in main()
96 assert(static_cast<bool>(opt) == true); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/optional/optional.hash/
Dhash.pass.cpp27 optional<T> opt; in main() local
28 assert(std::hash<optional<T>>{}(opt) == 0); in main()
29 opt = 2; in main()
30 assert(std::hash<optional<T>>{}(opt) == std::hash<T>{}(*opt)); in main()
34 optional<T> opt; in main() local
35 assert(std::hash<optional<T>>{}(opt) == 0); in main()
36 opt = std::string("123"); in main()
37 assert(std::hash<optional<T>>{}(opt) == std::hash<T>{}(*opt)); in main()
41 optional<T> opt; in main() local
42 assert(std::hash<optional<T>>{}(opt) == 0); in main()
[all …]
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/optional/optional.object/optional.object.ctor/
Din_place_t.pass.cpp67 constexpr optional<int> opt(in_place, 5); in main() local
68 static_assert(static_cast<bool>(opt) == true, ""); in main()
69 static_assert(*opt == 5, ""); in main()
80 const optional<X> opt(in_place); in main() local
81 assert(static_cast<bool>(opt) == true); in main()
82 assert(*opt == X()); in main()
85 const optional<X> opt(in_place, 5); in main() local
86 assert(static_cast<bool>(opt) == true); in main()
87 assert(*opt == X(5)); in main()
90 const optional<X> opt(in_place, 5, 4); in main() local
[all …]
Drvalue_T.pass.cpp57 constexpr optional<T> opt(T(5)); in main() local
58 static_assert(static_cast<bool>(opt) == true, ""); in main()
59 static_assert(*opt == 5, ""); in main()
69 constexpr optional<T> opt(T(3)); in main() local
70 static_assert(static_cast<bool>(opt) == true, ""); in main()
71 static_assert(*opt == 3, ""); in main()
81 optional<T> opt(T(3)); in main() local
82 assert(static_cast<bool>(opt) == true); in main()
83 assert(*opt == 3); in main()
87 constexpr optional<T> opt(T(3)); in main() local
[all …]
Dconst_T.pass.cpp57 constexpr optional<T> opt(t); in main() local
58 static_assert(static_cast<bool>(opt) == true, ""); in main()
59 static_assert(*opt == 5, ""); in main()
71 constexpr optional<T> opt(t); in main() local
72 static_assert(static_cast<bool>(opt) == true, ""); in main()
73 static_assert(*opt == 3, ""); in main()
85 optional<T> opt(t); in main() local
86 assert(static_cast<bool>(opt) == true); in main()
87 assert(*opt == 3); in main()
92 constexpr optional<T> opt(t); in main() local
[all …]
Dinitializer_list.pass.cpp80 optional<std::vector<int>> opt(in_place, {3, 1}); in main() local
81 assert(static_cast<bool>(opt) == true); in main()
82 assert((*opt == std::vector<int>{3, 1})); in main()
83 assert(opt->size() == 2); in main()
86 optional<std::vector<int>> opt(in_place, {3, 1}, std::allocator<int>()); in main()
87 assert(static_cast<bool>(opt) == true); in main()
88 assert((*opt == std::vector<int>{3, 1})); in main()
89 assert(opt->size() == 2); in main()
93 constexpr optional<Y> opt(in_place, {3, 1}); in main() local
94 static_assert(static_cast<bool>(opt) == true, ""); in main()
[all …]
Ddefault.pass.cpp27 constexpr Opt opt; in test_constexpr() local
28 static_assert(static_cast<bool>(opt) == false, ""); in test_constexpr()
43 Opt opt; in test() local
44 assert(static_cast<bool>(opt) == false); in test()
Dnullopt_t.pass.cpp29 constexpr Opt opt(nullopt); in test_constexpr() local
30 static_assert(static_cast<bool>(opt) == false, ""); in test_constexpr()
44 Opt opt(nullopt); in test() local
45 assert(static_cast<bool>(opt) == false); in test()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/optional/optional.object/optional.object.observe/
Dvalue_or_const.pass.cpp46 constexpr optional<X> opt(2); in main() local
48 static_assert(opt.value_or(y) == 2, ""); in main()
51 constexpr optional<X> opt(2); in main() local
52 static_assert(opt.value_or(Y(3)) == 2, ""); in main()
55 constexpr optional<X> opt; in main() local
57 static_assert(opt.value_or(y) == 3, ""); in main()
60 constexpr optional<X> opt; in main() local
61 static_assert(opt.value_or(Y(3)) == 4, ""); in main()
64 const optional<X> opt(2); in main() local
66 assert(opt.value_or(y) == 2); in main()
[all …]
Dvalue_or.pass.cpp49 optional<X> opt(in_place, 2); in main() local
51 assert(std::move(opt).value_or(y) == 2); in main()
52 assert(*opt == 0); in main()
55 optional<X> opt(in_place, 2); in main() local
56 assert(std::move(opt).value_or(Y(3)) == 2); in main()
57 assert(*opt == 0); in main()
60 optional<X> opt; in main() local
62 assert(std::move(opt).value_or(y) == 3); in main()
63 assert(!opt); in main()
66 optional<X> opt; in main() local
[all …]
Dop_arrow_const.pass.cpp48 constexpr optional<X> opt(X{}); in main() local
49 static_assert(opt->test() == 3, ""); in main()
52 constexpr optional<Y> opt(Y{}); in main() local
53 assert(opt->test() == 2); in main()
56 constexpr optional<Z> opt(Z{}); in main() local
57 assert(opt->test() == 1); in main()
61 const optional<X> opt; in main() local
62 assert(opt->test() == 3); in main()
Ddereference_const.pass.cpp42 constexpr optional<X> opt(X{}); in main() local
43 static_assert((*opt).test() == 3, ""); in main()
46 constexpr optional<Y> opt(Y{}); in main() local
47 assert((*opt).test() == 2); in main()
51 const optional<X> opt; in main() local
52 assert((*opt).test() == 3); in main()
Dvalue_const.pass.cpp39 constexpr optional<X> opt(in_place); in main() local
40 static_assert(opt.value().test() == 3, ""); in main()
43 const optional<X> opt(in_place); in main() local
44 assert(opt.value().test() == 3); in main()
47 const optional<X> opt; in main() local
50 opt.value(); in main()
Dvalue.pass.cpp37 optional<X> opt; in main() local
38 opt.emplace(); in main()
39 assert(opt.value().test() == 4); in main()
42 optional<X> opt; in main() local
45 opt.value(); in main()
Dbool.pass.cpp24 constexpr optional<int> opt; in main() local
25 static_assert(!opt, ""); in main()
28 constexpr optional<int> opt(0); in main() local
29 static_assert(opt, ""); in main()
Dop_arrow.pass.cpp38 optional<X> opt(X{}); in main() local
39 assert(opt->test() == 3); in main()
43 optional<X> opt; in main() local
44 assert(opt->test() == 3); in main()
Ddereference.pass.cpp38 optional<X> opt(X{}); in main() local
39 assert((*opt).test() == 4); in main()
43 optional<X> opt; in main() local
44 assert((*opt).test() == 3); in main()
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/optional/optional.specalg/
Dmake_optional.pass.cpp29 optional<int> opt = make_optional(2); in main() local
30 assert(*opt == 2); in main()
34 optional<std::string> opt = make_optional(s); in main() local
35 assert(*opt == s); in main()
39 optional<std::string> opt = make_optional(std::move(s)); in main() local
40 assert(*opt == "123"); in main()
45 optional<std::unique_ptr<int>> opt = make_optional(std::move(s)); in main() local
46 assert(**opt == 3); in main()
/ndk/tests/
Dcheck-release.sh40 for opt; do
41 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
42 case $opt in
53 panic "Unknown option '$opt'. See --help for list of valid ones."
57 NDK_DIR=$opt
/ndk/tests/build/b14811006-GOT_PREL-optimization/
Dbuild.sh36 for opt do
37 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
38 case "$opt" in

123