Home
last modified time | relevance | path

Searched refs:value_or (Results 1 – 25 of 243) sorted by relevance

12345678910

/external/perfetto/src/trace_processor/importers/json/
Djson_utils_unittest.cc29 ASSERT_EQ(CoerceToUint32(Json::Value(42)).value_or(0), 42u); in TEST()
30 ASSERT_EQ(CoerceToUint32(Json::Value("42")).value_or(0), 42u); in TEST()
31 ASSERT_EQ(CoerceToInt64(Json::Value(42.1)).value_or(-1), 42); in TEST()
35 ASSERT_EQ(CoerceToInt64(Json::Value(42)).value_or(-1), 42); in TEST()
36 ASSERT_EQ(CoerceToInt64(Json::Value("42")).value_or(-1), 42); in TEST()
37 ASSERT_EQ(CoerceToInt64(Json::Value(42.1)).value_or(-1), 42); in TEST()
42 ASSERT_EQ(CoerceToInt64(Json::Value{n}).value_or(0), -1); in TEST()
46 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value(42)).value_or(-1), 42000); in TEST()
47 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value("42")).value_or(-1), 42000); in TEST()
48 ASSERT_EQ(CoerceToTs(TimeUnit::kUs, Json::Value(42.1)).value_or(-1), 42100); in TEST()
[all …]
Djson_tracker_unittest.cc30 ASSERT_EQ(tracker.CoerceToTs(Json::Value(42)).value_or(-1), 42); in TEST()
35 ASSERT_EQ(tracker.CoerceToTs(Json::Value(42)).value_or(-1), 42000); in TEST()
/external/webrtc/p2p/base/
Dice_transport_internal.cc42 return receiving_timeout.value_or(RECEIVING_TIMEOUT); in receiving_timeout_or_default()
45 return backup_connection_ping_interval.value_or( in backup_connection_ping_interval_or_default()
49 return stable_writable_connection_ping_interval.value_or( in stable_writable_connection_ping_interval_or_default()
53 return regather_on_failed_networks_interval.value_or( in regather_on_failed_networks_interval_or_default()
57 return receiving_switching_delay.value_or(RECEIVING_SWITCHING_DELAY); in receiving_switching_delay_or_default()
60 return ice_check_interval_strong_connectivity.value_or(STRONG_PING_INTERVAL); in ice_check_interval_strong_connectivity_or_default()
63 return ice_check_interval_weak_connectivity.value_or(WEAK_PING_INTERVAL); in ice_check_interval_weak_connectivity_or_default()
66 return ice_check_min_interval.value_or(-1); in ice_check_min_interval_or_default()
69 return ice_unwritable_timeout.value_or(CONNECTION_WRITE_CONNECT_TIMEOUT); in ice_unwritable_timeout_or_default()
72 return ice_unwritable_min_checks.value_or(CONNECTION_WRITE_CONNECT_FAILURES); in ice_unwritable_min_checks_or_default()
[all …]
/external/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/
Dvalue_or_const.pass.cpp44 static_assert(opt.value_or(y) == 2, ""); in main()
48 static_assert(opt.value_or(Y(3)) == 2, ""); in main()
53 static_assert(opt.value_or(y) == 3, ""); in main()
57 static_assert(opt.value_or(Y(3)) == 4, ""); in main()
62 assert(opt.value_or(y) == 2); in main()
66 assert(opt.value_or(Y(3)) == 2); in main()
71 assert(opt.value_or(y) == 3); in main()
75 assert(opt.value_or(Y(3)) == 4); in main()
Dvalue_or.pass.cpp49 assert(std::move(opt).value_or(y) == 2); in test()
54 assert(std::move(opt).value_or(Y(3)) == 2); in test()
60 assert(std::move(opt).value_or(y) == 3); in test()
65 assert(std::move(opt).value_or(Y(3)) == 4); in test()
/external/llvm-project/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/
Dvalue_or_const.pass.cpp45 static_assert(opt.value_or(y) == 2, ""); in main()
49 static_assert(opt.value_or(Y(3)) == 2, ""); in main()
54 static_assert(opt.value_or(y) == 3, ""); in main()
58 static_assert(opt.value_or(Y(3)) == 4, ""); in main()
63 assert(opt.value_or(y) == 2); in main()
67 assert(opt.value_or(Y(3)) == 2); in main()
72 assert(opt.value_or(y) == 3); in main()
76 assert(opt.value_or(Y(3)) == 4); in main()
Dvalue_or.pass.cpp48 assert(std::move(opt).value_or(y) == 2); in test()
53 assert(std::move(opt).value_or(Y(3)) == 2); in test()
59 assert(std::move(opt).value_or(y) == 3); in test()
64 assert(std::move(opt).value_or(Y(3)) == 4); in test()
/external/webrtc/test/pc/e2e/analyzer/video/
Dsingle_process_encoded_image_data_injector_unittest.cc47 EXPECT_EQ(out.image.SpatialLayerFrameSize(0).value_or(0), 0ul); in TEST()
67 EXPECT_EQ(out.image.SpatialLayerFrameSize(0).value_or(0), 0ul); in TEST()
89 EXPECT_EQ(out.image.SpatialIndex().value_or(0), 2); in TEST()
91 EXPECT_EQ(out.image.SpatialLayerFrameSize(i).value_or(0), 0ul); in TEST()
117 EXPECT_EQ(out.image.SpatialIndex().value_or(0), 2); in TEST()
119 EXPECT_EQ(out.image.SpatialLayerFrameSize(i).value_or(0), 0ul); in TEST()
153 EXPECT_EQ(out1.image.SpatialLayerFrameSize(0).value_or(0), 0ul); in TEST()
161 EXPECT_EQ(out2.image.SpatialLayerFrameSize(0).value_or(0), 0ul); in TEST()
166 EXPECT_EQ(out3.image.SpatialLayerFrameSize(0).value_or(0), 0ul); in TEST()
217 EXPECT_EQ(out.image.SpatialIndex().value_or(0), 2); in TEST()
[all …]
/external/webrtc/modules/video_coding/codecs/test/
Dvideocodec_test_stats_impl.cc322 frame_encoding_time_us.GetMean().value_or(0); in SliceAndCalcVideoStatistic()
327 frame_decoding_time_us.GetMean().value_or(0); in SliceAndCalcVideoStatistic()
334 return 8 * stats.GetMax().value_or(0) / 1000 / target_bitrate_kbps; in SliceAndCalcVideoStatistic()
337 video_stat.avg_delay_sec = buffer_level_sec.GetMean().value_or(0); in SliceAndCalcVideoStatistic()
342 key_frame_size_bytes.GetMean().value_or(0); in SliceAndCalcVideoStatistic()
344 delta_frame_size_bytes.GetMean().value_or(0); in SliceAndCalcVideoStatistic()
345 video_stat.avg_qp = qp.GetMean().value_or(0); in SliceAndCalcVideoStatistic()
347 video_stat.avg_psnr_y = psnr_y.GetMean().value_or(0); in SliceAndCalcVideoStatistic()
348 video_stat.avg_psnr_u = psnr_u.GetMean().value_or(0); in SliceAndCalcVideoStatistic()
349 video_stat.avg_psnr_v = psnr_v.GetMean().value_or(0); in SliceAndCalcVideoStatistic()
[all …]
/external/llvm-project/flang/runtime/
Dinternal-unit.cpp46 recordLength.value_or(furthestPositionInRecord)) { in EndIoStatement()
74 if (furthestAfter > static_cast<std::int64_t>(recordLength.value_or(0))) { in Emit()
76 furthestAfter = recordLength.value_or(0); in Emit()
103 if (positionInRecord >= recordLength.value_or(positionInRecord)) { in GetCurrentChar()
114 if (currentRecordNumber >= endfileRecordNumber.value_or(0)) { in AdvanceRecord()
120 recordLength.value_or(furthestPositionInRecord)) { in AdvanceRecord()
Dconnection.cpp16 auto recl{recordLength.value_or( in RemainingSpaceInRecord()
26 positionInRecord = std::max(n, std::int64_t{0}) + leftTabLimit.value_or(0); in HandleAbsolutePosition()
30 positionInRecord = std::max(leftTabLimit.value_or(0), positionInRecord + n); in HandleRelativePosition()
Dedit-output.cpp64 int editWidth{edit.width.value_or(0)}; in EditIntegerOutput()
179 int editDigits{edit.digits.value_or(0)}; // 'd' field in EditEorDOutput()
180 int editWidth{edit.width.value_or(0)}; // 'w' field in EditEorDOutput()
261 int fracDigits{edit.digits.value_or(0)}; // 'd' field in EditFOutput()
262 const int editWidth{edit.width.value_or(0)}; // 'w' field in EditFOutput()
333 edit.digits.value_or(BinaryFloatingPoint::decimalPrecision)}; // 'd' in EditForGOutput()
349 int editWidth{edit.width.value_or(0)}; in EditForGOutput()
351 int expoDigits{edit.expoDigits.value_or(0)}; in EditForGOutput()
426 return io.EmitRepeated(' ', std::max(0, edit.width.value_or(1) - 1)) && in EditLogicalOutput()
488 int width{edit.width.value_or(len)}; in EditDefaultCharacterOutput()
/external/pdfium/xfa/fxfa/parser/
Dcxfa_margin.cpp43 return TryLeftInset().value_or(0); in GetLeftInset()
47 return TryTopInset().value_or(0); in GetTopInset()
51 return TryRightInset().value_or(0); in GetRightInset()
55 return TryBottomInset().value_or(0); in GetBottomInset()
Dcxfa_image.cpp46 return JSObject()->TryCData(XFA_Attribute::ContentType, true).value_or(L""); in GetContentType()
50 return JSObject()->TryCData(XFA_Attribute::Href, true).value_or(L""); in GetHref()
59 return JSObject()->TryContent(false, true).value_or(L""); in GetContent()
/external/webrtc/pc/
Dvideo_rtp_receiver.cc114 ssrc_.value_or(0), frame_transformer_); in SetDepacketizerToDecoderFrameTransformer()
162 ssrc_.value_or(0), frame_transformer_); in RestartMediaChannel()
171 delay_->OnStart(media_channel_, ssrc.value_or(0)); in RestartMediaChannel()
265 media_channel_->GenerateKeyFrame(ssrc_.value_or(0)); in SetMediaChannel()
273 ssrc_.value_or(0), frame_transformer_); in SetMediaChannel()
302 media_channel_->GenerateKeyFrame(ssrc_.value_or(0)); in OnGenerateKeyFrame()
323 ssrc_.value_or(0), in SetEncodedSinkEnabled()
329 media_channel_->ClearRecordableEncodedFrameCallback(ssrc_.value_or(0)); in SetEncodedSinkEnabled()
/external/libabigail/tests/
Dtest-cxx-compat.cc50 CHECK(opt.value_or(mine) == mine);
55 CHECK(opt.value_or(mine) != mine);
56 CHECK(opt.value_or(mine) == other);
/external/webrtc/video/
Dencoder_overshoot_detector_unittest.cc57 EXPECT_NEAR(network_utilization_factor.value_or(-1), in RunConstantUtilizationTest()
62 EXPECT_NEAR(media_utilization_factor.value_or(-1), in RunConstantUtilizationTest()
159 EXPECT_NEAR(network_utilization_factor.value_or(-1), 1.05, 0.01); in TEST_F()
164 EXPECT_NEAR(media_utilization_factor.value_or(-1), 1.00, 0.01); in TEST_F()
Dreceive_statistics_proxy.cc487 bool prev_fps_bad = !fps_threshold_.IsHigh().value_or(true); in QualitySample()
488 bool prev_qp_bad = qp_threshold_.IsHigh().value_or(false); in QualitySample()
489 bool prev_variance_bad = variance_threshold_.IsHigh().value_or(false); in QualitySample()
496 double fps_variance = fps_variance_opt.value_or(0); in QualitySample()
501 bool fps_bad = !fps_threshold_.IsHigh().value_or(true); in QualitySample()
502 bool qp_bad = qp_threshold_.IsHigh().value_or(false); in QualitySample()
503 bool variance_bad = variance_threshold_.IsHigh().value_or(false); in QualitySample()
532 << " qp: " << qp.value_or(-1) << " qp_bad: " << qp_bad in QualitySample()
631 stats_.render_frame_rate = renders_fps_estimator_.Rate(now_ms).value_or(0); in GetStats()
632 stats_.decode_frame_rate = decode_fps_estimator_.Rate(now_ms).value_or(0); in GetStats()
[all …]
Dreceive_statistics_proxy2.cc510 bool prev_fps_bad = !fps_threshold_.IsHigh().value_or(true); in QualitySample()
511 bool prev_qp_bad = qp_threshold_.IsHigh().value_or(false); in QualitySample()
512 bool prev_variance_bad = variance_threshold_.IsHigh().value_or(false); in QualitySample()
519 double fps_variance = fps_variance_opt.value_or(0); in QualitySample()
524 bool fps_bad = !fps_threshold_.IsHigh().value_or(true); in QualitySample()
525 bool qp_bad = qp_threshold_.IsHigh().value_or(false); in QualitySample()
526 bool variance_bad = variance_threshold_.IsHigh().value_or(false); in QualitySample()
555 << " fps_bad: " << fps_bad << " qp: " << qp.value_or(-1) in QualitySample()
667 stats_.render_frame_rate = renders_fps_estimator_.Rate(now_ms).value_or(0); in GetStats()
668 stats_.decode_frame_rate = decode_fps_estimator_.Rate(now_ms).value_or(0); in GetStats()
[all …]
/external/perfetto/src/base/
Doptional_unittest.cc1051 EXPECT_EQ(0.0f, a.value_or(0.0f)); in TEST()
1054 EXPECT_EQ(0.1f, a.value_or(0.0f)); in TEST()
1057 EXPECT_EQ(0.0f, a.value_or(0.0f)); in TEST()
1063 constexpr int value = a.value_or(10); in TEST()
1068 constexpr int value = a.value_or(10); in TEST()
1074 EXPECT_EQ("bar", a.value_or("bar")); in TEST()
1077 EXPECT_EQ(std::string("foo"), a.value_or("bar")); in TEST()
1080 EXPECT_EQ(std::string("bar"), a.value_or("bar")); in TEST()
1085 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(1, 0.3)); in TEST()
1088 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(3, 0.1)); in TEST()
[all …]
/external/libchrome/base/
Doptional_unittest.cc1035 EXPECT_EQ(0.0f, a.value_or(0.0f)); in TEST()
1038 EXPECT_EQ(0.1f, a.value_or(0.0f)); in TEST()
1041 EXPECT_EQ(0.0f, a.value_or(0.0f)); in TEST()
1047 constexpr int value = a.value_or(10); in TEST()
1052 constexpr int value = a.value_or(10); in TEST()
1058 EXPECT_EQ("bar", a.value_or("bar")); in TEST()
1061 EXPECT_EQ(std::string("foo"), a.value_or("bar")); in TEST()
1064 EXPECT_EQ(std::string("bar"), a.value_or("bar")); in TEST()
1069 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(1, 0.3)); in TEST()
1072 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(3, 0.1)); in TEST()
[all …]
/external/webrtc/api/video/
Dvideo_bitrate_allocation.cc56 return bitrates_[spatial_index][temporal_index].value_or(0); in GetBitrate()
84 sum += bitrates_[spatial_index][i].value_or(0); in GetTemporalLayerSum()
104 temporal_rates[i] = bitrates_[spatial_index][i].value_or(0); in GetTemporalLayerAllocation()
173 uint32_t bitrate = bitrates_[si][ti].value_or(0); in ToString()
/external/webrtc/rtc_base/experiments/
Dquality_rampup_experiment.cc52 max_bitrate_kbps_ = std::max(max_bitrate_kbps_.value_or(0), max_bitrate_kbps); in SetMaxBitrate()
62 max_bitrate_kbps_.value() * MaxBitrateFactor().value_or(1)) { in BwHigh()
/external/perfetto/src/trace_processor/importers/memory_tracker/
Dgraph_processor.cc541 return GetSizeEntryOfNode(descendant).value_or(0ul); in AggregateSizeForDescendantNode()
547 *size += c_size.value_or(0); in AggregateSizeForDescendantNode()
566 *aggregated_size += c_size.value_or(0ul); in CalculateSizeForNode()
585 *max_owner_size = std::max(o_size.value_or(0ul), *max_owner_size); in CalculateSizeForNode()
607 uint64_t aggregated_size_value = aggregated_size.value_or(0ul); in CalculateSizeForNode()
609 std::max({node_size.value_or(0ul), aggregated_size_value, in CalculateSizeForNode()
610 max_owner_size.value_or(0ul)}); in CalculateSizeForNode()
661 uint64_t source_size = GetSizeEntryOfNode(edge->source()).value_or(0); in CalculateNodeSubSizes()
664 uint64_t child_size = GetSizeEntryOfNode(child).value_or(0); in CalculateNodeSubSizes()
/external/pigweed/pw_result/
Dresult_test.cc38 EXPECT_EQ(good.value_or(42), 3); in TEST()
39 EXPECT_EQ(bad.value_or(42), 42); in TEST()

12345678910