From 7659eae0aed5b33fae24cd40d63b83d22f0d23f7 Mon Sep 17 00:00:00 2001
From: Peter Peterson <petersonpf@ornl.gov>
Date: Wed, 20 Jun 2012 16:06:51 -0400
Subject: [PATCH] Refs #5321. Adding more tests to MaskWorkspace.

---
 .../Framework/DataObjects/test/MaskWorkspaceTest.h  | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Code/Mantid/Framework/DataObjects/test/MaskWorkspaceTest.h b/Code/Mantid/Framework/DataObjects/test/MaskWorkspaceTest.h
index befde975f99..65e3ebad3d9 100644
--- a/Code/Mantid/Framework/DataObjects/test/MaskWorkspaceTest.h
+++ b/Code/Mantid/Framework/DataObjects/test/MaskWorkspaceTest.h
@@ -51,7 +51,7 @@ public:
 
         Mantid::Geometry::Instrument_sptr inst =
                 ComponentCreationHelper::createTestInstrumentRectangular2(1,pixels);
-        inst->setName("MaskWorkspaceTest_Accessors");
+        inst->setName("MaskWorkspaceTest_Instrument");
 
         Mantid::DataObjects::MaskWorkspace* maskWS =
                 new Mantid::DataObjects::MaskWorkspace(inst, false);
@@ -63,8 +63,19 @@ public:
         TS_ASSERT(maskWS->isMasked(0));
         TS_ASSERT_EQUALS(maskWS->isMasked(maskpixels), false); // one past the masked ones
 
+        // unmask a pixel and check it
         maskWS->setMasked(0, false);
         TS_ASSERT_EQUALS(maskWS->isMasked(0), false);
+
+        // check of a group of pixels
+        std::set<Mantid::detid_t> detIds;
+        detIds.insert(0); // isn't masked
+        TS_ASSERT_EQUALS(maskWS->isMasked(detIds), false);
+        detIds.insert(1); // is masked
+        TS_ASSERT_EQUALS(maskWS->isMasked(detIds), false);
+        detIds.erase(0);
+        detIds.insert(2);
+        TS_ASSERT_EQUALS(maskWS->isMasked(detIds), true);
     }
 };
 
-- 
GitLab