From 63acbdda3741e9e9c701ca3cd027929b84f3aefd Mon Sep 17 00:00:00 2001
From: Owen Arnold <owen.arnold@stfc.ac.uk>
Date: Tue, 22 Jan 2019 14:40:55 +0000
Subject: [PATCH] refs #24322. Do not test undefined behaviour.

---
 Framework/Geometry/test/DetectorInfoIteratorTest.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/Framework/Geometry/test/DetectorInfoIteratorTest.h b/Framework/Geometry/test/DetectorInfoIteratorTest.h
index 6d63c9b6c1a..4626086642e 100644
--- a/Framework/Geometry/test/DetectorInfoIteratorTest.h
+++ b/Framework/Geometry/test/DetectorInfoIteratorTest.h
@@ -166,15 +166,6 @@ public:
         !bidirectionalit);
 
     // see https://en.cppreference.com/w/cpp/iterator/advance
-    // Demonstrate internal switched behaviour in std::advance
-    auto detectorInfo = create_detector_info_object();
-    auto it = detectorInfo->cbegin();
-    TS_ASSERT_EQUALS(it->index(), 0);
-    std::advance(it, 2);
-    TS_ASSERT_EQUALS(it->index(), 2);
-    std::advance(it, -2);
-    TSM_ASSERT_EQUALS("Was not decremented. Not zero. For reasons above",
-                      it->index(), 2);
   }
 
   void test_iterator_advance_and_positions() {
-- 
GitLab