| 23041 | } |
| 23042 | |
| 23043 | static void cpp_recv_write_fixture(const char *tmp, bool parallel) { |
| 23044 | cpp_recv_write(tmp, "app/src/SecdManager.h", |
| 23045 | "#pragma once\n" |
| 23046 | "#include <memory>\n\n" |
| 23047 | "class SecdManager {\n" |
| 23048 | "public:\n" |
| 23049 | " static SecdManager *getInstance();\n" |
| 23050 | " bool secd_retrieve_pic_fpc_i2c_id(int ifdh, int &fpc_id, int &pic_id);\n" |
| 23051 | "};\n\n" |
| 23052 | "class Registry {\n" |
| 23053 | "public:\n" |
| 23054 | " static Registry &instance();\n" |
| 23055 | " void registerItem(int id);\n" |
| 23056 | "};\n\n" |
| 23057 | "class Widget {\n" |
| 23058 | "public:\n" |
| 23059 | " static std::unique_ptr<Widget> create();\n" |
| 23060 | " void paint();\n" |
| 23061 | "};\n\n" |
| 23062 | "class Session {\n" |
| 23063 | "public:\n" |
| 23064 | " static std::shared_ptr<Session> open();\n" |
| 23065 | " void close();\n" |
| 23066 | "};\n\n" |
| 23067 | "class Other {\n" |
| 23068 | "public:\n" |
| 23069 | " bool secd_retrieve_pic_fpc_i2c_id(int ifdh, int &fpc_id, int &pic_id);\n" |
| 23070 | " void registerItem(int id);\n" |
| 23071 | " void paint();\n" |
| 23072 | " void close();\n" |
| 23073 | "};\n"); |
| 23074 | cpp_recv_write( |
| 23075 | tmp, "app/src/SecdManager.cpp", |
| 23076 | "#include \"SecdManager.h\"\n\n" |
| 23077 | "SecdManager *SecdManager::getInstance() {\n" |
| 23078 | " static SecdManager inst;\n" |
| 23079 | " return &inst;\n" |
| 23080 | "}\n\n" |
| 23081 | "bool SecdManager::secd_retrieve_pic_fpc_i2c_id(int ifdh, int &fpc_id, " |
| 23082 | "int &pic_id) {\n" |
| 23083 | " fpc_id = ifdh;\n" |
| 23084 | " pic_id = ifdh;\n" |
| 23085 | " return true;\n" |
| 23086 | "}\n\n" |
| 23087 | "Registry &Registry::instance() {\n" |
| 23088 | " static Registry r;\n" |
| 23089 | " return r;\n" |
| 23090 | "}\n\n" |
| 23091 | "void Registry::registerItem(int id) { (void)id; }\n\n" |
| 23092 | "std::unique_ptr<Widget> Widget::create() { return std::make_unique<Widget>(); }\n\n" |
| 23093 | "void Widget::paint() {}\n\n" |
| 23094 | "std::shared_ptr<Session> Session::open() { return std::make_shared<Session>(); }\n\n" |
| 23095 | "void Session::close() {}\n\n" |
| 23096 | "bool Other::secd_retrieve_pic_fpc_i2c_id(int ifdh, int &fpc_id, int &pic_id) {\n" |
| 23097 | " fpc_id = pic_id = ifdh;\n" |
| 23098 | " return false;\n" |
| 23099 | "}\n" |
| 23100 | "void Other::registerItem(int id) { (void)id; }\n" |
no test coverage detected