!******************************************************************************!
! Starter test for REFORMAT macro
!
! @author  Jeanette McCall
! @issue   NXM-4033
! @since   NeXtMidas 4.1.3
!******************************************************************************
startmacro
  switch INTERACTIVE interAct GET DEF=TRUE  SDEF=TRUE  ! for normal interactive test(s)
  switch BASELINE    baseline GET DEF=FALSE SDEF=TRUE  ! for defects or more obscure test case(s)

  res prefix "test_reformat_"
  res infile  "^{prefix}in_waveform.tmp"
  res outfile "^{prefix}out_waveform.tmp"
  res expfile "^{prefix}exp_waveform.tmp"

  waveform ^{infile} FORM=CF ELEM=512 SHAPE=SINE AMP=256
  reformat ^{infile} ^{outfile} SI ROUND
  waveform ^{expfile} FORM=SI ELEM=512 SHAPE=COS AMP=256

  assert/text="^{reg.main.name}: format from CF to CI" ^{expfile} FEQ/D ^{outfile}

  ! Cleanup test files
  files/e ^{prefix}*
endmacro