platform01.gms : Test platform function

Description

This test ensures that the function "platformCode" and the system attribute
"platform" are in sync and that compile time constants %platformCode.XXX%
work as expected.

Contributor: Lutz Westermann, April 2021


Small Model of Type : GAMS


Category : GAMS Test library


Main file : platform01.gms

$title Test platformCode function (PLATFORM01,SEQ=861)

$onText
This test ensures that the function "platformCode" and the system attribute
"platform" are in sync and that compile time constants %platformCode.XXX%
work as expected.

Contributor: Lutz Westermann, April 2021
$offText


$ifi %system.platform%==DEG
$ife platformCode<>%platformCode.DEG% $abort PlatformCode should be %platformCode.DEG%

$ifi %system.platform%==LEG
$ife platformCode<>%platformCode.LEG% $abort PlatformCode should be %platformCode.LEG%

$ifi %system.platform%==WEX
$ife platformCode<>%platformCode.WEX% $abort PlatformCode should be %platformCode.WEX%


scalar myPFData /[platformCode] /;

$ifi %system.platform%==DEG
$ife myPFData<>%platformCode.DEG% $abort PlatformCode should be %platformCode.DEG%

$ifi %system.platform%==LEG
$ife myPFData<>%platformCode.LEG% $abort PlatformCode should be %platformCode.LEG%

$ifi %system.platform%==WEX
$ife myPFData<>%platformCode.WEX% $abort PlatformCode should be %platformCode.WEX%

scalar myPFExec;

myPFExec = platformCode;

$ifi %system.platform%==DEG abort$(myPFExec<>%platformCode.DEG%) 'PlatformCode should be %platformCode.DEG%';

$ifi %system.platform%==LEG abort$(myPFExec<>%platformCode.LEG%) 'PlatformCode should be %platformCode.LEG%';

$ifi %system.platform%==WEX abort$(myPFExec<>%platformCode.WEX%) 'PlatformCode should be %platformCode.WEX%';