File tree Expand file tree Collapse file tree 5 files changed +40
-0
lines changed Expand file tree Collapse file tree 5 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 11set (MODULE global )
22set (MODULE_URI Global )
33set (MODULE_SRC
4+ globalmodule.cpp
5+ globalmodule.h
46 modularity/ioc.h
57 modularity/modulesioc.h
68 modularity/imoduleexportinterface.h
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: GPL-3.0-or-later
2+
3+ #include " globalmodule.h"
4+
5+ using namespace scratchcpp ;
6+
7+ std::string GlobalModule::moduleName () const
8+ {
9+ return " global" ;
10+ }
Original file line number Diff line number Diff line change 1+ // SPDX-License-Identifier: GPL-3.0-or-later
2+
3+ #pragma once
4+
5+ #include " modularity/imodulesetup.h"
6+
7+ namespace scratchcpp
8+ {
9+
10+ class GlobalModule : public modularity ::IModuleSetup
11+ {
12+ public:
13+ std::string moduleName () const override ;
14+ };
15+
16+ } // namespace scratchcpp
Original file line number Diff line number Diff line change 11set (MODULE_TEST_SRC
22 modularity.cpp
3+ setup.cpp
34 fakeexport.h
45 fakedependency.h
56 mocks/moduleexportinterfacemock.h
Original file line number Diff line number Diff line change 1+ #include < gtest/gtest.h>
2+
3+ #include " globalmodule.h"
4+
5+ using namespace scratchcpp ;
6+
7+ TEST (GlobalSetupTest, ModuleName)
8+ {
9+ GlobalModule module ;
10+ ASSERT_EQ (module .moduleName (), " global" );
11+ }
You can’t perform that action at this time.
0 commit comments