aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/libsample/str.cpp6
-rw-r--r--tests/libsample/str.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/libsample/str.cpp b/tests/libsample/str.cpp
index 87e1145ce..29dac75c7 100644
--- a/tests/libsample/str.cpp
+++ b/tests/libsample/str.cpp
@@ -45,6 +45,12 @@ Str::Str(const Str& s)
init(s.cstring());
}
+Str::Str(char c)
+{
+ char str[2] = { c, 0 };
+ init(str);
+}
+
Str::Str(const char* cstr)
{
init(cstr);
diff --git a/tests/libsample/str.h b/tests/libsample/str.h
index 1fe27ec8b..7cf62acbe 100644
--- a/tests/libsample/str.h
+++ b/tests/libsample/str.h
@@ -42,6 +42,7 @@ class LIBSAMPLE_API Str
{
public:
Str(const Str& s);
+ Str(char c);
Str(const char* cstr = "");
~Str();