From c01e4f831e1f58d4638c5a786e438cb536d3eac2 Mon Sep 17 00:00:00 2001 From: Ian Bush Date: Wed, 15 Oct 2014 14:40:19 +0100 Subject: [PATCH] Refs #10370 Added unit test for ReserveMemoryForLoad. --- Code/Mantid/Framework/MDEvents/test/MDBoxTest.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Code/Mantid/Framework/MDEvents/test/MDBoxTest.h b/Code/Mantid/Framework/MDEvents/test/MDBoxTest.h index 1cf9119bce53..136448053eaa 100644 --- a/Code/Mantid/Framework/MDEvents/test/MDBoxTest.h +++ b/Code/Mantid/Framework/MDEvents/test/MDBoxTest.h @@ -629,6 +629,15 @@ static void destroySuite(MDBoxTest * suite) { delete suite; } TS_ASSERT_THROWS_NOTHING(box.unmask()); TSM_ASSERT("Should have been masked.", !box.getIsMasked()); } + + void test_reserve() + { + BoxController_sptr sc( new BoxController(2)); + MDBox,2> b(sc.get()); + + b.reserveMemoryForLoad(3); + TS_ASSERT_EQUALS( b.getEvents().capacity(), 3); + } };