Lines Matching refs:event
202 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
203 AStatsEvent_setAtomId(event, 100); in TEST_P()
204 AStatsEvent_writeInt32(event, 10); in TEST_P()
205 AStatsEvent_writeInt64(event, 0x123456789); in TEST_P()
206 AStatsEvent_writeFloat(event, 2.0); in TEST_P()
207 AStatsEvent_writeBool(event, true); in TEST_P()
208 AStatsEvent_build(event); in TEST_P()
211 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
248 AStatsEvent_release(event); in TEST_P()
252 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
253 AStatsEvent_setAtomId(event, 100); in TEST_P()
254 AStatsEvent_writeInt32(event, 10); in TEST_P()
255 AStatsEvent_writeInt64(event, 0x123456789); in TEST_P()
256 AStatsEvent_writeFloat(event, 2.0); in TEST_P()
257 AStatsEvent_writeBool(event, true); in TEST_P()
258 AStatsEvent_build(event); in TEST_P()
261 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
274 AStatsEvent_release(event); in TEST_P()
278 AStatsEvent* event = AStatsEvent_obtain(); in TEST() local
279 AStatsEvent_setAtomId(event, 100); in TEST()
280 AStatsEvent_writeInt32(event, 10); in TEST()
281 AStatsEvent_writeInt64(event, 0x123456789); in TEST()
282 AStatsEvent_writeFloat(event, 2.0); in TEST()
283 AStatsEvent_writeBool(event, true); in TEST()
284 AStatsEvent_build(event); in TEST()
287 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST()
294 AStatsEvent_release(event); in TEST()
304 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
305 AStatsEvent_setAtomId(event, 100); in TEST_P()
307 AStatsEvent_writeString(event, str.c_str()); in TEST_P()
308 AStatsEvent_writeByteArray(event, (uint8_t*)str.c_str(), str.length()); in TEST_P()
309 AStatsEvent_build(event); in TEST_P()
312 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
338 AStatsEvent_release(event); in TEST_P()
342 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
343 AStatsEvent_setAtomId(event, 100); in TEST_P()
345 AStatsEvent_writeString(event, empty.c_str()); in TEST_P()
346 AStatsEvent_build(event); in TEST_P()
349 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
368 AStatsEvent_release(event); in TEST_P()
372 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
373 AStatsEvent_setAtomId(event, 100); in TEST_P()
375 AStatsEvent_writeByteArray(event, message, 5); in TEST_P()
376 AStatsEvent_build(event); in TEST_P()
379 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
398 AStatsEvent_release(event); in TEST_P()
403 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
404 AStatsEvent_setAtomId(event, 100); in TEST_P()
407 AStatsEvent_writeInt32(event, i); in TEST_P()
410 AStatsEvent_build(event); in TEST_P()
413 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
417 AStatsEvent_release(event); in TEST_P()
421 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
422 AStatsEvent_setAtomId(event, 100); in TEST_P()
430 AStatsEvent_writeAttributionChain(event, uids, tags, 2); in TEST_P()
431 AStatsEvent_build(event); in TEST_P()
434 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
477 AStatsEvent_release(event); in TEST_P()
481 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
482 AStatsEvent_setAtomId(event, 100); in TEST_P()
484 AStatsEvent_writeAttributionChain(event, {}, {}, 0); in TEST_P()
485 AStatsEvent_writeInt32(event, 10); in TEST_P()
486 AStatsEvent_build(event); in TEST_P()
489 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
494 AStatsEvent_release(event); in TEST_P()
509 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
510 AStatsEvent_setAtomId(event, 100); in TEST_P()
511 AStatsEvent_writeAttributionChain(event, uids, cTags, numNodes); in TEST_P()
512 AStatsEvent_build(event); in TEST_P()
515 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
519 AStatsEvent_release(event); in TEST_P()
535 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
536 AStatsEvent_setAtomId(event, 100); in TEST_P()
537 AStatsEvent_writeInt32Array(event, int32Array, numElements); in TEST_P()
538 AStatsEvent_writeInt64Array(event, int64Array, numElements); in TEST_P()
539 AStatsEvent_writeFloatArray(event, floatArray, numElements); in TEST_P()
540 AStatsEvent_writeBoolArray(event, boolArray, numElements); in TEST_P()
541 AStatsEvent_writeStringArray(event, cStringArray, numElements); in TEST_P()
542 AStatsEvent_build(event); in TEST_P()
545 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
627 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
628 AStatsEvent_setAtomId(event, 100); in TEST_P()
629 AStatsEvent_writeStringArray(event, cStringArray, 2); in TEST_P()
630 AStatsEvent_build(event); in TEST_P()
633 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
657 AStatsEvent_release(event); in TEST_P()
668 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
669 AStatsEvent_setAtomId(event, 100); in TEST_P()
670 AStatsEvent_writeInt32Array(event, int32Array, numElements); in TEST_P()
671 AStatsEvent_build(event); in TEST_P()
674 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
679 AStatsEvent_release(event); in TEST_P()
685 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
686 AStatsEvent_setAtomId(event, 100); in TEST_P()
687 AStatsEvent_writeInt32Array(event, int32Array, 0); in TEST_P()
688 AStatsEvent_build(event); in TEST_P()
691 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
702 AStatsEvent_release(event); in TEST_P()
708 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
709 AStatsEvent_setAtomId(event, 100); in TEST_P()
710 AStatsEvent_writeInt32Array(event, int32Array, 0); in TEST_P()
711 AStatsEvent_addBoolAnnotation(event, ASTATSLOG_ANNOTATION_ID_IS_UID, true); in TEST_P()
712 AStatsEvent_build(event); in TEST_P()
715 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
726 AStatsEvent_release(event); in TEST_P()
730 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
731 EXPECT_TRUE(createFieldWithBoolAnnotationLogEvent(&event, INT32_TYPE, in TEST_P()
735 ASSERT_EQ(event.getNumUidFields(), 1); in TEST_P()
737 const vector<FieldValue>& values = event.getValues(); in TEST_P()
860 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
864 &event, std::get<0>(GetParam()), ASTATSLOG_ANNOTATION_ID_IS_UID, true, in TEST_P()
870 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
871 EXPECT_FALSE(createFieldWithIntAnnotationLogEvent(&event, INT32_TYPE, in TEST_P()
877 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
878 EXPECT_TRUE(createFieldWithBoolAnnotationLogEvent(&event, INT32_TYPE, in TEST_P()
882 const vector<FieldValue>& values = event.getValues(); in TEST_P()
888 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
892 &event, std::get<0>(GetParam()), ASTATSLOG_ANNOTATION_ID_STATE_NESTED, true, in TEST_P()
898 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
899 EXPECT_FALSE(createFieldWithIntAnnotationLogEvent(&event, INT32_TYPE, in TEST_P()
905 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
906 EXPECT_TRUE(createFieldWithBoolAnnotationLogEvent(&event, INT32_TYPE, in TEST_P()
910 const vector<FieldValue>& values = event.getValues(); in TEST_P()
916 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
920 &event, std::get<0>(GetParam()), ASTATSLOG_ANNOTATION_ID_PRIMARY_FIELD, true, in TEST_P()
926 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
927 EXPECT_FALSE(createFieldWithIntAnnotationLogEvent(&event, INT32_TYPE, in TEST_P()
933 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
934 EXPECT_TRUE(createFieldWithBoolAnnotationLogEvent(&event, INT32_TYPE, in TEST_P()
938 const vector<FieldValue>& values = event.getValues(); in TEST_P()
944 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
948 &event, std::get<0>(GetParam()), ASTATSLOG_ANNOTATION_ID_EXCLUSIVE_STATE, true, in TEST_P()
954 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
955 EXPECT_FALSE(createFieldWithIntAnnotationLogEvent(&event, INT32_TYPE, in TEST_P()
994 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
998 &event, std::get<0>(GetParam()), ASTATSLOG_ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID, in TEST_P()
1005 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1007 &event, ATTRIBUTION_CHAIN_TYPE, ASTATSLOG_ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID, 10, in TEST_P()
1013 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1015 &event, INT32_TYPE, ASTATSLOG_ANNOTATION_ID_TRIGGER_STATE_RESET, resetState, in TEST_P()
1018 const vector<FieldValue>& values = event.getValues(); in TEST_P()
1020 EXPECT_EQ(event.getResetState(), resetState); in TEST_P()
1028 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1030 &event, INT32_TYPE, ASTATSLOG_ANNOTATION_ID_RESTRICTION_CATEGORY, restrictionCategory, in TEST_P()
1033 ASSERT_EQ(event.getRestrictionCategory(), restrictionCategory); in TEST_P()
1041 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1043 &event, INT32_TYPE, ASTATSLOG_ANNOTATION_ID_RESTRICTION_CATEGORY, restrictionCategory, in TEST_P()
1052 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1054 &event, INT32_TYPE, ASTATSLOG_ANNOTATION_ID_RESTRICTION_CATEGORY, restrictionCategory, in TEST_P()
1059 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1064 &event, std::get<0>(GetParam()), ASTATSLOG_ANNOTATION_ID_TRIGGER_STATE_RESET, in TEST_P()
1071 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1073 &event, INT32_TYPE, ASTATSLOG_ANNOTATION_ID_TRIGGER_STATE_RESET, true, in TEST_P()
1085 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
1086 AStatsEvent_setAtomId(event, 100); in TEST_P()
1087 AStatsEvent_writeInt32Array(event, int32Array, numElements); in TEST_P()
1088 AStatsEvent_writeInt32(event, 10); in TEST_P()
1089 AStatsEvent_writeInt32(event, 11); in TEST_P()
1090 AStatsEvent_addBoolAnnotation(event, ASTATSLOG_ANNOTATION_ID_IS_UID, true); in TEST_P()
1091 AStatsEvent_build(event); in TEST_P()
1094 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
1098 AStatsEvent_release(event); in TEST_P()
1102 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
1103 AStatsEvent_setAtomId(event, 100); in TEST_P()
1108 AStatsEvent_writeInt32(event, 10); in TEST_P()
1109 AStatsEvent_writeAttributionChain(event, uids, tags, 0); in TEST_P()
1110 AStatsEvent_addBoolAnnotation(event, ASTATSLOG_ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID, true); in TEST_P()
1112 AStatsEvent_build(event); in TEST_P()
1115 const uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST_P()
1120 AStatsEvent_release(event); in TEST_P()
1127 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
1128 AStatsEvent_setAtomId(event, 100); in TEST_P()
1129 AStatsEvent_build(event); in TEST_P()
1130 AStatsEvent_getBuffer(event, &emptyAtomBufferSize); in TEST_P()
1131 AStatsEvent_release(event); in TEST_P()
1138 AStatsEvent* event = AStatsEvent_obtain(); in TEST_P() local
1139 AStatsEvent_setAtomId(event, 100); in TEST_P()
1140 AStatsEvent_writeInt32Array(event, nullptr, 0); in TEST_P()
1141 AStatsEvent_addBoolAnnotation(event, ASTATSLOG_ANNOTATION_ID_IS_UID, true); in TEST_P()
1142 EXPECT_EQ(AStatsEvent_getErrors(event), 0); in TEST_P()
1143 AStatsEvent_build(event); in TEST_P()
1145 const uint8_t* buf = AStatsEvent_getBuffer(event, nullptr); in TEST_P()
1147 AStatsEvent_release(event); in TEST_P()
1220 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1222 createFieldWithBoolAnnotationLogEvent(&event, INT32_TYPE, std::get<0>(GetParam()), true, in TEST_P()
1225 EXPECT_EQ(event.GetTagId(), 100); in TEST_P()
1226 ASSERT_EQ(event.getValues().size(), 1); in TEST_P()
1227 EXPECT_EQ(event.getValues()[0].mValue.getType(), Type::INT); in TEST_P()
1234 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1236 &event, STRING_TYPE, std::get<0>(GetParam()), in TEST_P()
1244 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1246 &event, STRING_TYPE, std::get<0>(GetParam()), true, in TEST_P()
1255 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST_P() local
1257 createFieldWithBoolAnnotationLogEvent(&event, INT32_TYPE, std::get<0>(GetParam()), true, in TEST_P()