Conversation
Test262 conformance changes
Tested main commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5639 +/- ##
===========================================
+ Coverage 47.24% 63.01% +15.76%
===========================================
Files 476 538 +62
Lines 46892 60589 +13697
===========================================
+ Hits 22154 38179 +16025
+ Misses 24738 22410 -2328 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hi @Paraspandey-debugs, thanks for working on this! The logic here makes a lot of sense. Reusing Because One small suggestion for the tests: Overall, great cleanup and fix! |
…ues in Uint8Array and Int8Array
|
Thanks @abdulhamid999 I've updated the tests to cover large values, boundary cases, and non-finite inputs (NaN, +∞, -∞). |
Reduce through the existing 32-bit conversions before taking the low bits. Adopt the modulo conversion change from upstream. Refs: #7 Refs: boa-dev#5639
Exercise signed and unsigned writes through typed arrays and DataView. Refs: #7 Refs: boa-dev#5639
Use the existing modulo-32 conversion for narrow signed and unsigned integer writes. For exponential notation at a requested precision, identify exact binary64 midpoints and choose the larger decimal coefficient. The paired regressions distinguish both failures. The full engine suite passed 1,139 tests. The native host collection regression, formatting, and warning-denied lint checks passed. The narrow integer fix follows [upstream PR boa-dev#5639](boa-dev#5639). Exponential rounding follows [ECMAScript](https://tc39.es/ecma262/#sec-number.prototype.toexponential). Closes #7 Closes #10
Fixes : #5632
Fixed integer conversions for
ToInt8,ToUint8,ToInt16, andToUint16.Previously, these conversions cast
f64toi64before applying modulo. Since Rust'sf64 as i64saturates ati64::MAX/i64::MIN, large values (such as1e20) produced incorrect results.Now, the conversions reuse
f64_to_int32andf64_to_uint32, which correctly handle truncation and modulo 2^32 includingNaN,±0, and±∞. The results are then narrowed usingascasts to preserve the lower 8 or 16 bits.Added tests:
value/tests.rs.typed_array/tests.rs.