Skip to content

Commit

Permalink
Mock function for linking
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca committed Dec 5, 2024
1 parent 77b9d57 commit 7ee7ef4
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/app/tests/TestAclAttribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
#include <messaging/Flags.h>
#include <protocols/interaction_model/Constants.h>

// Mock function for linking
void InitDataModelHandler() {}

namespace {
using namespace chip;
using namespace chip::Access;
Expand Down
3 changes: 3 additions & 0 deletions src/app/tests/TestAclEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
#include <messaging/Flags.h>
#include <protocols/interaction_model/Constants.h>

// Mock function for linking
void InitDataModelHandler() {}

namespace {
using namespace chip;
using namespace chip::Access;
Expand Down
3 changes: 3 additions & 0 deletions src/app/tests/TestAttributePathExpandIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ using namespace chip;
using namespace chip::Test;
using namespace chip::app;

// Mock function for linking
void InitDataModelHandler() {}

namespace {

using P = app::ConcreteAttributePath;
Expand Down
3 changes: 3 additions & 0 deletions src/app/tests/TestCommandInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@

using namespace chip::Protocols;

// Mock function for linking
void InitDataModelHandler() {}

namespace {

void CheckForInvalidAction(chip::Test::MessageCapturer & messageLog)
Expand Down
5 changes: 4 additions & 1 deletion src/app/tests/TestInteractionModelEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@
#if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS
#include <app/SimpleSubscriptionResumptionStorage.h>
#include <lib/support/TestPersistentStorageDelegate.h>

#endif // CHIP_CONFIG_PERSIST_SUBSCRIPTIONS

// Mock function for linking
void InitDataModelHandler() {}

namespace {

class NullReadHandlerCallback : public chip::app::ReadHandler::ManagementCallback
Expand Down
3 changes: 3 additions & 0 deletions src/app/tests/TestReadInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
#include <protocols/interaction_model/Constants.h>
#include <pw_unit_test/framework.h>

// Mock function for linking
void InitDataModelHandler() {}

namespace {
uint8_t gDebugEventBuffer[128];
uint8_t gInfoEventBuffer[128];
Expand Down
4 changes: 4 additions & 0 deletions src/app/tests/TestReportScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#include <lib/support/logging/CHIPLogging.h>
#include <lib/support/tests/ExtraPwTestMacros.h>
#include <pw_unit_test/framework.h>

// Mock function for linking
void InitDataModelHandler() {}

namespace {

class NullReadHandlerCallback : public chip::app::ReadHandler::ManagementCallback
Expand Down
3 changes: 3 additions & 0 deletions src/app/tests/TestReportingEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
#include <messaging/ExchangeContext.h>
#include <messaging/Flags.h>

// Mock function for linking
void InitDataModelHandler() {}

namespace chip {

constexpr ClusterId kTestClusterId = 6;
Expand Down
3 changes: 3 additions & 0 deletions src/app/tests/TestWriteInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#include <messaging/Flags.h>
#include <pw_unit_test/framework.h>

// Mock function for linking
void InitDataModelHandler() {}

namespace {

constexpr chip::DataVersion kAcceptedDataVersion = 5;
Expand Down
2 changes: 2 additions & 0 deletions src/app/tests/test-interaction-model-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ class TestImCustomDataModel : public DataModel::Provider
public:
static TestImCustomDataModel & Instance();

void InitDataModel() override {}

CHIP_ERROR Shutdown() override { return CHIP_NO_ERROR; }

DataModel::ActionReturnStatus ReadAttribute(const DataModel::ReadAttributeRequest & request,
Expand Down
2 changes: 2 additions & 0 deletions src/controller/tests/data_model/DataModelFixtures.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ class CustomDataModel : public DataModel::Provider
public:
static CustomDataModel & Instance();

void InitDataModel() override {}

CHIP_ERROR Shutdown() override { return CHIP_NO_ERROR; }

DataModel::ActionReturnStatus ReadAttribute(const DataModel::ReadAttributeRequest & request,
Expand Down
3 changes: 3 additions & 0 deletions src/controller/tests/data_model/TestCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ using namespace chip::app::Clusters;
using namespace chip::app::DataModelTests;
using namespace chip::Protocols;

// Mock function for linking
void InitDataModelHandler() {}

namespace {

const chip::Test::MockNodeConfig & TestMockNodeConfig()
Expand Down
3 changes: 3 additions & 0 deletions src/controller/tests/data_model/TestRead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ using namespace chip::app::DataModelTests;
using namespace chip::Protocols;
using namespace chip::Test;

// Mock function for linking
void InitDataModelHandler() {}

namespace {

const MockNodeConfig & TestMockNodeConfig()
Expand Down
3 changes: 3 additions & 0 deletions src/controller/tests/data_model/TestWrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ using namespace chip::app::Clusters::UnitTesting;
using namespace chip::app::DataModelTests;
using namespace chip::Protocols;

// Mock function for linking
void InitDataModelHandler() {}

namespace {

class SingleWriteCallback : public WriteClient::Callback
Expand Down

0 comments on commit 7ee7ef4

Please sign in to comment.