# null

# TestResetEnvVarValue

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

## Function Syntax

```
long TestResetEnvVarValue (dbEnvVar aEnvVar);
```

## Description

Resets the environment variable to initial value. If no initial value is available, the environment variable is set to 0 or "".

## Parameters

* **aEnvVar**: Environment variable that should be reset.

## Return Values

* **0**: No error
* **-1**: General error

## Example

```c
// check reaction of signal "LockState" after crash
@EnvErrorCrashDetected = 1;
TestWaitForTimeout(100);
if ($LockState !=  Unlocked)
    TestStepFail("Doors are locked after crash is detected!");

// reset the crash environment variable
TestResetEnvVarValue(EnvErrorCrashDetected);
TestWaitForTimeout(200);
```

[TestResetNamespaceSysVarValues](CAPLfunctionTestResetNamespaceSysVarValues.md) • [TestResetNodeSignalValues](CAPLfunctionTestResetNodeSignalValues.md) • [TestResetSignalValue](CAPLfunctionTestResetSignalValue.md) • [TestResetSysVarValue](CAPLfunctionTestResetSysVarValue.md)
