summaryrefslogtreecommitdiffstats
path: root/tests/libother
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libother')
-rw-r--r--tests/libother/number.cpp6
-rw-r--r--tests/libother/number.h8
2 files changed, 13 insertions, 1 deletions
diff --git a/tests/libother/number.cpp b/tests/libother/number.cpp
index 0c64def6..61dc3319 100644
--- a/tests/libother/number.cpp
+++ b/tests/libother/number.cpp
@@ -46,3 +46,9 @@ Number::toStr() const
return in.str().c_str();
}
+Point
+operator*(const Point& p, const Number& n)
+{
+ return Point(p.x() * n.value(), p.y() * n.value());
+}
+
diff --git a/tests/libother/number.h b/tests/libother/number.h
index d739802d..32af3325 100644
--- a/tests/libother/number.h
+++ b/tests/libother/number.h
@@ -37,18 +37,24 @@
#include "libothermacros.h"
#include "str.h"
+#include "point.h"
class LIBOTHER_API Number
{
public:
explicit Number(int value) : m_value(value) {};
- int value() { return m_value; }
+ int value() const { return m_value; }
Str toStr() const;
operator Str() const { return toStr(); }
+ friend LIBOTHER_API Point operator*(const Point&, const Number&);
+
private:
int m_value;
};
+
+LIBOTHER_API Point operator*(const Point&, const Number&);
+
#endif // NUMBER_H