blob: dbae58889333bd12f09a6eeb4188bb09a98948ad [file] [log] [blame]
Yao Chend54f9dd2017-10-17 17:37:48 +00001/*
2 * Copyright (C) 2017, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <gtest/gtest.h>
Yao Chend54f9dd2017-10-17 17:37:48 +000018#include <stdio.h>
19
Muhammad Qureshia345af92020-03-24 17:05:14 -070020#include "Collation.h"
21#include "frameworks/base/tools/stats_log_api_gen/test.pb.h"
22
Yao Chend54f9dd2017-10-17 17:37:48 +000023namespace android {
24namespace stats_log_api_gen {
25
Stefan Lafon9478f352017-10-30 21:20:20 -070026using std::map;
Yao Chend54f9dd2017-10-17 17:37:48 +000027using std::set;
28using std::vector;
29
30/**
Muhammad Qureshib13a3212020-03-12 07:37:13 -070031 * Return whether the map contains a vector of the elements provided.
Yao Chend54f9dd2017-10-17 17:37:48 +000032 */
Muhammad Qureshic6c38632020-03-25 17:45:01 -070033static bool map_contains_vector(const SignatureInfoMap& s, int count, ...) {
Yao Chend54f9dd2017-10-17 17:37:48 +000034 va_list args;
35 vector<java_type_t> v;
36
37 va_start(args, count);
Muhammad Qureshia345af92020-03-24 17:05:14 -070038 for (int i = 0; i < count; i++) {
Yao Chend54f9dd2017-10-17 17:37:48 +000039 v.push_back((java_type_t)va_arg(args, int));
40 }
41 va_end(args);
42
43 return s.find(v) != s.end();
44}
45
46/**
Muhammad Qureshib13a3212020-03-12 07:37:13 -070047 * Expect that the provided map contains the elements provided.
Yao Chend54f9dd2017-10-17 17:37:48 +000048 */
Muhammad Qureshia345af92020-03-24 17:05:14 -070049#define EXPECT_MAP_CONTAINS_SIGNATURE(s, ...) \
50 do { \
51 int count = sizeof((int[]){__VA_ARGS__}) / sizeof(int); \
Muhammad Qureshib13a3212020-03-12 07:37:13 -070052 EXPECT_TRUE(map_contains_vector(s, count, __VA_ARGS__)); \
Muhammad Qureshia345af92020-03-24 17:05:14 -070053 } while (0)
Yao Chend54f9dd2017-10-17 17:37:48 +000054
Stefan Lafon9478f352017-10-30 21:20:20 -070055/** Expects that the provided atom has no enum values for any field. */
Muhammad Qureshia345af92020-03-24 17:05:14 -070056#define EXPECT_NO_ENUM_FIELD(atom) \
57 do { \
Stefan Lafon9478f352017-10-30 21:20:20 -070058 for (vector<AtomField>::const_iterator field = atom->fields.begin(); \
Muhammad Qureshia345af92020-03-24 17:05:14 -070059 field != atom->fields.end(); field++) { \
60 EXPECT_TRUE(field->enumValues.empty()); \
61 } \
62 } while (0)
Stefan Lafon9478f352017-10-30 21:20:20 -070063
Yangster-mac7604aea2017-12-11 22:55:49 -080064/** Expects that exactly one specific field has expected enum values. */
Muhammad Qureshia345af92020-03-24 17:05:14 -070065#define EXPECT_HAS_ENUM_FIELD(atom, field_name, values) \
66 do { \
Stefan Lafon9478f352017-10-30 21:20:20 -070067 for (vector<AtomField>::const_iterator field = atom->fields.begin(); \
Muhammad Qureshia345af92020-03-24 17:05:14 -070068 field != atom->fields.end(); field++) { \
69 if (field->name == field_name) { \
70 EXPECT_EQ(field->enumValues, values); \
71 } else { \
72 EXPECT_TRUE(field->enumValues.empty()); \
73 } \
74 } \
75 } while (0)
Stefan Lafon9478f352017-10-30 21:20:20 -070076
Yao Chend54f9dd2017-10-17 17:37:48 +000077/**
78 * Test a correct collation, with all the types.
79 */
80TEST(CollationTest, CollateStats) {
81 Atoms atoms;
Muhammad Qureshib13a3212020-03-12 07:37:13 -070082 int errorCount = collate_atoms(Event::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chend54f9dd2017-10-17 17:37:48 +000083
84 EXPECT_EQ(0, errorCount);
Muhammad Qureshib13a3212020-03-12 07:37:13 -070085 EXPECT_EQ(3ul, atoms.signatureInfoMap.size());
Yao Chend54f9dd2017-10-17 17:37:48 +000086
87 // IntAtom, AnotherIntAtom
Muhammad Qureshib13a3212020-03-12 07:37:13 -070088 EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT);
Yao Chend54f9dd2017-10-17 17:37:48 +000089
90 // OutOfOrderAtom
Muhammad Qureshib13a3212020-03-12 07:37:13 -070091 EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT, JAVA_TYPE_INT);
Yao Chend54f9dd2017-10-17 17:37:48 +000092
93 // AllTypesAtom
Muhammad Qureshia345af92020-03-24 17:05:14 -070094 EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap,
95 JAVA_TYPE_ATTRIBUTION_CHAIN, // AttributionChain
96 JAVA_TYPE_FLOAT, // float
97 JAVA_TYPE_LONG, // int64
98 JAVA_TYPE_LONG, // uint64
99 JAVA_TYPE_INT, // int32
100 JAVA_TYPE_LONG, // fixed64
101 JAVA_TYPE_INT, // fixed32
102 JAVA_TYPE_BOOLEAN, // bool
103 JAVA_TYPE_STRING, // string
104 JAVA_TYPE_INT, // uint32
105 JAVA_TYPE_INT, // AnEnum
106 JAVA_TYPE_INT, // sfixed32
107 JAVA_TYPE_LONG, // sfixed64
108 JAVA_TYPE_INT, // sint32
109 JAVA_TYPE_LONG // sint64
Yangster-mac7604aea2017-12-11 22:55:49 -0800110 );
Yao Chend54f9dd2017-10-17 17:37:48 +0000111
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700112 EXPECT_EQ(4ul, atoms.decls.size());
Yao Chend54f9dd2017-10-17 17:37:48 +0000113
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700114 AtomDeclSet::const_iterator atomIt = atoms.decls.begin();
115 EXPECT_EQ(1, (*atomIt)->code);
116 EXPECT_EQ("int_atom", (*atomIt)->name);
117 EXPECT_EQ("IntAtom", (*atomIt)->message);
118 EXPECT_NO_ENUM_FIELD((*atomIt));
119 atomIt++;
Yao Chend54f9dd2017-10-17 17:37:48 +0000120
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700121 EXPECT_EQ(2, (*atomIt)->code);
122 EXPECT_EQ("out_of_order_atom", (*atomIt)->name);
123 EXPECT_EQ("OutOfOrderAtom", (*atomIt)->message);
124 EXPECT_NO_ENUM_FIELD((*atomIt));
125 atomIt++;
Yao Chend54f9dd2017-10-17 17:37:48 +0000126
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700127 EXPECT_EQ(3, (*atomIt)->code);
128 EXPECT_EQ("another_int_atom", (*atomIt)->name);
129 EXPECT_EQ("AnotherIntAtom", (*atomIt)->message);
130 EXPECT_NO_ENUM_FIELD((*atomIt));
131 atomIt++;
132
133 EXPECT_EQ(4, (*atomIt)->code);
134 EXPECT_EQ("all_types_atom", (*atomIt)->name);
135 EXPECT_EQ("AllTypesAtom", (*atomIt)->message);
Stefan Lafon9478f352017-10-30 21:20:20 -0700136 map<int, string> enumValues;
137 enumValues[0] = "VALUE0";
138 enumValues[1] = "VALUE1";
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700139 EXPECT_HAS_ENUM_FIELD((*atomIt), "enum_field", enumValues);
140 atomIt++;
Yao Chend54f9dd2017-10-17 17:37:48 +0000141
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700142 EXPECT_EQ(atoms.decls.end(), atomIt);
Yao Chend54f9dd2017-10-17 17:37:48 +0000143}
144
145/**
146 * Test that event class that contains stuff other than the atoms is rejected.
147 */
148TEST(CollationTest, NonMessageTypeFails) {
149 Atoms atoms;
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700150 int errorCount = collate_atoms(IntAtom::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chend54f9dd2017-10-17 17:37:48 +0000151
152 EXPECT_EQ(1, errorCount);
153}
154
155/**
Muhammad Qureshia345af92020-03-24 17:05:14 -0700156 * Test that atoms that have non-primitive types or repeated fields are
157 * rejected.
Yao Chend54f9dd2017-10-17 17:37:48 +0000158 */
159TEST(CollationTest, FailOnBadTypes) {
160 Atoms atoms;
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700161 int errorCount = collate_atoms(BadTypesEvent::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chend54f9dd2017-10-17 17:37:48 +0000162
Tej Singhc88fbf12020-02-20 18:14:50 -0800163 EXPECT_EQ(4, errorCount);
Yao Chend54f9dd2017-10-17 17:37:48 +0000164}
165
166/**
167 * Test that atoms that skip field numbers (in the first position) are rejected.
168 */
169TEST(CollationTest, FailOnSkippedFieldsSingle) {
170 Atoms atoms;
Muhammad Qureshia345af92020-03-24 17:05:14 -0700171 int errorCount =
172 collate_atoms(BadSkippedFieldSingle::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chend54f9dd2017-10-17 17:37:48 +0000173
174 EXPECT_EQ(1, errorCount);
175}
176
177/**
Muhammad Qureshia345af92020-03-24 17:05:14 -0700178 * Test that atoms that skip field numbers (not in the first position, and
179 * multiple times) are rejected.
Yao Chend54f9dd2017-10-17 17:37:48 +0000180 */
181TEST(CollationTest, FailOnSkippedFieldsMultiple) {
182 Atoms atoms;
Muhammad Qureshia345af92020-03-24 17:05:14 -0700183 int errorCount =
184 collate_atoms(BadSkippedFieldMultiple::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chend54f9dd2017-10-17 17:37:48 +0000185
186 EXPECT_EQ(2, errorCount);
187}
188
189/**
Yangster-mac7604aea2017-12-11 22:55:49 -0800190 * Test that atoms that have an attribution chain not in the first position are
191 * rejected.
Yao Chend54f9dd2017-10-17 17:37:48 +0000192 */
Yangster-mac20877162017-12-22 17:19:39 -0800193TEST(CollationTest, FailBadAttributionNodePosition) {
Muhammad Qureshia345af92020-03-24 17:05:14 -0700194 Atoms atoms;
195 int errorCount =
196 collate_atoms(BadAttributionNodePosition::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chend54f9dd2017-10-17 17:37:48 +0000197
Muhammad Qureshia345af92020-03-24 17:05:14 -0700198 EXPECT_EQ(1, errorCount);
Yao Chend54f9dd2017-10-17 17:37:48 +0000199}
200
Yao Chen9c1debe2018-02-19 14:39:19 -0800201TEST(CollationTest, FailOnBadStateAtomOptions) {
202 Atoms atoms;
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700203 int errorCount = collate_atoms(BadStateAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chen9c1debe2018-02-19 14:39:19 -0800204
205 EXPECT_EQ(3, errorCount);
206}
207
208TEST(CollationTest, PassOnGoodStateAtomOptions) {
209 Atoms atoms;
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700210 int errorCount = collate_atoms(GoodStateAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chen9c1debe2018-02-19 14:39:19 -0800211 EXPECT_EQ(0, errorCount);
212}
213
Yao Chenbbdd67d2018-10-24 12:15:56 -0700214TEST(CollationTest, PassOnGoodBinaryFieldAtom) {
215 Atoms atoms;
216 int errorCount =
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700217 collate_atoms(GoodEventWithBinaryFieldAtom::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chenbbdd67d2018-10-24 12:15:56 -0700218 EXPECT_EQ(0, errorCount);
219}
220
221TEST(CollationTest, FailOnBadBinaryFieldAtom) {
222 Atoms atoms;
223 int errorCount =
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700224 collate_atoms(BadEventWithBinaryFieldAtom::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Yao Chenbbdd67d2018-10-24 12:15:56 -0700225 EXPECT_TRUE(errorCount > 0);
226}
227
Tej Singh810eeb32019-03-07 19:08:52 -0800228TEST(CollationTest, PassOnLogFromModuleAtom) {
229 Atoms atoms;
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700230 int errorCount = collate_atoms(ModuleAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Tej Singh810eeb32019-03-07 19:08:52 -0800231 EXPECT_EQ(errorCount, 0);
Muhammad Qureshif8460f72020-03-05 09:48:48 -0800232 EXPECT_EQ(atoms.decls.size(), 4ul);
Tej Singh810eeb32019-03-07 19:08:52 -0800233}
234
235TEST(CollationTest, RecognizeModuleAtom) {
236 Atoms atoms;
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700237 int errorCount = collate_atoms(ModuleAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
Tej Singh810eeb32019-03-07 19:08:52 -0800238 EXPECT_EQ(errorCount, 0);
Muhammad Qureshif8460f72020-03-05 09:48:48 -0800239 EXPECT_EQ(atoms.decls.size(), 4ul);
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700240 EXPECT_EQ(atoms.signatureInfoMap.size(), 2u);
241 EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT);
242 EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_STRING);
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700243
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700244 SignatureInfoMap::const_iterator signatureInfoMapIt;
245 const vector<java_type_t>* signature;
246 const FieldNumberToAtomDeclSet* fieldNumberToAtomDeclSet;
247 FieldNumberToAtomDeclSet::const_iterator fieldNumberToAtomDeclSetIt;
248 const AtomDeclSet* atomDeclSet;
249 AtomDeclSet::const_iterator atomDeclSetIt;
250 AtomDecl* atomDecl;
251 FieldNumberToAnnotations* fieldNumberToAnnotations;
252 FieldNumberToAnnotations::const_iterator fieldNumberToAnnotationsIt;
253 const AnnotationSet* annotationSet;
254 AnnotationSet::const_iterator annotationSetIt;
255 Annotation* annotation;
256
257 signatureInfoMapIt = atoms.signatureInfoMap.begin();
258 signature = &(signatureInfoMapIt->first);
259 fieldNumberToAtomDeclSet = &signatureInfoMapIt->second;
260 EXPECT_EQ(1ul, signature->size());
261 EXPECT_EQ(JAVA_TYPE_INT, signature->at(0));
262 EXPECT_EQ(1ul, fieldNumberToAtomDeclSet->size());
263 fieldNumberToAtomDeclSetIt = fieldNumberToAtomDeclSet->begin();
264 EXPECT_EQ(1, fieldNumberToAtomDeclSetIt->first);
265 atomDeclSet = &fieldNumberToAtomDeclSetIt->second;
266 EXPECT_EQ(2ul, atomDeclSet->size());
267 atomDeclSetIt = atomDeclSet->begin();
268 atomDecl = atomDeclSetIt->get();
269 EXPECT_EQ(1, atomDecl->code);
270 fieldNumberToAnnotations = &atomDecl->fieldNumberToAnnotations;
271 fieldNumberToAnnotationsIt = fieldNumberToAnnotations->find(1);
272 EXPECT_NE(fieldNumberToAnnotations->end(), fieldNumberToAnnotationsIt);
273 annotationSet = &fieldNumberToAnnotationsIt->second;
274 EXPECT_EQ(1ul, annotationSet->size());
275 annotationSetIt = annotationSet->begin();
276 annotation = annotationSetIt->get();
277 EXPECT_EQ(ANNOTATION_ID_IS_UID, annotation->annotationId);
278 EXPECT_EQ(1, annotation->atomId);
279 EXPECT_EQ(ANNOTATION_TYPE_BOOL, annotation->type);
280 EXPECT_TRUE(annotation->value.boolValue);
281
282 atomDeclSetIt++;
283 atomDecl = atomDeclSetIt->get();
284 EXPECT_EQ(3, atomDecl->code);
285 fieldNumberToAnnotations = &atomDecl->fieldNumberToAnnotations;
286 fieldNumberToAnnotationsIt = fieldNumberToAnnotations->find(1);
287 EXPECT_NE(fieldNumberToAnnotations->end(), fieldNumberToAnnotationsIt);
288 annotationSet = &fieldNumberToAnnotationsIt->second;
289 EXPECT_EQ(1ul, annotationSet->size());
290 annotationSetIt = annotationSet->begin();
291 annotation = annotationSetIt->get();
Muhammad Qureshi3f9c3302020-04-01 16:11:53 -0700292 EXPECT_EQ(ANNOTATION_ID_EXCLUSIVE_STATE, annotation->annotationId);
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700293 EXPECT_EQ(3, annotation->atomId);
Muhammad Qureshi3f9c3302020-04-01 16:11:53 -0700294 EXPECT_EQ(ANNOTATION_TYPE_BOOL, annotation->type);
295 EXPECT_TRUE(annotation->value.boolValue);
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700296
297 signatureInfoMapIt++;
298 signature = &signatureInfoMapIt->first;
299 fieldNumberToAtomDeclSet = &signatureInfoMapIt->second;
300 EXPECT_EQ(1ul, signature->size());
301 EXPECT_EQ(JAVA_TYPE_STRING, signature->at(0));
302 EXPECT_EQ(0ul, fieldNumberToAtomDeclSet->size());
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700303}
Tej Singh810eeb32019-03-07 19:08:52 -0800304
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700305TEST(CollationTest, RecognizeModule1Atom) {
306 Atoms atoms;
307 const string moduleName = "module1";
308 int errorCount = collate_atoms(ModuleAtoms::descriptor(), moduleName, &atoms);
309 EXPECT_EQ(errorCount, 0);
310 EXPECT_EQ(atoms.decls.size(), 2ul);
311 EXPECT_EQ(atoms.signatureInfoMap.size(), 1u);
312 EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT);
Muhammad Qureshib13a3212020-03-12 07:37:13 -0700313
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700314 SignatureInfoMap::const_iterator signatureInfoMapIt;
315 const vector<java_type_t>* signature;
316 const FieldNumberToAtomDeclSet* fieldNumberToAtomDeclSet;
317 FieldNumberToAtomDeclSet::const_iterator fieldNumberToAtomDeclSetIt;
318 const AtomDeclSet* atomDeclSet;
319 AtomDeclSet::const_iterator atomDeclSetIt;
320 AtomDecl* atomDecl;
321 FieldNumberToAnnotations* fieldNumberToAnnotations;
322 FieldNumberToAnnotations::const_iterator fieldNumberToAnnotationsIt;
323 const AnnotationSet* annotationSet;
324 AnnotationSet::const_iterator annotationSetIt;
325 Annotation* annotation;
326
327 signatureInfoMapIt = atoms.signatureInfoMap.begin();
328 signature = &(signatureInfoMapIt->first);
329 fieldNumberToAtomDeclSet = &signatureInfoMapIt->second;
330 EXPECT_EQ(1ul, signature->size());
331 EXPECT_EQ(JAVA_TYPE_INT, signature->at(0));
332 EXPECT_EQ(1ul, fieldNumberToAtomDeclSet->size());
333 fieldNumberToAtomDeclSetIt = fieldNumberToAtomDeclSet->begin();
334 EXPECT_EQ(1, fieldNumberToAtomDeclSetIt->first);
335 atomDeclSet = &fieldNumberToAtomDeclSetIt->second;
336 EXPECT_EQ(2ul, atomDeclSet->size());
337 atomDeclSetIt = atomDeclSet->begin();
338 atomDecl = atomDeclSetIt->get();
339 EXPECT_EQ(1, atomDecl->code);
340 fieldNumberToAnnotations = &atomDecl->fieldNumberToAnnotations;
341 fieldNumberToAnnotationsIt = fieldNumberToAnnotations->find(1);
342 EXPECT_NE(fieldNumberToAnnotations->end(), fieldNumberToAnnotationsIt);
343 annotationSet = &fieldNumberToAnnotationsIt->second;
344 EXPECT_EQ(1ul, annotationSet->size());
345 annotationSetIt = annotationSet->begin();
346 annotation = annotationSetIt->get();
347 EXPECT_EQ(ANNOTATION_ID_IS_UID, annotation->annotationId);
348 EXPECT_EQ(1, annotation->atomId);
349 EXPECT_EQ(ANNOTATION_TYPE_BOOL, annotation->type);
350 EXPECT_TRUE(annotation->value.boolValue);
351
352 atomDeclSetIt++;
353 atomDecl = atomDeclSetIt->get();
354 EXPECT_EQ(3, atomDecl->code);
355 fieldNumberToAnnotations = &atomDecl->fieldNumberToAnnotations;
356 fieldNumberToAnnotationsIt = fieldNumberToAnnotations->find(1);
357 EXPECT_NE(fieldNumberToAnnotations->end(), fieldNumberToAnnotationsIt);
358 annotationSet = &fieldNumberToAnnotationsIt->second;
359 EXPECT_EQ(1ul, annotationSet->size());
360 annotationSetIt = annotationSet->begin();
361 annotation = annotationSetIt->get();
Muhammad Qureshi3f9c3302020-04-01 16:11:53 -0700362 EXPECT_EQ(ANNOTATION_ID_EXCLUSIVE_STATE, annotation->annotationId);
Muhammad Qureshic6c38632020-03-25 17:45:01 -0700363 EXPECT_EQ(3, annotation->atomId);
Muhammad Qureshi3f9c3302020-04-01 16:11:53 -0700364 EXPECT_EQ(ANNOTATION_TYPE_BOOL, annotation->type);
365 EXPECT_TRUE(annotation->value.boolValue);
Tej Singh810eeb32019-03-07 19:08:52 -0800366}
367
Yao Chend54f9dd2017-10-17 17:37:48 +0000368} // namespace stats_log_api_gen
Muhammad Qureshif8460f72020-03-05 09:48:48 -0800369} // namespace android