Skip to content

Commit 0ab6973

Browse files
committed
Fixed unit test build
1 parent 5a7c47d commit 0ab6973

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

src/wsjcpp_arguments.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ WSJCppArgumentProcessor::WSJCppArgumentProcessor(const std::string &sName, const
7373

7474
// ---------------------------------------------------------------------
7575

76+
WSJCppArgumentProcessor::WSJCppArgumentProcessor(const std::vector<std::string> &vNames, const std::string &sDescription) {
77+
if (vNames.size() < 1) {
78+
WSJCppLog::throw_err(TAG, "Names must have 1 or more values for '" + sDescription + "'");
79+
}
80+
std::string sName = vNames[0];
81+
TAG = "WSJCppArgumentProcessor-" + sName;
82+
m_sName = sName;
83+
m_sDescription = sDescription;
84+
}
85+
86+
// ---------------------------------------------------------------------
87+
7688
std::string WSJCppArgumentProcessor::getName() {
7789
return m_sName;
7890
}

src/wsjcpp_arguments.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class WSJCppArgumentParameter {
4141
class WSJCppArgumentProcessor {
4242
public:
4343
WSJCppArgumentProcessor(const std::string &sName, const std::string &sDescription);
44+
WSJCppArgumentProcessor(const std::vector<std::string> &vNames, const std::string &sDescription);
4445
std::string getName();
4546
std::string getDescription();
4647

@@ -67,6 +68,7 @@ class WSJCppArgumentProcessor {
6768

6869
private:
6970
std::string m_sName;
71+
std::vector<std::string> vNames;
7072
std::string m_sDescription;
7173
std::vector<WSJCppArgumentProcessor *> m_vProcessors;
7274
std::vector<WSJCppArgumentSingle *> m_vSingleArguments;

unit-tests/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ set (WSJCPP_SOURCES "")
1111

1212
# Sources
1313

14-
# wsjcpp-core
15-
list (APPEND WSJCPP_INCLUDE_DIRS "../src.wsjcpp/wsjcpp-core/")
16-
list (APPEND WSJCPP_SOURCES "../src.wsjcpp/wsjcpp-core/wsjcpp_core.h")
17-
list (APPEND WSJCPP_SOURCES "../src.wsjcpp/wsjcpp-core/wsjcpp_core.cpp")
14+
# wsjcpp_wsjcpp_core
15+
list (APPEND WSJCPP_INCLUDE_DIRS "../src.wsjcpp/wsjcpp_wsjcpp_core/")
16+
list (APPEND WSJCPP_SOURCES "../src.wsjcpp/wsjcpp_wsjcpp_core/wsjcpp_core.h")
17+
list (APPEND WSJCPP_SOURCES "../src.wsjcpp/wsjcpp_wsjcpp_core/wsjcpp_core.cpp")
1818

1919
# wsjcpp-arguments
2020
list (APPEND WSJCPP_INCLUDE_DIRS "../src")

wsjcpp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ dependencies:
3333
distribution:
3434
- source-file: src/wsjcpp_arguments.cpp
3535
target-file: wsjcpp_arguments.cpp
36-
sha1: "a6d1156597470cabdf368e5733b75a22d8a7fe1f"
36+
sha1: "0be6d86b88f63f8aa71481ec4e0a7ee238797338"
3737
type: "source-code"
3838
- source-file: src/wsjcpp_arguments.h
3939
target-file: wsjcpp_arguments.h
40-
sha1: "cfc5cce21522378a594a25b11ac61d6a4a3f2863"
40+
sha1: "a80e2fe927872112fa68cf87913aaec4ce710acc"
4141
type: "source-code"
4242

4343
unit-tests:

0 commit comments

Comments
 (0)