Home
last modified time | relevance | path

Searched refs:IsValueInRangeForNumericType (Results 1 – 25 of 48) sorted by relevance

12

/external/angle/src/common/third_party/base/anglebase/numerics/
Dsafe_numerics_unittest.cc24 using base::IsValueInRangeForNumericType;
684 TEST(SafeNumerics, IsValueInRangeForNumericType) in TEST() argument
686 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(0)); in TEST()
687 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(1)); in TEST()
688 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(2)); in TEST()
689 EXPECT_FALSE(IsValueInRangeForNumericType<uint32_t>(-1)); in TEST()
690 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(0xffffffffu)); in TEST()
691 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(UINT64_C(0xffffffff))); in TEST()
692 EXPECT_FALSE(IsValueInRangeForNumericType<uint32_t>(UINT64_C(0x100000000))); in TEST()
693 EXPECT_FALSE(IsValueInRangeForNumericType<uint32_t>(UINT64_C(0x100000001))); in TEST()
[all …]
Dsafe_conversions.h25 constexpr bool IsValueInRangeForNumericType(Src value) in IsValueInRangeForNumericType() function
53 CHECK(IsValueInRangeForNumericType<Dst>(value)); in checked_cast()
/external/libchrome/base/numerics/
Dchecked_math_impl.h65 if (BASE_NUMERICS_UNLIKELY(!IsValueInRangeForNumericType<Promotion>(x) ||
66 !IsValueInRangeForNumericType<Promotion>(y))) {
79 return is_valid && IsValueInRangeForNumericType<V>(presult);
125 if (BASE_NUMERICS_UNLIKELY(!IsValueInRangeForNumericType<Promotion>(x) ||
126 !IsValueInRangeForNumericType<Promotion>(y))) {
139 return is_valid && IsValueInRangeForNumericType<V>(presult);
180 if (BASE_NUMERICS_UNLIKELY((!IsValueInRangeForNumericType<Promotion>(x) ||
181 !IsValueInRangeForNumericType<Promotion>(y)) &&
198 return is_valid && IsValueInRangeForNumericType<V>(presult);
231 if (BASE_NUMERICS_UNLIKELY((!IsValueInRangeForNumericType<Promotion>(x) ||
[all …]
Dsafe_conversions.h88 constexpr bool IsValueInRangeForNumericType(Src value) {
108 return BASE_NUMERICS_LIKELY((IsValueInRangeForNumericType<Dst>(value)))
179 return BASE_NUMERICS_LIKELY(IsValueInRangeForNumericType<Dst>(value))
335 using internal::IsValueInRangeForNumericType;
Dsafe_math_arm_impl.h40 return IsValueInRangeForNumericType<V>(presult); in Do()
/external/libchrome/base/
Dsafe_numerics_unittest.cc925 if (IsValueInRangeForNumericType<Dst>(SrcLimits::max())) { in TestStrictComparison()
934 if (IsValueInRangeForNumericType<Dst>(SrcLimits::lowest())) { in TestStrictComparison()
1496 TEST(SafeNumerics, IsValueInRangeForNumericType) { in TEST() argument
1497 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(0)); in TEST()
1498 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(1)); in TEST()
1499 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(2)); in TEST()
1500 EXPECT_FALSE(IsValueInRangeForNumericType<uint32_t>(-1)); in TEST()
1501 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(0xffffffffu)); in TEST()
1502 EXPECT_TRUE(IsValueInRangeForNumericType<uint32_t>(UINT64_C(0xffffffff))); in TEST()
1503 EXPECT_FALSE(IsValueInRangeForNumericType<uint32_t>(UINT64_C(0x100000000))); in TEST()
[all …]
/external/libchrome/ui/gfx/geometry/
Drect.h280 DCHECK(base::IsValueInRangeForNumericType<int>( in ScaleToEnclosingRect()
282 DCHECK(base::IsValueInRangeForNumericType<int>( in ScaleToEnclosingRect()
284 DCHECK(base::IsValueInRangeForNumericType<int>( in ScaleToEnclosingRect()
286 DCHECK(base::IsValueInRangeForNumericType<int>( in ScaleToEnclosingRect()
324 DCHECK(base::IsValueInRangeForNumericType<int>( in ScaleToEnclosedRect()
326 DCHECK(base::IsValueInRangeForNumericType<int>( in ScaleToEnclosedRect()
328 DCHECK(base::IsValueInRangeForNumericType<int>( in ScaleToEnclosedRect()
330 DCHECK(base::IsValueInRangeForNumericType<int>( in ScaleToEnclosedRect()
356 base::IsValueInRangeForNumericType<int>(std::round(rect.x() * x_scale))); in ScaleToRoundedRect()
358 base::IsValueInRangeForNumericType<int>(std::round(rect.y() * y_scale))); in ScaleToRoundedRect()
[all …]
/external/pdfium/third_party/base/numerics/
Dsafe_math_impl.h95 bool is_valid = IsValueInRangeForNumericType<Promotion>(x) &&
96 IsValueInRangeForNumericType<Promotion>(y);
105 return is_valid && IsValueInRangeForNumericType<V>(presult);
146 bool is_valid = IsValueInRangeForNumericType<Promotion>(x) &&
147 IsValueInRangeForNumericType<Promotion>(y);
156 return is_valid && IsValueInRangeForNumericType<V>(presult);
215 bool is_valid = IsValueInRangeForNumericType<Promotion>(x) &&
216 IsValueInRangeForNumericType<Promotion>(y);
225 return is_valid && IsValueInRangeForNumericType<V>(presult);
260 bool is_valid = IsValueInRangeForNumericType<Promotion>(x) &&
[all …]
Dsafe_conversions.h89 constexpr bool IsValueInRangeForNumericType(Src value) {
109 return BASE_NUMERICS_LIKELY((IsValueInRangeForNumericType<Dst>(value)))
189 return BASE_NUMERICS_LIKELY(IsValueInRangeForNumericType<Dst>(value))
345 using internal::IsValueInRangeForNumericType;
/external/webrtc/rtc_base/numerics/
Dsafe_conversions.h26 inline constexpr bool IsValueInRangeForNumericType(Src value) { in IsValueInRangeForNumericType() function
36 RTC_CHECK(IsValueInRangeForNumericType<Dst>(value)); in checked_cast()
41 RTC_DCHECK(IsValueInRangeForNumericType<Dst>(value)); in dchecked_cast()
/external/pdfium/core/fpdfapi/parser/
Dcpdf_cross_ref_avail.cpp157 pdfium::base::IsValueInRangeForNumericType<FX_FILESIZE>(xrefpos)) in CheckCrossRefV4Trailer()
163 pdfium::base::IsValueInRangeForNumericType<FX_FILESIZE>( in CheckCrossRefV4Trailer()
194 pdfium::base::IsValueInRangeForNumericType<FX_FILESIZE>(xrefpos)) in CheckCrossRefStream()
Dcpdf_linearized_header.cpp36 if (!pdfium::base::IsValueInRangeForNumericType<T>(raw_value)) in IsValidNumericDictionaryValue()
/external/libchrome/base/files/
Dmemory_mapped_file_posix.cc43 if (!IsValueInRangeForNumericType<size_t>(file_len)) in MapFileRegionToMemory()
62 !IsValueInRangeForNumericType<off_t>(aligned_start)) { in MapFileRegionToMemory()
Dmemory_mapped_file.cc123 DCHECK(IsValueInRangeForNumericType<int32_t>(mask)); in CalculateVMAlignedBoundaries()
/external/libchrome/mojo/public/cpp/bindings/lib/
Dbuffer.cc64 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(additional_bytes)); in Allocate()
111 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(additional_bytes)); in Seal()
Dmessage.cc90 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(total_size)); in CreateSerializedMessageObject()
92 base::IsValueInRangeForNumericType<uint32_t>(handles->size())); in CreateSerializedMessageObject()
308 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(num_bytes)); in payload_num_bytes()
/external/libchrome/mojo/public/cpp/system/
Dinvitation.cc120 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(name.size())); in AttachMessagePipe()
137 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(name.size())); in ExtractMessagePipe()
271 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(name.size())); in ExtractMessagePipe()
Dmessage.h94 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(error.size())); in NotifyBadMessage()
/external/pdfium/fpdfsdk/
Dcpdfsdk_customaccess.cpp26 if (!pdfium::base::IsValueInRangeForNumericType<FX_FILESIZE>(size)) in ReadBlockAtOffset()
/external/webrtc/rtc_base/experiments/
Dfield_trial_parser.cc130 if (rtc::IsValueInRangeForNumericType<int, int64_t>(value)) { in ParseTypedParameter()
141 if (rtc::IsValueInRangeForNumericType<unsigned, int64_t>(value)) { in ParseTypedParameter()
/external/angle/src/libANGLE/
DBinaryStream.h50 ASSERT(angle::IsValueInRangeForNumericType<IntT>(value)); in readInt()
210 ASSERT(angle::IsValueInRangeForNumericType<PromotedIntT>(param)); in writeInt()
/external/webrtc/api/audio_codecs/L16/
Daudio_encoder_L16.cc26 if (!rtc::IsValueInRangeForNumericType<int>(format.num_channels)) { in SdpToConfig()
/external/webrtc/rtc_base/
Drtc_certificate_unittest.cc71 RTC_CHECK(IsValueInRangeForNumericType<time_t>(expires_s)); in GenerateCertificateWithExpires()
/external/pdfium/core/fpdfapi/render/
Dcpdf_imagecacheentry.cpp30 ASSERT(pdfium::base::IsValueInRangeForNumericType<uint32_t>(height)); in GetEstimatedImageSize()
/external/libchrome/mojo/core/
Dchannel.cc127 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(size_)); in Message()
130 DCHECK(base::IsValueInRangeForNumericType<uint16_t>(header_size + in Message()
302 DCHECK(base::IsValueInRangeForNumericType<uint32_t>(size_)); in ExtendPayload()

12