03:56 | <ljharb> | What was done when the bigint arrays were added? |
04:10 | <bakkot> | those tests basically were not updated |
04:10 | <bakkot> | that does make some sense because it's harder to be generic over those |
04:11 | <bakkot> | it's split into https://github.com/tc39/test262/blob/c4642dd714175b5d27939c920abc6059c9fddb06/harness/testTypedArray.js and https://github.com/tc39/test262/blob/c4642dd714175b5d27939c920abc6059c9fddb06/harness/testBigIntTypedArray.js |
04:48 | <ljharb> | ok |
04:49 | <ljharb> | should there be a testFloat16TypedArray.js, to follow the pattern? |
04:49 | <ljharb> | or should the bigint ones be conditionally merged into testTypedArray? |
04:50 | <bakkot> | if you look at how testFloat16TypedArray.js works, that can't really be a thing - everything consumer would need to be updated, which is strictly more work than just writing manual tests in the first place |
04:50 | <bakkot> | the bigint ones can't quite really go in testTypedArray because most of the consumers assume that TAs contain Numbers |
09:42 | <ptomato> | one idea might be to have a separate harness file that appends Float16Array into the floatArrayConstructors array that's defined by testTypedArray.js ? |
09:43 | <ptomato> | that way you could do includes: [testTypedArray.js, testFloat16TypedArray.js] and features: [Float16Array] in your test, and it would Just Work; although it would run all the other typed array tests twice, I guess |
09:44 | <ptomato> | the "push if global is available" solution seems reasonable as well, though |
09:44 | <ptomato> | as long as we have tests that verify the global is actually there |
16:22 | <bakkot> | yeah I will write separate tests which use the feature flag and test Float16Array-specific stuff |
16:22 | <bakkot> | rounding behavior at the very least |
17:21 | <canadahonk> | is there an official like "test262 es2020"/etc? I see things like it thrown around a bit but can't find anything |
17:24 | <ptomato> | as in, run test262 on all the feature set of es2020? I don't think that exists, but there might be one I'm not aware of |
17:43 | <canadahonk> | yeah I saw some (niche-r) engines say like "passing 80% of test262 es2020". guessing they just select some dirs |
17:46 | <bakkot> | if I were them I would check out a commit at a particular point in time and use that |
18:06 | <canadahonk> | fwiw I checked their runner source, it looks like they tie each feature flag to a rough ES version (https://github.com/boa-dev/boa/blob/main/boa_tester/src/edition.rs) |
18:10 | <bakkot> | ah neat! |