@@ -468,6 +468,7 @@ TEST(TestCodegenModelViaMocks, EmberAttributeRead)
468
468
chip::app::CodegenDataModel::Model model;
469
469
ScopedMockAccessControl accessControl;
470
470
471
+ // /////// INPUT ARGUMENTS SETUP
471
472
ReadAttributeRequest readRequest;
472
473
473
474
// operationFlags is 0 i.e. not internal
@@ -486,15 +487,17 @@ TEST(TestCodegenModelViaMocks, EmberAttributeRead)
486
487
ASSERT_EQ (reportIBs.StartEncoding (builder), CHIP_NO_ERROR);
487
488
AttributeValueEncoder encoder (builder, kAdminSubjectDescriptor , readRequest.path , dataVersion);
488
489
490
+ // /////// FAKE DATA SETUP
489
491
uint8_t data[] = { 0x01 , 0x02 , 0x03 , 0x04 };
490
492
chip::Test::SetEmberReadOutput (ByteSpan (data));
491
493
492
494
CHIP_ERROR err = model.ReadAttribute (readRequest, encoder);
493
495
ASSERT_EQ (err, CHIP_NO_ERROR);
494
496
497
+ // /////// OVERHEAD: finish!
495
498
ASSERT_EQ (reportIBs.FinishEncoding (builder), CHIP_NO_ERROR);
496
499
497
- // // VALIDATE
500
+ // ///// VALIDATE
498
501
std::vector<DecodedAttributeData> attribute_data;
499
502
err = reportIBs.Decode (attribute_data);
500
503
ASSERT_EQ (err, CHIP_NO_ERROR);
0 commit comments