summaryrefslogtreecommitdiffstats
path: root/tests/libsample/strlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libsample/strlist.h')
-rw-r--r--tests/libsample/strlist.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/libsample/strlist.h b/tests/libsample/strlist.h
index 5845d06b..98dfdee1 100644
--- a/tests/libsample/strlist.h
+++ b/tests/libsample/strlist.h
@@ -31,17 +31,27 @@
class LIBSAMPLE_API StrList : public std::list<Str>
{
public:
- inline StrList() {}
- inline explicit StrList(const Str& str) { push_back(str); }
- inline StrList(const StrList& lst) : std::list<Str>(lst) { }
- inline StrList(const std::list<Str>& lst) : std::list<Str>(lst) { }
+ enum CtorEnum {
+ NoParamsCtor,
+ StrCtor,
+ CopyCtor,
+ ListOfStrCtor
+ };
+
+ inline StrList() : m_ctorUsed(NoParamsCtor) {}
+ inline explicit StrList(const Str& str) : m_ctorUsed(StrCtor) { push_back(str); }
+ inline StrList(const StrList& lst) : std::list<Str>(lst), m_ctorUsed(CopyCtor) {}
+ inline StrList(const std::list<Str>& lst) : std::list<Str>(lst), m_ctorUsed(ListOfStrCtor) {}
inline void append(Str str) { push_back(str); }
Str join(const Str& sep) const;
bool operator==(const std::list<Str>& other) const;
inline bool operator!=(const std::list<Str>& other) const { return !(*this == other); }
+
+ CtorEnum constructorUsed() { return m_ctorUsed; }
+private:
+ CtorEnum m_ctorUsed;
};
#endif // STRLIST_H
-