MCPcopy Create free account
hub / github.com/catboost/catboost / TEST

Function TEST

library/cpp/iterator/ut/zip_ut.cpp:7–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <util/generic/vector.h>
6
7TEST(TIterator, ZipSimplePostIncrement) {
8 TVector<int> left{1, 2, 3};
9 TVector<int> right{4, 5, 6};
10
11 auto zipped = Zip(left, right);
12 auto cur = zipped.begin();
13 auto last = zipped.end();
14
15 {
16 auto first = *(cur++);
17 EXPECT_EQ(std::get<0>(first), 1);
18 EXPECT_EQ(std::get<1>(first), 4);
19 }
20 {
21 auto second = *(cur++);
22 EXPECT_EQ(std::get<0>(second), 2);
23 EXPECT_EQ(std::get<1>(second), 5);
24 }
25
26 EXPECT_EQ(std::next(cur), last);
27}
28

Callers

nothing calls this directly

Calls 4

ZipFunction · 0.85
nextFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected