summaryrefslogtreecommitdiff
path: root/src/unitnumber.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-23 09:47:29 -0600
committerMike Buland <mike@xagasoft.com>2013-04-23 09:47:29 -0600
commitc234914394b4c8cdee66d7528bad3c132f90dc4d (patch)
treee2204b30d1edd0d7f45a5f8579738e8fa274c644 /src/unitnumber.cpp
parent95da25821bcbcd6a94a7fdf64da1618f5324b779 (diff)
downloadclic-c234914394b4c8cdee66d7528bad3c132f90dc4d.tar.gz
clic-c234914394b4c8cdee66d7528bad3c132f90dc4d.tar.bz2
clic-c234914394b4c8cdee66d7528bad3c132f90dc4d.tar.xz
clic-c234914394b4c8cdee66d7528bad3c132f90dc4d.zip
Added cli params & a unit test.
Diffstat (limited to 'src/unitnumber.cpp')
-rw-r--r--src/unitnumber.cpp22
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
5UnitNumber::UnitNumber()
6{
7 setName("Number");
8 add( static_cast<Bu::UnitSuite::Test>(&UnitNumber::multiply1),
9 "multiply1", Bu::UnitSuite::expectPass );
10}
11
12UnitNumber::~UnitNumber()
13{
14}
15
16void UnitNumber::multiply1()
17{
18 unitTest(
19 (Number("123456789123456789") * Number("987654321987654321")).toString()
20 == "121932631356500531347203169112635269" );
21}
22