From 5096213b6436eeb4dd6fcb9a5ea92bb4ffe80406 Mon Sep 17 00:00:00 2001 From: Michael Behrisch Date: Mon, 5 Feb 2024 09:36:47 +0100 Subject: [PATCH] more defaults for unit tests #21 --- src/microsim/MSGlobals.cpp | 6 +++--- unittest/src/microsim/MSCFModelTest.cpp | 1 - unittest/src/microsim/MSCFModel_IDMTest.cpp | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/microsim/MSGlobals.cpp b/src/microsim/MSGlobals.cpp index 86531da99813..801ee205ea75 100644 --- a/src/microsim/MSGlobals.cpp +++ b/src/microsim/MSGlobals.cpp @@ -48,7 +48,7 @@ bool MSGlobals::gEmergencyInsert; SUMOTime MSGlobals::gLaneChangeDuration; -double MSGlobals::gLateralResolution; +double MSGlobals::gLateralResolution(-1.); // default for unitTest bool MSGlobals::gStateLoaded; bool MSGlobals::gUseMesoSim; @@ -59,13 +59,13 @@ bool MSGlobals::gOverheadWireSolver; bool MSGlobals::gOverheadWireRecuperation; bool MSGlobals::gOverheadWireCurrentLimits; -bool MSGlobals::gSemiImplicitEulerUpdate; +bool MSGlobals::gSemiImplicitEulerUpdate(true); // default for unitTest SUMOTime MSGlobals::gWaitingTimeMemory; SUMOTime MSGlobals::gActionStepLength; -double MSGlobals::gDefaultEmergencyDecel(-1); // default for unitTest +double MSGlobals::gDefaultEmergencyDecel(-1.); // default for unitTest bool MSGlobals::gUseStopEnded(false); bool MSGlobals::gUseStopStarted(false); diff --git a/unittest/src/microsim/MSCFModelTest.cpp b/unittest/src/microsim/MSCFModelTest.cpp index 29a07ec04ef8..137b71dff5cc 100644 --- a/unittest/src/microsim/MSCFModelTest.cpp +++ b/unittest/src/microsim/MSCFModelTest.cpp @@ -48,7 +48,6 @@ protected : tau = 1; type = new MSVehicleType(SUMOVTypeParameter("0")); m = new MSCFModel_Krauss(type); - MSGlobals::gSemiImplicitEulerUpdate = true; } virtual void TearDown() { diff --git a/unittest/src/microsim/MSCFModel_IDMTest.cpp b/unittest/src/microsim/MSCFModel_IDMTest.cpp index 706226ef9639..cc3f935fc31e 100644 --- a/unittest/src/microsim/MSCFModel_IDMTest.cpp +++ b/unittest/src/microsim/MSCFModel_IDMTest.cpp @@ -84,7 +84,6 @@ protected : veh = new MSVehicleMock(defs, route, type, 1); veh->setTentativeLaneAndPosition(dummyLane, 0); veh->initDevices(); - MSGlobals::gSemiImplicitEulerUpdate = true; } virtual void TearDown() {