refact01.gms : Refactor suite test 1

Description

This test is the first one of the refactor suite. It is used to make sure that
a cmex source code refactorization does not change the expected behavior. There
is an expected sequence when using this test:

1. Run this test with command line option "--before=True"
2. Modify and rebuild cmex
3. Run this test without command line option

Contributor: Lutz Westermann, March 2014


Small Model of Type : GAMS


Category : GAMS Test library


Main file : refact01.gms

$title 'Refactor suite test 1' (REFACT01,SEQ=647)

$onText
This test is the first one of the refactor suite. It is used to make sure that
a cmex source code refactorization does not change the expected behavior. There
is an expected sequence when using this test:

1. Run this test with command line option "--before=True"
2. Modify and rebuild cmex
3. Run this test without command line option

Contributor: Lutz Westermann, March 2014
$offText

$call gamslib -q trnsport
$call gamslib -q circle

$ifThen set before
$  call gams trnsport.gms lo=%GAMS.lo% sys14=1 s=trnsportBefore
$  call gams circle.gms   lo=%GAMS.lo% sys14=1 s=circleBefore
$else
$  if not exist trnsportBefore.g00 $abort Run with --before=True first to get reference workfiles
$  if not exist circleBefore.g00   $abort Run with --before=True first to get reference workfiles
$  call gams trnsport.gms lo=%GAMS.lo% sys14=1 s=trnsportAfter
$  call diff trnsportBefore.g00 trnsportAfter.g00
$  if errorlevel 1 $abort trnsportBefore.g00 and trnsportAfter.g00 differ
$  call gams circle.gms lo=%GAMS.lo% sys14=1 s=circleAfter
$  call diff circleBefore.g00 circleAfter.g00
$  if errorlevel 1 $abort circleBefore.g00 and circleAfter.g00 differ
$endIf