!******************************************************************************!
! PLOT prescaler tests that SHOULD NOT generally be run, but were validated
! to still be functional on 2023-12-20
!
! @bug      NXM-3078 PLOT: Does not display zero-padded Pre-D data
! @since    4.1.4
! @author:  Jeanette McCall
!******************************************************************************!
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)
  switch COREGRAPHICS coreGraphics GET DEF=FALSE SDEF=TRUE ! for a quick check of graphics - more extreme tests - since 3.8.1

  %test_plot_prescalerext_detail_1000
  %test_plot_prescalerext_detail_1000/noprescale
  INFO "PLOT/ALL of 1000 file prescales, even when prescale not specified" 
  %test_plot_prescalerext_detail_1000/noprescale/outsidepipe
  %test_plot_prescalerext_detail_2000
  %test_plot_prescalerext_detail_2000/noprescale
  INFO "PLOT/ALL of 2000 file DOES NOT automatically prescale - bad scaling" 
  %test_plot_prescalerext_detail_2000/noprescale/outsidepipe

  %test_plot_prescalerkw_detail_1000
  %test_plot_prescalerkw_detail_1000/noprescale
  INFO "PLOT/ALL of 1000 file prescales, even when prescale not specified" 
  %test_plot_prescalerkw_detail_1000/noprescale/outsidepipe

  %TEST_PLOT_PRESCALERext_1000
  INFO "PLOT/ALL of 1000 file prescales, even when prescale not specified" 
  %TEST_PLOT_PRESCALERext_1000/noprescale/outsidepipe
  %TEST_PLOT_PRESCALERext_2000
  INFO "PLOT/ALL of 2000 file DOES NOT automatically prescale - bad scaling" 
  %TEST_PLOT_PRESCALERext_2000/noprescale/outsidepipe


endmacro
!******************************************************************************!
! Main process message for this macro. Should be right after the ENDMACRO.
!******************************************************************************!
procedure processMessage m:msg
  if msg.name eqs "MAIN" then
    assert/text="^reg.main.name: User indicated tests" msg.data eqss "PASS"
    pipe stop
  else
    say "Unhandled message name: ^msg.name from fid: ^msg.fid data: ^msg.data"
  endif
return

!******************************************************************************!
! If an unexpected exception is caught, mark test as failed, unless it is expected
!******************************************************************************!
procedure processException m:emsg
  if expectedException REXISTS then
    assert/text="^reg.main.name: Expected ERROR starts with: ^{expectedException}" expectedException EQSS emsg.data.message
    remove expectedException
  else
    assert/text="^reg.main.name: Caught unexpected exception ^{emsg.data}" "FALSE" isTrue
    if "Trace" SUBS ENV.DEBUG then invoke ,, emsg.data.printStackTrace()
  endif
return