diff options
Diffstat (limited to 'src/unitnumber.cpp')
-rw-r--r-- | src/unitnumber.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/unitnumber.cpp b/src/unitnumber.cpp new file mode 100644 index 0000000..d4bc7a8 --- /dev/null +++ b/src/unitnumber.cpp | |||
@@ -0,0 +1,22 @@ | |||
1 | #include "unitnumber.h" | ||
2 | |||
3 | #include "number.h" | ||
4 | |||
5 | UnitNumber::UnitNumber() | ||
6 | { | ||
7 | setName("Number"); | ||
8 | add( static_cast<Bu::UnitSuite::Test>(&UnitNumber::multiply1), | ||
9 | "multiply1", Bu::UnitSuite::expectPass ); | ||
10 | } | ||
11 | |||
12 | UnitNumber::~UnitNumber() | ||
13 | { | ||
14 | } | ||
15 | |||
16 | void UnitNumber::multiply1() | ||
17 | { | ||
18 | unitTest( | ||
19 | (Number("123456789123456789") * Number("987654321987654321")).toString() | ||
20 | == "121932631356500531347203169112635269" ); | ||
21 | } | ||
22 | |||