title: Using one for loop how to iterate and test the iterator values?
body: <p>Here i need to use only one for loop(and no if condition inside) to test the iterator values using google test, Below is my code</p>
  
  <pre><code>TEST(EVTValSortedVector, StdIterator)
  {
      int arr[3], i;
      int data = 4;
      arr[0] = int(2);
      arr[1] = int(1);
      arr[2] = int(3);
  
      EVTValSortedVector&lt;int&gt; eTerriers;
  
      EXPECT_EQ(eTerriers.isEmpty(), true);
  
      for (i = 0; i &lt; 3; i++)
      {
          eTerriers.insert(arr[i]);
      }
      EXPECT_EQ(eTerriers.isEmpty(), false);
  
      EVTValSortedVector&lt;int&gt;::iterator j = eTerriers.begin();
      EVTValSortedVector&lt;int&gt;::iterator k = eTerriers.begin();
  
      ++k;
      for (int i = 0; i &lt; data - 1; i++, j++, ++k)
      {
          EXPECT_LE((*j), (*k));
          cout &lt;&lt; "j and k value" &lt;&lt; *j &lt;&lt; *k &lt;&lt; endl;
      }
  }
  </code></pre>
  
  <blockquote>
    <p><strong>Actual output:</strong></p>
    
    <p>j k<br>
    1 2<br>
    2 3<br>
    3 2</p>
    
    <p><strong>But i need output like this:</strong></p>
    
    <p>j k<br>
    1 1<br>
    1 2<br>
    1 3<br>
    2 2<br>
    2 3<br>
    3 3</p>
  </blockquote>
  
  <p>If i get this needed output(above) then only my test cases will be passed. </p>
  
  <p>Please help me to resolve this, my requirement is by using only one for loop and also no conditions checking inside the loop(no if condition).</p>
  
  <p>Please help.</p>