# null

# TestGetVerdictLastTestCase

[Valid for](../../../Shared/FeatureAvailability.md): CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

## Function Syntax

```c
long TestGetVerdictLastTestCase();
```

## Description

Returns the verdict of the last elapsed or current test case.

## Parameters

—

## Return Values

* **0**: pass
* **1**: fail
* **2**: none
* **3**: inconclusive
* **4**: error in test system

## Example

**Example 1**

```c
// gets the verdict of last test case and report it in the Write Window
void MainTest()
{
   MyTestCase();
   if (TestGetVerdictLastTestCase() == 1)
      Write("MyTestCase failed.");
   else
      Write("MyTestCase passed.");
}
```

**Example 2**

See example: [TestSetVerdictModule](CAPLfunctionsTFSExampleTestSetVerdictModule.md)

[TestGetVerdictModule](CAPLfunctionTestGetVerdictModule.md)
