Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/tests/test_Pathfinder.h
/* Copyright (C) 2022 Wildfire Games. | /* Copyright (C) 2023 Wildfire Games. | ||||
* This file is part of 0!A.D. | * This file is part of 0!A.D. | ||||
* | * | ||||
* 0!A.D. is free software: you can redistribute it and/or modify | * 0!A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0!A.D. is distributed in the hope that it will be useful, | * 0!A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | void test_performance_DISABLED() | ||||
CSimulation2 sim2(NULL, g_ScriptContext, &terrain); | CSimulation2 sim2(NULL, g_ScriptContext, &terrain); | ||||
sim2.LoadDefaultScripts(); | sim2.LoadDefaultScripts(); | ||||
sim2.ResetState(); | sim2.ResetState(); | ||||
std::unique_ptr<CMapReader> mapReader = std::make_unique<CMapReader>(); | std::unique_ptr<CMapReader> mapReader = std::make_unique<CMapReader>(); | ||||
LDR_BeginRegistering(); | LDR_BeginRegistering(); | ||||
mapReader->LoadMap(L"maps/skirmishes/Median Oasis (2).pmp", | mapReader->LoadMap(L"maps/skirmishes/Median Oasis (2).pmp", | ||||
*sim2.GetScriptInterface().GetContext(), JS::UndefinedHandleValue, | sim2.GetScriptInterface().GetContext(), JS::UndefinedHandleValue, | ||||
&terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | ||||
&sim2, &sim2.GetSimContext(), -1, false); | &sim2, &sim2.GetSimContext(), -1, false); | ||||
LDR_EndRegistering(); | LDR_EndRegistering(); | ||||
TS_ASSERT_OK(LDR_NonprogressiveLoad()); | TS_ASSERT_OK(LDR_NonprogressiveLoad()); | ||||
sim2.PreInitGame(); | sim2.PreInitGame(); | ||||
sim2.InitGame(); | sim2.InitGame(); | ||||
sim2.Update(0); | sim2.Update(0); | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | void test_perf2_DISABLED() | ||||
CSimulation2 sim2(NULL, g_ScriptContext, &terrain); | CSimulation2 sim2(NULL, g_ScriptContext, &terrain); | ||||
sim2.LoadDefaultScripts(); | sim2.LoadDefaultScripts(); | ||||
sim2.ResetState(); | sim2.ResetState(); | ||||
std::unique_ptr<CMapReader> mapReader = std::make_unique<CMapReader>(); | std::unique_ptr<CMapReader> mapReader = std::make_unique<CMapReader>(); | ||||
LDR_BeginRegistering(); | LDR_BeginRegistering(); | ||||
mapReader->LoadMap(L"maps/scenarios/Peloponnese.pmp", | mapReader->LoadMap(L"maps/scenarios/Peloponnese.pmp", | ||||
*sim2.GetScriptInterface().GetContext(), JS::UndefinedHandleValue, | sim2.GetScriptInterface().GetContext(), JS::UndefinedHandleValue, | ||||
&terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | ||||
&sim2, &sim2.GetSimContext(), -1, false); | &sim2, &sim2.GetSimContext(), -1, false); | ||||
LDR_EndRegistering(); | LDR_EndRegistering(); | ||||
TS_ASSERT_OK(LDR_NonprogressiveLoad()); | TS_ASSERT_OK(LDR_NonprogressiveLoad()); | ||||
sim2.PreInitGame(); | sim2.PreInitGame(); | ||||
sim2.InitGame(); | sim2.InitGame(); | ||||
sim2.Update(0); | sim2.Update(0); | ||||
Show All 40 Lines | void test_perf3_DISABLED() | ||||
CSimulation2 sim2(NULL, g_ScriptContext, &terrain); | CSimulation2 sim2(NULL, g_ScriptContext, &terrain); | ||||
sim2.LoadDefaultScripts(); | sim2.LoadDefaultScripts(); | ||||
sim2.ResetState(); | sim2.ResetState(); | ||||
std::unique_ptr<CMapReader> mapReader = std::make_unique<CMapReader>(); | std::unique_ptr<CMapReader> mapReader = std::make_unique<CMapReader>(); | ||||
LDR_BeginRegistering(); | LDR_BeginRegistering(); | ||||
mapReader->LoadMap(L"maps/scenarios/Peloponnese.pmp", | mapReader->LoadMap(L"maps/scenarios/Peloponnese.pmp", | ||||
*sim2.GetScriptInterface().GetContext(), JS::UndefinedHandleValue, | sim2.GetScriptInterface().GetContext(), JS::UndefinedHandleValue, | ||||
&terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | &terrain, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | ||||
&sim2, &sim2.GetSimContext(), -1, false); | &sim2, &sim2.GetSimContext(), -1, false); | ||||
LDR_EndRegistering(); | LDR_EndRegistering(); | ||||
TS_ASSERT_OK(LDR_NonprogressiveLoad()); | TS_ASSERT_OK(LDR_NonprogressiveLoad()); | ||||
sim2.PreInitGame(); | sim2.PreInitGame(); | ||||
sim2.InitGame(); | sim2.InitGame(); | ||||
sim2.Update(0); | sim2.Update(0); | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator