@@ -38,15 +38,13 @@ chip::Access::AccessControl gPermissiveAccessControl;
38
38
namespace chip {
39
39
namespace Test {
40
40
41
- CHIP_ERROR AppContext::SetUpTestSuite ()
41
+ void AppContext::SetUpTestSuite ()
42
42
{
43
43
CHIP_ERROR err = CHIP_NO_ERROR;
44
- VerifyOrExit ((err = LoopbackMessagingContext::SetUpTestSuite ()) == CHIP_NO_ERROR,
45
- ChipLogError (AppServer, " SetUpTestSuite lo messaging context failed: %" CHIP_ERROR_FORMAT, err.Format ()));
46
- VerifyOrExit ((err = chip::DeviceLayer::PlatformMgr ().InitChipStack ()) == CHIP_NO_ERROR,
47
- ChipLogError (AppServer, " Init CHIP stack failed: %" CHIP_ERROR_FORMAT, err.Format ()));
48
- exit :
49
- return err;
44
+ LoopbackMessagingContext::SetUpTestSuite ();
45
+ // TODO: use ASSERT_EQ, once transition to pw_unit_test is complete
46
+ VerifyOrDieWithMsg ((err = chip::DeviceLayer::PlatformMgr ().InitChipStack ()) == CHIP_NO_ERROR, AppServer,
47
+ " Init CHIP stack failed: %" CHIP_ERROR_FORMAT, err.Format ());
50
48
}
51
49
52
50
void AppContext::TearDownTestSuite ()
@@ -55,20 +53,19 @@ void AppContext::TearDownTestSuite()
55
53
LoopbackMessagingContext::TearDownTestSuite ();
56
54
}
57
55
58
- CHIP_ERROR AppContext::SetUp ()
56
+ void AppContext::SetUp ()
59
57
{
60
58
CHIP_ERROR err = CHIP_NO_ERROR;
61
- VerifyOrExit ((err = LoopbackMessagingContext::SetUp ()) == CHIP_NO_ERROR,
62
- ChipLogError (AppServer, " SetUp lo messaging context failed: %" CHIP_ERROR_FORMAT, err.Format ()));
63
- VerifyOrExit ((err = app::InteractionModelEngine::GetInstance ()->Init (
64
- &GetExchangeManager (), &GetFabricTable (), app::reporting::GetDefaultReportScheduler ())) == CHIP_NO_ERROR,
65
- ChipLogError (AppServer, " Init InteractionModelEngine failed: %" CHIP_ERROR_FORMAT, err.Format ()));
59
+ LoopbackMessagingContext::SetUp ();
60
+ // TODO: use ASSERT_EQ, once transition to pw_unit_test is complete
61
+ VerifyOrDieWithMsg ((err = app::InteractionModelEngine::GetInstance ()->Init (&GetExchangeManager (), &GetFabricTable (),
62
+ app::reporting::GetDefaultReportScheduler ())) ==
63
+ CHIP_NO_ERROR,
64
+ AppServer, " Init InteractionModelEngine failed: %" CHIP_ERROR_FORMAT, err.Format ());
66
65
Access::SetAccessControl (gPermissiveAccessControl );
67
- VerifyOrExit ((err = Access::GetAccessControl ().Init (chip::Access::Examples::GetPermissiveAccessControlDelegate (),
68
- gDeviceTypeResolver )) == CHIP_NO_ERROR,
69
- ChipLogError (AppServer, " Init AccessControl failed: %" CHIP_ERROR_FORMAT, err.Format ()));
70
- exit :
71
- return err;
66
+ VerifyOrDieWithMsg ((err = Access::GetAccessControl ().Init (chip::Access::Examples::GetPermissiveAccessControlDelegate (),
67
+ gDeviceTypeResolver )) == CHIP_NO_ERROR,
68
+ AppServer, " Init AccessControl failed: %" CHIP_ERROR_FORMAT, err.Format ());
72
69
}
73
70
74
71
void AppContext::TearDown ()
0 commit comments