From e40c79e93b9a15e0f9c8f9dc188cf6f6227b0d44 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Wed, 26 Apr 2017 15:25:04 +0200
Subject: [PATCH] [T] DOF: document test code assumptions.

---
 Tests/NumLib/LocalToGlobalIndexMapMultiComponent.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Tests/NumLib/LocalToGlobalIndexMapMultiComponent.cpp b/Tests/NumLib/LocalToGlobalIndexMapMultiComponent.cpp
index 0c416f3679f..6777e610a70 100644
--- a/Tests/NumLib/LocalToGlobalIndexMapMultiComponent.cpp
+++ b/Tests/NumLib/LocalToGlobalIndexMapMultiComponent.cpp
@@ -224,7 +224,10 @@ void NumLibLocalToGlobalIndexMapMultiDOFTest::test(
 
             ASSERT_EQ(2, global_idcs.size()); // boundary of quad is line with two nodes
 
-            for (unsigned n=0; n<2; ++n) // boundary of quad is line with two nodes
+            // e is the number of a boundary element (which is a line, so two
+            // nodes) from 0 to something. e+n must be the node ids along the
+            // x-axis of the mesh;
+            for (unsigned n = 0; n < 2; ++n)
             {
                 auto const node = e + n;
                 auto const glob_idx =
@@ -286,8 +289,10 @@ void NumLibLocalToGlobalIndexMapMultiDOFTest::test(
                 2,
                 global_idcs.size());  // boundary of quad is line with two nodes
 
-            for (unsigned n = 0; n < 2;
-                 ++n)  // boundary of quad is line with two nodes
+            // e is the number of a boundary element (which is a line, so two
+            // nodes) from 0 to something. e+n must be the node ids along the
+            // x-axis of the mesh;
+            for (unsigned n = 0; n < 2; ++n)
             {
                 auto const node = e + n;
                 auto const glob_idx =
-- 
GitLab