Home
last modified time | relevance | path

Searched refs:CoerceToInt64 (Results 1 – 3 of 3) sorted by relevance

/external/perfetto/src/trace_processor/importers/json/
Djson_utils_unittest.cc31 ASSERT_EQ(CoerceToInt64(Json::Value(42.1)).value_or(-1), 42); in TEST()
34 TEST(JsonTraceUtilsTest, CoerceToInt64) { in TEST() argument
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()
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()
Djson_utils.h45 base::Optional<int64_t> CoerceToInt64(const Json::Value& value);
Djson_utils.cc86 base::Optional<int64_t> CoerceToInt64(const Json::Value& value) { in CoerceToInt64() function
117 base::Optional<int64_t> result = CoerceToInt64(value); in CoerceToUint32()