@@ -16,7 +16,7 @@ test('divide: division with Infinity', t => {
16
16
blocks . divide ( { NUM1 : 'Infinity' , NUM2 : 111 } ) , Infinity , '"Infinity" / 111 = Infinity'
17
17
) ;
18
18
t . strictEqual (
19
- blocks . divide ( { NUM1 : 'INFINITY' , NUM2 : 222 } ) , Infinity , '"INFINITY" / 222 = Infinity '
19
+ blocks . divide ( { NUM1 : 'INFINITY' , NUM2 : 222 } ) , 0 , '"INFINITY" / 222 = 0 '
20
20
) ;
21
21
t . strictEqual (
22
22
blocks . divide ( { NUM1 : Infinity , NUM2 : 333 } ) , Infinity , 'Infinity / 333 = Infinity'
@@ -26,7 +26,7 @@ test('divide: division with Infinity', t => {
26
26
blocks . divide ( { NUM1 : 111 , NUM2 : 'Infinity' } ) , 0 , '111 / "Infinity" = 0'
27
27
) ;
28
28
t . strictEqual (
29
- blocks . divide ( { NUM1 : 222 , NUM2 : 'INFINITY' } ) , 0 , '222 / "INFINITY" = 0 '
29
+ blocks . divide ( { NUM1 : 222 , NUM2 : 'INFINITY' } ) , Infinity , '222 / "INFINITY" = Infinity '
30
30
) ;
31
31
t . strictEqual (
32
32
blocks . divide ( { NUM1 : 333 , NUM2 : Infinity } ) , 0 , '333 / Infinity = 0'
@@ -36,7 +36,7 @@ test('divide: division with Infinity', t => {
36
36
blocks . divide ( { NUM1 : '-Infinity' , NUM2 : 111 } ) , - Infinity , '"-Infinity" / 111 = -Infinity'
37
37
) ;
38
38
t . strictEqual (
39
- blocks . divide ( { NUM1 : '-INFINITY' , NUM2 : 222 } ) , - Infinity , '"-INFINITY" / 222 = -Infinity '
39
+ blocks . divide ( { NUM1 : '-INFINITY' , NUM2 : 222 } ) , 0 , '"-INFINITY" / 222 = 0 '
40
40
) ;
41
41
t . strictEqual (
42
42
blocks . divide ( { NUM1 : - Infinity , NUM2 : 333 } ) , - Infinity , '-Infinity / 333 = -Infinity'
@@ -46,7 +46,7 @@ test('divide: division with Infinity', t => {
46
46
blocks . divide ( { NUM1 : 111 , NUM2 : '-Infinity' } ) , 0 , '111 / "-Infinity" = 0'
47
47
) ;
48
48
t . strictEqual (
49
- blocks . divide ( { NUM1 : 222 , NUM2 : '-INFINITY' } ) , 0 , '222 / "-INFINITY" = 0 '
49
+ blocks . divide ( { NUM1 : 222 , NUM2 : '-INFINITY' } ) , Infinity , '222 / "-INFINITY" = Infinity '
50
50
) ;
51
51
t . strictEqual (
52
52
blocks . divide ( { NUM1 : 333 , NUM2 : - Infinity } ) , 0 , '333 / -Infinity = 0'
@@ -60,7 +60,7 @@ test('multiply: multiply Infinity with numbers', t => {
60
60
blocks . multiply ( { NUM1 : 'Infinity' , NUM2 : 111 } ) , Infinity , '"Infinity" * 111 = Infinity'
61
61
) ;
62
62
t . strictEqual (
63
- blocks . multiply ( { NUM1 : 'INFINITY' , NUM2 : 222 } ) , Infinity , '"INFINITY" * 222 = Infinity '
63
+ blocks . multiply ( { NUM1 : 'INFINITY' , NUM2 : 222 } ) , 0 , '"INFINITY" * 222 = 0 '
64
64
) ;
65
65
t . strictEqual (
66
66
blocks . multiply ( { NUM1 : Infinity , NUM2 : 333 } ) , Infinity , 'Infinity * 333 = Infinity'
@@ -69,7 +69,7 @@ test('multiply: multiply Infinity with numbers', t => {
69
69
blocks . multiply ( { NUM1 : '-Infinity' , NUM2 : 111 } ) , - Infinity , '"-Infinity" * 111 = -Infinity'
70
70
) ;
71
71
t . strictEqual (
72
- blocks . multiply ( { NUM1 : '-INFINITY' , NUM2 : 222 } ) , - Infinity , '"-INFINITY" * 222 = -Infinity '
72
+ blocks . multiply ( { NUM1 : '-INFINITY' , NUM2 : 222 } ) , 0 , '"-INFINITY" * 222 = 0 '
73
73
) ;
74
74
t . strictEqual (
75
75
blocks . multiply ( { NUM1 : - Infinity , NUM2 : 333 } ) , - Infinity , '-Infinity * 333 = -Infinity'
@@ -90,7 +90,7 @@ test('add: add Infinity to a number', t => {
90
90
blocks . add ( { NUM1 : 'Infinity' , NUM2 : 111 } ) , Infinity , '"Infinity" + 111 = Infinity'
91
91
) ;
92
92
t . strictEqual (
93
- blocks . add ( { NUM1 : 'INFINITY' , NUM2 : 222 } ) , Infinity , '"INFINITY" + 222 = Infinity '
93
+ blocks . add ( { NUM1 : 'INFINITY' , NUM2 : 222 } ) , 222 , '"INFINITY" + 222 = 222 '
94
94
) ;
95
95
t . strictEqual (
96
96
blocks . add ( { NUM1 : Infinity , NUM2 : 333 } ) , Infinity , 'Infinity + 333 = Infinity'
@@ -99,7 +99,7 @@ test('add: add Infinity to a number', t => {
99
99
blocks . add ( { NUM1 : '-Infinity' , NUM2 : 111 } ) , - Infinity , '"-Infinity" + 111 = -Infinity'
100
100
) ;
101
101
t . strictEqual (
102
- blocks . add ( { NUM1 : '-INFINITY' , NUM2 : 222 } ) , - Infinity , '"-INFINITY" + 222 = -Infinity '
102
+ blocks . add ( { NUM1 : '-INFINITY' , NUM2 : 222 } ) , 222 , '"-INFINITY" + 222 = 222 '
103
103
) ;
104
104
t . strictEqual (
105
105
blocks . add ( { NUM1 : - Infinity , NUM2 : 333 } ) , - Infinity , '-Infinity + 333 = -Infinity'
@@ -117,7 +117,7 @@ test('subtract: subtract Infinity with a number', t => {
117
117
blocks . subtract ( { NUM1 : 'Infinity' , NUM2 : 111 } ) , Infinity , '"Infinity" - 111 = Infinity'
118
118
) ;
119
119
t . strictEqual (
120
- blocks . subtract ( { NUM1 : 'INFINITY' , NUM2 : 222 } ) , Infinity , '"INFINITY" - 222 = Infinity '
120
+ blocks . subtract ( { NUM1 : 'INFINITY' , NUM2 : 222 } ) , - 222 , '"INFINITY" - 222 = -222 '
121
121
) ;
122
122
t . strictEqual (
123
123
blocks . subtract ( { NUM1 : Infinity , NUM2 : 333 } ) , Infinity , 'Infinity - 333 = Infinity'
@@ -126,7 +126,7 @@ test('subtract: subtract Infinity with a number', t => {
126
126
blocks . subtract ( { NUM1 : 111 , NUM2 : 'Infinity' } ) , - Infinity , '111 - "Infinity" = -Infinity'
127
127
) ;
128
128
t . strictEqual (
129
- blocks . subtract ( { NUM1 : 222 , NUM2 : 'INFINITY' } ) , - Infinity , '222 - "INFINITY" = -Infinity '
129
+ blocks . subtract ( { NUM1 : 222 , NUM2 : 'INFINITY' } ) , 222 , '222 - "INFINITY" = 222 '
130
130
) ;
131
131
t . strictEqual (
132
132
blocks . subtract ( { NUM1 : 333 , NUM2 : Infinity } ) , - Infinity , '333 - Infinity = -Infinity'
0 commit comments