Enable low-frequency RTW analyzer range
This commit is contained in:
@@ -3,6 +3,7 @@ import assert from 'node:assert/strict';
|
||||
|
||||
const html = fs.readFileSync(new URL('../www/index.html', import.meta.url), 'utf8');
|
||||
const main = fs.readFileSync(new URL('../www/main.js', import.meta.url), 'utf8');
|
||||
const options = fs.readFileSync(new URL('../www/ui/options.js', import.meta.url), 'utf8');
|
||||
const realtime = fs.readFileSync(new URL('../www/views/realtime.js', import.meta.url), 'utf8');
|
||||
|
||||
const styleSelect = html.match(/<select\b[^>]*\bid="styleSel"[^>]*>/)?.[0] || '';
|
||||
@@ -17,5 +18,9 @@ assert((realtime.match(/applyPeakHold\(state, integrated, CONFIG, range\)/g) ||
|
||||
'every RTA engine must advance peak hold on the display clock');
|
||||
assert(/useIirEngine[^]*?applyRealtimeBarBallistics\(state, displayBase, CONFIG, range\)/.test(realtime),
|
||||
'native IIR bars must advance their visible release on the display clock');
|
||||
assert(/h\('opt_rtaFreq', v => \{\s*CONFIG\.RTA_FREQ_RANGE = \(v === 'lf'\) \? 'lf' : 'norm'/.test(options),
|
||||
'the low-frequency range must remain selectable in the RTW layout');
|
||||
assert(!/RTA_FREQ_RANGE\s*=\s*CONFIG\.RTA_BAR_LAYOUT\s*===\s*'rtw'\s*\?\s*'norm'/.test(options),
|
||||
'the RTW layout must not force the normal frequency range');
|
||||
|
||||
console.log('GUI contract regression tests passed');
|
||||
|
||||
Reference in New Issue
Block a user