Find
C
ase-sensitive
R
egexp search
Path
Showing
b3fa3cd9
:
Bug
2018334
- Disable test_DownloadLegacy and test_DownloadCore for permafailing on macOS 14.70.
firefox-main
/
js
/
src
/
jit-test
/
etc
Navigation
Enable keyboard shortcuts
Name
Description
Size
Coverage
generate-lookupswitch-tests.js
A test case spec is an array of objects of the following kind: { 'match': Num|Str|Null, 'body': Num|Str|Null, 'fallthrough': Boolean } If the 'match' is null, then it represents a 'default:' If the 'match' is not null, it represents a 'case X:' where X is the value. If the 'body' is null, then it means that the case body is empty. Otherwise, it means that the case body is a single 'arr.push(V);' where "arr" is an input array to the function containing the switch statement, and V is the value. If 'fallthrough' is false, then the body is terminated with a break, otherwise it is not. So a spec: [{'match':3, 'body':null, 'fallthrough':false}, {'match':null, 'body':"foo", 'fallthrough':true}] Represents a switch function: function(x, arr) { switch(x) { case 3: break; default: arr.push('foo'); } } GenerateSpecPermutes generates a bunch of relevant specs, using the given case match-values, and appends them to result the array passed into it. InterpretSwitch takes a spec, a value, and a result array, and behaves as if the switch specified by the spec had been called on the value and the result array. VerifySwitchSpec is there but not used in the code. I was using it while testing the test case generator. It verifies that a switch spec is sane. RunSpec uses eval to run the test directly. It's not used currently. GenerateSwitchCode generates a string of the form "function NAME(x, arg) { .... }" which contains the switch modeled by its input spec. RunTest is there to be used from within the generated script. Its code is dumped out to the generated script text, and invoked there. Hope all of this makes some sort of sense. -kannan
12782
-
generate-nosuchproperty-tests.js
2627
-
wasm
-