Fix incorrect case

This commit is contained in:
Wenlu Wang 2021-07-27 18:17:50 +08:00 committed by rwaldron
parent 74727cd4ed
commit 915f7e79be
6 changed files with 8 additions and 8 deletions

View File

@ -36,7 +36,7 @@ arr = ['Skateboard', 'Barefoot'];
arr.findLast(function(kValue) { arr.findLast(function(kValue) {
if (results.length === 0) { if (results.length === 0) {
arr.push('Motorcycle'); arr.push('Motorcycle');
arr[1] = 'Magic Carpet'; arr[0] = 'Magic Carpet';
} }
results.push(kValue); results.push(kValue);

View File

@ -36,7 +36,7 @@ arr = ['Skateboard', 'Barefoot'];
arr.findLastIndex(function(kValue) { arr.findLastIndex(function(kValue) {
if (results.length === 0) { if (results.length === 0) {
arr.push('Motorcycle'); arr.push('Motorcycle');
arr[1] = 'Magic Carpet'; arr[0] = 'Magic Carpet';
} }
results.push(kValue); results.push(kValue);

View File

@ -44,7 +44,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
if ( i === 2 ) { if ( i === 2 ) {
sample[0] = 7n; sample[0] = 7n;
} }
return val === 3n; return val === 1n;
}); });
assert.sameValue(result, undefined, "value not found"); assert.sameValue(result, undefined, "value not found");
@ -62,5 +62,5 @@ testWithBigIntTypedArrayConstructors(function(TA) {
sample[2] = 7n; sample[2] = 7n;
return true; return true;
}); });
assert.sameValue(result, 1n, "findLast() returns previous found value"); assert.sameValue(result, 3n, "findLast() returns previous found value");
}); });

View File

@ -44,7 +44,7 @@ testWithTypedArrayConstructors(function(TA) {
if ( i === 2 ) { if ( i === 2 ) {
sample[0] = 7; sample[0] = 7;
} }
return val === 3; return val === 1;
}); });
assert.sameValue(result, undefined, "value not found"); assert.sameValue(result, undefined, "value not found");
@ -62,5 +62,5 @@ testWithTypedArrayConstructors(function(TA) {
sample[2] = 7; sample[2] = 7;
return true; return true;
}); });
assert.sameValue(result, 1, "findLast() returns previous found value"); assert.sameValue(result, 3, "findLast() returns previous found value");
}); });

View File

@ -43,7 +43,7 @@ testWithBigIntTypedArrayConstructors(function(TA) {
if ( i === 2 ) { if ( i === 2 ) {
sample[0] = 7n; sample[0] = 7n;
} }
return val === 30n; return val === 10n;
}); });
assert.sameValue(result, -1, "value not found"); assert.sameValue(result, -1, "value not found");

View File

@ -43,7 +43,7 @@ testWithTypedArrayConstructors(function(TA) {
if ( i === 2 ) { if ( i === 2 ) {
sample[0] = 7; sample[0] = 7;
} }
return val === 30; return val === 10;
}); });
assert.sameValue(result, -1, "value not found"); assert.sameValue(result, -1, "value not found");