oaUnitAssertFalse()

Function checks if a condition is FALSE.

Synopsis

int oaUnitAssertFalse(string TC_ID, bool condition, [anytype userTcData]);

Parameter

Parameters Meaning
TC ID The test ID. Each test case must contain a test ID.
condition The test condition to be tested.
userTcData Optional parameter. Test case specific data can be set for the test case.

Return Value

The error code. In case of wrong or missing parameters, the function returns -1 or -2. If the condition was fulfilled, the function returns 0. If the condition was not fulfilled, the function returns 1.

Error

The error code

Description

The CTRL OA Unit CTRL extension contains a set of functions that can be used for testing purposes. The function checks if a condition is FALSE. The condition must be a boolean variable, otherwise the parameter is invalid.

Example

The following example checks if the function getTestValue() returns FALSE.

#uses "CtrlOaUnit"
main()
{
  /* Following example checks if the function getTestValue()
  returns FALSE. This is a good case since the value is FALSE*/
  oaUnitAssertFalse("IS-FALSE", getTestValue());
}
bool getTestValue()
{
  return FALSE;
}

Assignment

CTRL OA Unit DLL

Availability

CTRL

See also

CTRL OA Unit, Basics