From c1027f478caec0654dc330ebca06cef61ad17ac7 Mon Sep 17 00:00:00 2001 From: wraitii Date: Sun, 6 Jan 2019 16:32:50 +0000 Subject: [PATCH] Test we can destroy INVALID_ENTITY This is part of the spec and wasn't unit-tested for. Differential Revision: https://code.wildfiregames.com/D1735 This was SVN commit r22036. --- source/simulation2/tests/test_Simulation2.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/simulation2/tests/test_Simulation2.h b/source/simulation2/tests/test_Simulation2.h index d2dcbf88dc..07f8dabad3 100644 --- a/source/simulation2/tests/test_Simulation2.h +++ b/source/simulation2/tests/test_Simulation2.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2019 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -107,6 +107,10 @@ public: sim.FlushDestroyedEntities(); // nothing in the queue + // Allow destroying INVALID_ENTITY which should do nothing. + sim.DestroyEntity(INVALID_ENTITY); + sim.FlushDestroyedEntities(); + sim.DestroyEntity(ent2); sim.FlushDestroyedEntities(); // already deleted