Lines Matching refs:chpp
96 const ChppWwanCellInfo *chpp = &chppLocal; in compareCellInfo() local
98 EXPECT_EQ(chpp->timeStamp, chre->timeStamp); in compareCellInfo()
99 EXPECT_EQ(chpp->cellInfoType, chre->cellInfoType); in compareCellInfo()
100 EXPECT_EQ(chpp->timeStampType, chre->timeStampType); in compareCellInfo()
101 EXPECT_EQ(chpp->registered, chre->registered); in compareCellInfo()
103 switch (chpp->cellInfoType) { in compareCellInfo()
105 EXPECT_EQ(chpp->CellInfo.lte.cellIdentityLte.mcc, in compareCellInfo()
107 EXPECT_EQ(chpp->CellInfo.lte.cellIdentityLte.mnc, in compareCellInfo()
109 EXPECT_EQ(chpp->CellInfo.lte.cellIdentityLte.ci, in compareCellInfo()
111 EXPECT_EQ(chpp->CellInfo.lte.cellIdentityLte.pci, in compareCellInfo()
113 EXPECT_EQ(chpp->CellInfo.lte.cellIdentityLte.tac, in compareCellInfo()
115 EXPECT_EQ(chpp->CellInfo.lte.cellIdentityLte.earfcn, in compareCellInfo()
118 EXPECT_EQ(chpp->CellInfo.lte.signalStrengthLte.signalStrength, in compareCellInfo()
120 EXPECT_EQ(chpp->CellInfo.lte.signalStrengthLte.rsrp, in compareCellInfo()
122 EXPECT_EQ(chpp->CellInfo.lte.signalStrengthLte.rsrq, in compareCellInfo()
124 EXPECT_EQ(chpp->CellInfo.lte.signalStrengthLte.rssnr, in compareCellInfo()
126 EXPECT_EQ(chpp->CellInfo.lte.signalStrengthLte.cqi, in compareCellInfo()
128 EXPECT_EQ(chpp->CellInfo.lte.signalStrengthLte.timingAdvance, in compareCellInfo()
133 EXPECT_EQ(chpp->CellInfo.wcdma.cellIdentityWcdma.mcc, in compareCellInfo()
135 EXPECT_EQ(chpp->CellInfo.wcdma.cellIdentityWcdma.mnc, in compareCellInfo()
137 EXPECT_EQ(chpp->CellInfo.wcdma.cellIdentityWcdma.lac, in compareCellInfo()
139 EXPECT_EQ(chpp->CellInfo.wcdma.cellIdentityWcdma.cid, in compareCellInfo()
141 EXPECT_EQ(chpp->CellInfo.wcdma.cellIdentityWcdma.psc, in compareCellInfo()
143 EXPECT_EQ(chpp->CellInfo.wcdma.cellIdentityWcdma.uarfcn, in compareCellInfo()
146 EXPECT_EQ(chpp->CellInfo.wcdma.signalStrengthWcdma.signalStrength, in compareCellInfo()
148 EXPECT_EQ(chpp->CellInfo.wcdma.signalStrengthWcdma.bitErrorRate, in compareCellInfo()
160 void testMalformedCellInfoResultDecoding(struct ChppWwanCellInfoResult *chpp, in testMalformedCellInfoResultDecoding() argument
165 chreMalformed = chppWwanCellInfoResultToChre(chpp, inputSize); in testMalformedCellInfoResultDecoding()
169 chpp->cells.offset++; in testMalformedCellInfoResultDecoding()
170 chreMalformed = chppWwanCellInfoResultToChre(chpp, inputSize); in testMalformedCellInfoResultDecoding()
172 chpp->cells.offset--; in testMalformedCellInfoResultDecoding()
174 chpp->cells.length++; in testMalformedCellInfoResultDecoding()
175 chreMalformed = chppWwanCellInfoResultToChre(chpp, inputSize); in testMalformedCellInfoResultDecoding()
177 chpp->cells.length--; in testMalformedCellInfoResultDecoding()
179 chpp->cellInfoCount++; in testMalformedCellInfoResultDecoding()
180 chreMalformed = chppWwanCellInfoResultToChre(chpp, inputSize); in testMalformedCellInfoResultDecoding()
182 chpp->cellInfoCount--; in testMalformedCellInfoResultDecoding()
184 chpp->cellInfoCount--; in testMalformedCellInfoResultDecoding()
185 chreMalformed = chppWwanCellInfoResultToChre(chpp, inputSize); in testMalformedCellInfoResultDecoding()
187 chpp->cellInfoCount++; in testMalformedCellInfoResultDecoding()
208 ChppWwanCellInfoResult *chpp = &chppWithHeader->payload; in TEST() local
209 EXPECT_EQ(chpp->version, CHRE_WWAN_CELL_INFO_RESULT_VERSION); in TEST()
210 EXPECT_EQ(chpp->errorCode, chreResult.errorCode); in TEST()
211 EXPECT_EQ(chpp->cellInfoCount, chreResult.cellInfoCount); in TEST()
212 EXPECT_EQ(chpp->reserved, 0); in TEST()
213 EXPECT_EQ(chpp->cookie, 0u); in TEST()
214 EXPECT_EQ(chpp->cells.offset, 0); in TEST()
215 EXPECT_EQ(chpp->cells.length, 0); in TEST()
221 const ChppWwanCellInfoResult chpp = { in TEST() local
233 chppWwanCellInfoResultToChre(&chpp, outputSize); in TEST()
237 EXPECT_EQ(chre->errorCode, chpp.errorCode); in TEST()
238 EXPECT_EQ(chre->cellInfoCount, chpp.cellInfoCount); in TEST()
244 chppWwanCellInfoResultToChre(&chpp, outputSize - 1); in TEST()
260 ChppWwanCellInfoResult *chpp = &chppWithHeader->payload; in TEST() local
261 EXPECT_EQ(chpp->errorCode, kChreResultOneCell.errorCode); in TEST()
262 EXPECT_EQ(chpp->cellInfoCount, kChreResultOneCell.cellInfoCount); in TEST()
263 EXPECT_EQ(chpp->cells.offset, sizeof(ChppWwanCellInfoResult)); in TEST()
264 EXPECT_EQ(chpp->cells.length, sizeof(ChppWwanCellInfo)); in TEST()
267 (ChppWwanCellInfo *)((uint8_t *)chpp + chpp->cells.offset); in TEST()
282 ChppWwanCellInfoResult *chpp = &chppWithHeader->payload; in TEST() local
284 (ChppWwanCellInfo *)((uint8_t *)chpp + chpp->cells.offset); in TEST()
286 chpp->version = 100; // ignored in TEST()
287 chpp->reserved = 10; // ignored in TEST()
288 chpp->cookie = -10; // ignored in TEST()
292 chreWwanCellInfoResult *chre = chppWwanCellInfoResultToChre(chpp, inputSize); in TEST()
299 EXPECT_EQ(chre->errorCode, chpp->errorCode); in TEST()
301 EXPECT_EQ(chre->cellInfoCount, chpp->cellInfoCount); in TEST()
308 testMalformedCellInfoResultDecoding(chpp, inputSize); in TEST()
324 ChppWwanCellInfoResult *chpp = &chppWithHeader->payload; in TEST() local
325 EXPECT_EQ(chpp->errorCode, kChreResultTwoCell.errorCode); in TEST()
326 EXPECT_EQ(chpp->cellInfoCount, kChreResultTwoCell.cellInfoCount); in TEST()
327 EXPECT_EQ(chpp->cells.offset, sizeof(ChppWwanCellInfoResult)); in TEST()
328 EXPECT_EQ(chpp->cells.length, 2 * sizeof(ChppWwanCellInfo)); in TEST()
331 (ChppWwanCellInfo *)((uint8_t *)chpp + chpp->cells.offset); in TEST()
358 ChppWwanCellInfoResult *chpp = &chppWithHeader->payload; in TEST() local
360 (ChppWwanCellInfo *)((uint8_t *)chpp + chpp->cells.offset); in TEST()
362 chpp->version = 100; // ignored in TEST()
363 chpp->reserved = 10; // ignored in TEST()
364 chpp->cookie = -10; // ignored in TEST()
368 chreWwanCellInfoResult *chre = chppWwanCellInfoResultToChre(chpp, inputSize); in TEST()
375 EXPECT_EQ(chre->errorCode, chpp->errorCode); in TEST()
376 EXPECT_EQ(chpp->errorCode, kChreResultTwoCell.errorCode); in TEST()
377 EXPECT_EQ(chre->cellInfoCount, chpp->cellInfoCount); in TEST()
378 EXPECT_EQ(chpp->cellInfoCount, kChreResultTwoCell.cellInfoCount); in TEST()
388 testMalformedCellInfoResultDecoding(chpp, inputSize); in TEST()