@@ -12,9 +12,9 @@ let cntr = 0;
12
12
b . fill ( ++ cntr ) ;
13
13
c . fill ( ++ cntr ) ;
14
14
const copied = b . copy ( c , 0 , 0 , 512 ) ;
15
- assert . strictEqual ( 512 , copied ) ;
15
+ assert . strictEqual ( copied , 512 ) ;
16
16
for ( let i = 0 ; i < c . length ; i ++ ) {
17
- assert . strictEqual ( b [ i ] , c [ i ] ) ;
17
+ assert . strictEqual ( c [ i ] , b [ i ] ) ;
18
18
}
19
19
}
20
20
@@ -23,9 +23,9 @@ let cntr = 0;
23
23
b . fill ( ++ cntr ) ;
24
24
c . fill ( ++ cntr ) ;
25
25
const copied = c . copy ( b , 0 , 0 ) ;
26
- assert . strictEqual ( c . length , copied ) ;
26
+ assert . strictEqual ( copied , c . length ) ;
27
27
for ( let i = 0 ; i < c . length ; i ++ ) {
28
- assert . strictEqual ( c [ i ] , b [ i ] ) ;
28
+ assert . strictEqual ( b [ i ] , c [ i ] ) ;
29
29
}
30
30
}
31
31
@@ -34,9 +34,9 @@ let cntr = 0;
34
34
b . fill ( ++ cntr ) ;
35
35
c . fill ( ++ cntr ) ;
36
36
const copied = c . copy ( b , 0 ) ;
37
- assert . strictEqual ( c . length , copied ) ;
37
+ assert . strictEqual ( copied , c . length ) ;
38
38
for ( let i = 0 ; i < c . length ; i ++ ) {
39
- assert . strictEqual ( c [ i ] , b [ i ] ) ;
39
+ assert . strictEqual ( b [ i ] , c [ i ] ) ;
40
40
}
41
41
}
42
42
@@ -45,9 +45,9 @@ let cntr = 0;
45
45
b . fill ( ++ cntr ) ;
46
46
c . fill ( ++ cntr ) ;
47
47
const copied = b . copy ( c ) ;
48
- assert . strictEqual ( c . length , copied ) ;
48
+ assert . strictEqual ( copied , c . length ) ;
49
49
for ( let i = 0 ; i < c . length ; i ++ ) {
50
- assert . strictEqual ( b [ i ] , c [ i ] ) ;
50
+ assert . strictEqual ( c [ i ] , b [ i ] ) ;
51
51
}
52
52
}
53
53
@@ -56,9 +56,9 @@ let cntr = 0;
56
56
b . fill ( ++ cntr ) ;
57
57
c . fill ( ++ cntr ) ;
58
58
const copied = b . copy ( c , 0 , b . length - Math . floor ( c . length / 2 ) ) ;
59
- assert . strictEqual ( Math . floor ( c . length / 2 ) , copied ) ;
59
+ assert . strictEqual ( copied , Math . floor ( c . length / 2 ) ) ;
60
60
for ( let i = 0 ; i < Math . floor ( c . length / 2 ) ; i ++ ) {
61
- assert . strictEqual ( b [ b . length - Math . floor ( c . length / 2 ) + i ] , c [ i ] ) ;
61
+ assert . strictEqual ( c [ i ] , b [ b . length - Math . floor ( c . length / 2 ) + i ] ) ;
62
62
}
63
63
for ( let i = Math . floor ( c . length / 2 ) + 1 ; i < c . length ; i ++ ) {
64
64
assert . strictEqual ( c [ c . length - 1 ] , c [ i ] ) ;
@@ -70,9 +70,9 @@ let cntr = 0;
70
70
b . fill ( ++ cntr ) ;
71
71
c . fill ( ++ cntr ) ;
72
72
const copied = b . copy ( c , 0 , 0 , 513 ) ;
73
- assert . strictEqual ( c . length , copied ) ;
73
+ assert . strictEqual ( copied , c . length ) ;
74
74
for ( let i = 0 ; i < c . length ; i ++ ) {
75
- assert . strictEqual ( b [ i ] , c [ i ] ) ;
75
+ assert . strictEqual ( c [ i ] , b [ i ] ) ;
76
76
}
77
77
}
78
78
@@ -81,9 +81,9 @@ let cntr = 0;
81
81
b . fill ( ++ cntr ) ;
82
82
b . fill ( ++ cntr , 256 ) ;
83
83
const copied = b . copy ( b , 0 , 256 , 1024 ) ;
84
- assert . strictEqual ( 768 , copied ) ;
84
+ assert . strictEqual ( copied , 768 ) ;
85
85
for ( let i = 0 ; i < b . length ; i ++ ) {
86
- assert . strictEqual ( cntr , b [ i ] ) ;
86
+ assert . strictEqual ( b [ i ] , cntr ) ;
87
87
}
88
88
}
89
89
@@ -106,7 +106,7 @@ assert.throws(function() {
106
106
c . fill ( ++ cntr ) ;
107
107
b . copy ( c , 0 , 0 , 1025 ) ;
108
108
for ( let i = 0 ; i < c . length ; i ++ ) {
109
- assert . strictEqual ( b [ i ] , c [ i ] ) ;
109
+ assert . strictEqual ( c [ i ] , b [ i ] ) ;
110
110
}
111
111
}
112
112
@@ -126,9 +126,9 @@ assert.strictEqual(b.copy(c, 512, 0, 10), 0);
126
126
b . fill ( ++ cntr ) ;
127
127
d . fill ( ++ cntr ) ;
128
128
const copied = b . copy ( d , 0 , 0 , 512 ) ;
129
- assert . strictEqual ( 512 , copied ) ;
129
+ assert . strictEqual ( copied , 512 ) ;
130
130
for ( let i = 0 ; i < d . length ; i ++ ) {
131
- assert . strictEqual ( b [ i ] , d [ i ] ) ;
131
+ assert . strictEqual ( d [ i ] , b [ i ] ) ;
132
132
}
133
133
}
134
134
@@ -139,8 +139,8 @@ assert.strictEqual(b.copy(c, 512, 0, 10), 0);
139
139
e . fill ( ++ cntr ) ;
140
140
c . fill ( ++ cntr ) ;
141
141
const copied = Buffer . prototype . copy . call ( e , c , 0 , 0 , 512 ) ;
142
- assert . strictEqual ( 512 , copied ) ;
142
+ assert . strictEqual ( copied , 512 ) ;
143
143
for ( let i = 0 ; i < c . length ; i ++ ) {
144
- assert . strictEqual ( e [ i ] , c [ i ] ) ;
144
+ assert . strictEqual ( c [ i ] , e [ i ] ) ;
145
145
}
146
146
}
0 commit comments