We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 586f2e8 commit a99a028Copy full SHA for a99a028
test/src/Integer/copy.js
@@ -0,0 +1,30 @@
1
+import test from 'ava' ;
2
+import { ZZ } from '../../../src' ;
3
+
4
+test ( 'Integer#copy' , t => {
5
6
+ const s = '34998403804830' ;
7
8
+ const a = ZZ.from(s) ;
9
+ const b = a.copy();
10
11
+ t.is(a.toString(), s);
12
+ t.is(b.toString(), s);
13
14
+ a.negate();
15
16
+ t.is(a.toString(), '-'+s);
17
18
19
+ a.isub(a);
20
21
+ t.is(a.toString(), '0');
22
23
24
+ a.iadd(b);
25
26
27
28
29
30
+} ) ;
0 commit comments