The script is a unit test that does not manipulate data in the traditional sense. It evaluates an internal logical condition (`1=1`) without interacting with external or specifically created datasets.
1 Code Block
SAS Statement
Explanation : This SAS statement displays the string 'this is a test' in the SAS log. It is commonly used for debugging, marking execution steps, or providing information to the user during program execution.
Copied!
%put this is a test;
1
%put this is a test;
2 Code Block
MACRO CALL
Explanation : This `%mp_assert` macro call is a key feature of the SASUnit test framework. It is used to define and execute an assertion. The `iftrue=(1=1)` parameter specifies the condition to test, which is always true here. The `desc` parameter provides a textual description of the test, which is essential for the readability of unit test reports. Executing this macro will record a positive result for this assertion within the SASUnit context.
Copied!
%mp_assert(
iftrue=(1=1),
desc=My Test Description. This will always Pass!
)
1
%mp_assert(
2
iftrue=(1=1),
3
desc=My Test Description. This will always Pass!
4
)
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 2010-2023 HMS Analytical Software GmbH, http://www.analytical-software.de. This file is part of SASUnit, the unit testing framework for SAS(R) programs. For copyright information and terms of use under the GNU Lesser General Public License, see the included README.md file or https://github.com/HMS-Analytical-Software/SASUnit/wiki/readme/.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.