oaUnitAssertNotEqual()

The function checks if the checked value is unequal to the expected value.

Synopsis

int oaUnitAssertNotEqual(string TC_ID, anytype checkedValue, anytype expectedValue, [anytype userTcData]);

Parameter

Parameters Meaning
TC ID The test ID. Each test case must contain a test ID.
checkedValue The value that is tested.
expectedValue The expected value.
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, meaning that the value is unequal to the expected value, the function returns 0. If the condition was not fulfilled meaning that the value is equal to the expected value, the function returns 1.

Error

The function returns 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 the checked value is unequal to the expected value.

Example

The function checks if the value returned by the function getTestValue() is unequal to the expected value 100.

#uses "CtrlOaUnit"
main()
{
  const int _VALUE1 = 100;
  /* This example checks if the function getTestValue() returns a value unequal to
  100. This is a good case since the value is unequal to 100 (100-2)*/
  oaUnitAssertNotEqual("IS-UN-EQUAL", getTestValue(), VALUE1);
}
int getTestValue()
{
  return 100 - 2;
}

Assignment

CTRL OA Unit DLL

Availability

CTRL

See also

CTRL OA Unit, Basics