LCOV - code coverage report
Current view: top level - estd/examples - iterator.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 12 12 100.0 %
Date: 2025-01-20 13:53:09 Functions: 2 3 66.7 %

          Line data    Source code
       1             : // Copyright 2024 Accenture.
       2             : 
       3             : #include "estd/iterator.h"
       4             : 
       5             : #include "estd/vector.h"
       6             : 
       7             : #include <gtest/gtest.h>
       8             : 
       9             : // EXAMPLE_START iterator
      10           3 : TEST(Iterator, Next)
      11             : {
      12           1 :     ::estd::declare::vector<uint32_t, 10> v;
      13           1 :     v.push_back(0U);
      14           1 :     v.push_back(1U);
      15           1 :     v.push_back(2U);
      16           1 :     v.push_back(3U);
      17           1 :     ::estd::vector<uint32_t>::iterator itr = v.begin();
      18           1 :     ASSERT_EQ(0U, *itr);
      19           1 :     ASSERT_EQ(1U, *::estd::next(itr, 1));
      20           1 :     ASSERT_EQ(2U, *::estd::next(itr, 2));
      21           2 :     ASSERT_EQ(3U, *::estd::next(itr, 3));
      22           1 : }
      23             : 
      24             : // EXAMPLE_END iterator

Generated by: LCOV version 1.14