You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Isn't it better to change the function's string template this way, and adding the option of giving the name of the assertion function to parse_args? With a default value assert.
validate_numeric = '''
function validate_numeric(test_value, expected_result, false_results) {
var radix = 2 + Math.abs(expected_result % 35);
{ASSERT}(test_value === expected_result);
{ASSERT}(test_value.toString(radix) === expected_result.toString(radix));
for (var i in false_results) {
radix = 2 + Math.abs(false_results[i] % 35);
{ASSERT}(test_value !== false_results[i]);
{ASSERT}(test_value.toString(radix) !== false_results[i].toString(radix));
}
}
'''
Do you agree with my suggestion or did you mean something else?
In the generated files
test_assert
should be used instead of singleassert
.This makes the test files engine independent.
Task:
compatibility.js
and process the it's arguments.Example:
python gen_compatibility.py --assert=console.assert
Output:
test_assert = console.assert
The text was updated successfully, but these errors were encountered: