aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample/str.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-12-29 10:09:58 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-12-29 15:42:18 -0300
commit9f79c3de8192c4ce5f0ae86687d3ece2196323ba (patch)
tree742281d9a54b01c1e9888b311878c6a8604c57ef /tests/libsample/str.h
parent731a68999274ab58fb35f3d3238f713fbf91c878 (diff)
Adds test for modified function using type system template.
The new test adds a "toInt(bool* ok = 0, int base = 10)" method to Str class. The modification uses a type system template function that uses the variable "%2" to reference the "base" argument; in the case when the thing is called without parameters "%2" should be replaced by "10" instead of a converted C++ variable name. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'tests/libsample/str.h')
-rw-r--r--tests/libsample/str.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/libsample/str.h b/tests/libsample/str.h
index 52f46e6ba..1fe27ec8b 100644
--- a/tests/libsample/str.h
+++ b/tests/libsample/str.h
@@ -54,6 +54,8 @@ public:
char get_char(int pos) const;
bool set_char(int pos, char ch);
+ int toInt(bool* ok = 0, int base = 10) const;
+
void show() const;
int size() const { return m_str.size(); }