diff --git a/Framework/Geometry/test/DetectorInfoIteratorTest.h b/Framework/Geometry/test/DetectorInfoIteratorTest.h index 4b2f1c1b892cdf1ba80aaa8dcfcb324b24cebd6a..2eecf7c80de9661d38433b48823b4729385240ad 100644 --- a/Framework/Geometry/test/DetectorInfoIteratorTest.h +++ b/Framework/Geometry/test/DetectorInfoIteratorTest.h @@ -152,11 +152,33 @@ public: auto detectorInfo = create_detector_info_object(); auto iter = detectorInfo.begin(); + for (int i = 0; i < 11; i++) { + TS_ASSERT_EQUALS(iter->position(), i); + ++iter; + } + } + + void test_copy_iterator() { + // Get the DetectorInfo object + auto detectorInfo = create_detector_info_object(); + auto iter = detectorInfo.begin(); + + auto iterCopy = DetectorInfoIterator(iter); + + TS_ASSERT_EQUALS(iter->getIndex(), 0); + TS_ASSERT_EQUALS(iterCopy->getIndex(), 0); + TS_ASSERT_EQUALS(iter->position(), 0); + TS_ASSERT_EQUALS(iterCopy->position(), 0); + ++iter; + ++iterCopy; + + TS_ASSERT_EQUALS(iter->getIndex(), 1); + TS_ASSERT_EQUALS(iterCopy->getIndex(), 1); TS_ASSERT_EQUALS(iter->position(), 1); - ++iter; + TS_ASSERT_EQUALS(iterCopy->position(),1); } }; diff --git a/Framework/PythonInterface/test/python/mantid/geometry/DetectorInfoTest.py b/Framework/PythonInterface/test/python/mantid/geometry/DetectorInfoTest.py index 1acade0227e70491974108f1737219153ecb1861..c68e7649e62949a3ca01619b803e175ad40a3650 100644 --- a/Framework/PythonInterface/test/python/mantid/geometry/DetectorInfoTest.py +++ b/Framework/PythonInterface/test/python/mantid/geometry/DetectorInfoTest.py @@ -113,7 +113,9 @@ class DetectorInfoTest(unittest.TestCase): for a in info: #self.assertEquals(type(a), DetectorInfoItem) #self.assertEquals(info.position(0), "") - self.assertEquals(a.position, 100) + #self.assertEquals(a.position, 100) + print(a) + self.fail()