Published on :
Macro CREATION_INTERNE

Macro assert_not_null - Non-Nullity Assertion

This code is also available in: Deutsch Español Français
This macro, likely from the FUTS testing framework, aims to validate that a value is not empty. It begins by incrementing a global test counter (&futs_tst_cnt). Then, it checks the length of the 'ARG1' argument. If this length is zero, it delegates error or alert handling to the '%generate_event' macro, passing various context parameters (message, severity level, files or data to attach, etc.).
Data Analysis

Type : CREATION_INTERNE


The code does not access any external data source. It performs logical operations on macro variables.

1 Code Block
Macro
Explanation :
Macro definition. Increments the global test counter. If the ARG1 argument is empty, it triggers an event via the %generate_event macro with the specified attributes (message, type, attachments, etc.).
Copied!
1%macro assert_not_null( ARG1,
2 MESSAGE=Null value,
3 TYPE=,
4 LEVEL=,
5 ATTACHDATA=,
6 ATTACHFILE=,
7 METRIC=,
8 PROPERTIES=,
9 ON_EVENT=,
10 DESCRIPTION=, ABORT= );
11 
12%let futs_tst_cnt = %eval(&futs_tst_cnt.+1);
13
14%IF %LENGTH(&ARG1) eq 0 %THEN
15 %generate_event(TYPE=&TYPE, LEVEL=&LEVEL,
16 MESSAGE=&MESSAGE,
17 ATTACHDATA=&ATTACHDATA, ATTACHFILE=&ATTACHFILE,
18 METRIC=&METRIC,
19 PROPERTIES=&PROPERTIES,
20 ON_EVENT=&ON_EVENT,
21 DESCRIPTION=&DESCRIPTION, ABORT=&ABORT);
22 
23%mend assert_not_null;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : Copyright (c) 2015 John Jacobs. All rights reserved.