@@ 81-95 (lines=15) @@ | ||
78 | /* |
|
79 | * Test add. |
|
80 | */ |
|
81 | public function testAdd() |
|
82 | { |
|
83 | parent::testAdd(); |
|
84 | ||
85 | $this |
|
86 | ->given( |
|
87 | $a = $this->fromNative($this->randomNativeNumber()), |
|
88 | $b = $this->fromNative($this->randomNativeNumber()) |
|
89 | ) |
|
90 | ->when($c = $a->add($b->toInteger())) |
|
91 | ->then |
|
92 | ->object($c) |
|
93 | ->isInstanceOf(Real::class) |
|
94 | ; |
|
95 | } |
|
96 | ||
97 | /* |
|
98 | * Test sub. |
|
@@ 100-114 (lines=15) @@ | ||
97 | /* |
|
98 | * Test sub. |
|
99 | */ |
|
100 | public function testSub() |
|
101 | { |
|
102 | parent::testSub(); |
|
103 | ||
104 | $this |
|
105 | ->given( |
|
106 | $a = $this->fromNative($this->randomNativeNumber()), |
|
107 | $b = $this->fromNative($this->randomNativeNumber()) |
|
108 | ) |
|
109 | ->when($c = $a->sub($b->toInteger())) |
|
110 | ->then |
|
111 | ->object($c) |
|
112 | ->isInstanceOf(Real::class) |
|
113 | ; |
|
114 | } |
|
115 | ||
116 | /* |
|
117 | * Test mult. |
|
@@ 119-133 (lines=15) @@ | ||
116 | /* |
|
117 | * Test mult. |
|
118 | */ |
|
119 | public function testMult() |
|
120 | { |
|
121 | parent::testMult(); |
|
122 | ||
123 | $this |
|
124 | ->given( |
|
125 | $a = $this->fromNative($this->randomNativeNumber()), |
|
126 | $b = $this->fromNative($this->randomNativeNumber()) |
|
127 | ) |
|
128 | ->when($c = $a->mult($b->toInteger())) |
|
129 | ->then |
|
130 | ->object($c) |
|
131 | ->isInstanceOf(Real::class) |
|
132 | ; |
|
133 | } |
|
134 | ||
135 | /* |
|
136 | * Test div. |
|
@@ 138-152 (lines=15) @@ | ||
135 | /* |
|
136 | * Test div. |
|
137 | */ |
|
138 | public function testDiv() |
|
139 | { |
|
140 | parent::testDiv(); |
|
141 | ||
142 | $this |
|
143 | ->given( |
|
144 | $a = $this->fromNative($this->randomNativeNumber()), |
|
145 | $b = $this->fromNative($this->randomNativeNumber()) |
|
146 | ) |
|
147 | ->when($c = $a->div($b->toInteger())) |
|
148 | ->then |
|
149 | ->object($c) |
|
150 | ->isInstanceOf(Real::class) |
|
151 | ; |
|
152 | } |
|
153 | ||
154 | /* |
|
155 | * Test sqrt. |