diff options
| author | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
|---|---|---|
| committer | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
| commit | 7dfcc480ba1e19bd3232349fc733caef94034292 (patch) | |
| tree | 03ee104eb8846d5cc1a981d267687a729185d3f3 /Dragon/data/assertV.c2m | |
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Dragon/data/assertV.c2m')
| -rw-r--r-- | Dragon/data/assertV.c2m | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Dragon/data/assertV.c2m b/Dragon/data/assertV.c2m new file mode 100644 index 0000000..1043520 --- /dev/null +++ b/Dragon/data/assertV.c2m @@ -0,0 +1,32 @@ +* +* Assert procedure for non-regression testing +* Recover a value from a list of real arrays +* Author: A. Hebert +* +PARAMETER LCMNAM :: ::: LINKED_LIST LCMNAM ; ; +CHARACTER KEY ; +INTEGER ISET IPOS ; +REAL REFVALUE ; +:: >>KEY<< >>ISET<< >>IPOS<< >>REFVALUE<< ; +INTEGER ITYLCM ; +REAL VALUE DELTA ; +MODULE GREP: ABORT: END: ; +* +GREP: LCMNAM :: TYPE <<KEY>> >>ITYLCM<< ; +IF ITYLCM 10 = THEN + GREP: LCMNAM :: STEP UP <<KEY>> GETVAL <<ISET>> <<IPOS>> >>VALUE<< ; +ELSE + PRINT "assertV: INVALID TYPE=" ITYLCM ; + ABORT: ; +ENDIF ; +EVALUATE DELTA := VALUE REFVALUE - REFVALUE / ABS ; +IF DELTA 1.0E-4 < THEN + PRINT "TEST SUCCESSFUL; DELTA=" DELTA ; +ELSE + PRINT "------------" ; + PRINT "TEST FAILURE" ; + PRINT "------------" ; + PRINT "REFERENCE=" REFVALUE " CALCULATED=" VALUE ; + ABORT: ; +ENDIF ; +END: ; |
