blob: adfa4662f7b1c5b07dd5b46a8d989ad56d02fbce [file] [log] [blame]
{{> header}}
#pragma once
#if CONFIG_ENABLE_YAML_TESTS
#include <commands/tests/TestCommandBridge.h>
#include <lib/core/Optional.h>
#include <system/SystemClock.h>
#include <math.h> // For INFINITY
typedef void (^ResponseHandler)(id _Nullable value, NSError * _Nullable error);
class TestList : public Command
{
public:
TestList() : Command("list") {};
CHIP_ERROR Run() override
{
{{#chip_tests "ciTests.json"}}printf("{{filename}}\n");{{/chip_tests}}
return CHIP_NO_ERROR;
}
};
class ManualTestList : public Command
{
public:
ManualTestList() : Command("list-manual") {};
CHIP_ERROR Run() override
{
{{#chip_tests "manualTests.json"}}printf("{{filename}}\n");{{/chip_tests}}
return CHIP_NO_ERROR;
}
};
{{>test_cluster tests="ciTests.json" credsIssuerConfigArg=false}}
{{>test_cluster tests="manualTests.json" credsIssuerConfigArg=false}}
#endif // CONFIG_ENABLE_YAML_TESTS
void registerCommandsTests(Commands & commands)
{
const char * clusterName = "Tests";
commands_list clusterCommands = {
#if CONFIG_ENABLE_YAML_TESTS
make_unique<TestList>(),
make_unique<ManualTestList>(),
{{#chip_tests "ciTests.json"}}
make_unique<{{filename}}>(),
{{/chip_tests}}
{{#chip_tests "manualTests.json"}}
make_unique<{{filename}}>(),
{{/chip_tests}}
#endif // CONFIG_ENABLE_YAML_TESTS
};
commands.Register(clusterName, clusterCommands);
}