Searched refs:CoerceToInt64 (Results 1 – 3 of 3) sorted by relevance
31 ASSERT_EQ(CoerceToInt64(Json::Value(42.1)).value_or(-1), 42); in TEST()34 TEST(JsonTraceUtilsTest, CoerceToInt64) { in TEST() argument35 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()38 ASSERT_FALSE(CoerceToInt64(Json::Value("foo")).has_value()); in TEST()39 ASSERT_FALSE(CoerceToInt64(Json::Value("1234!")).has_value()); in TEST()42 ASSERT_EQ(CoerceToInt64(Json::Value{n}).value_or(0), -1); in TEST()
45 base::Optional<int64_t> CoerceToInt64(const Json::Value& value);
86 base::Optional<int64_t> CoerceToInt64(const Json::Value& value) { in CoerceToInt64() function117 base::Optional<int64_t> result = CoerceToInt64(value); in CoerceToUint32()