! Test macro for GROUP command.
!
! The amount of testing that can be done here is limited, more is possible with
! GROUP, see macro test_split_group
!
! @author  Ken Smith
! @version $Id: test_group.mm,v 1.11 2013/01/17 23:15:49 jxc Exp $
!
!
startmacro
  call test_basic    ! <-- Basic tests for GROUP command
endmacro

! ******************************************************************************
! Basic tests for the GROUP command. This is the full "suite" of tests that existed
! in NeXtMidas 3.2 and earlier, but with some cleanup added in NeXtMidas 3.3.1.
!
procedure test_basic L:nel[10]
  ! Combine a type-1000 file, type-2000 and type-3000 file
  waveform ram:test1 sf nel constant -50
  waveform ram:test2 sf nel constant -30
  waveform ram:test3 sf nel constant -10
  waveform ram:test4 sf nel constant  10
  waveform ram:test5 sf nel constant  30

  group ram:test6 ram:test2 ram:test3
  group ram:test7 ram:test4 ram:test5

  headermod ram:test7 type=3000 format=sf nsr=2 rl=8 sr(1)=(sb01,SF,0) sr(2)=(sb02,SF,4)
  group/warn=false ram:test8 ram:test1 ram:test6 ram:test7
  headermod ram:test8 type=1000 format=sf

  waveform ram:test9 sf nel*5 sawtooth 50 .2 0 0 1
  assert/text="GROUP: compare" ram:test8 FEQ/T/D/S ram:test9
return