1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-07-07 14:54:11 +00:00

Add SetListingView.

I'm having linker errors in gtest, pushing to see
if this also happens on the build server.
This commit is contained in:
King_DuckZ 2016-02-09 23:23:50 +01:00
parent 346946340d
commit ada0f1df50
4 changed files with 52 additions and 32 deletions

View file

@ -23,6 +23,7 @@
//TEST_F for class
TEST(machinery, diriterator) {
using mchlib::SetListing;
using mchlib::SetListingView;
using mchlib::FileRecordData;
FileRecordData test_data_arr[] = {
@ -911,9 +912,15 @@ TEST(machinery, diriterator) {
SetListing lst(std::move(test_data));
auto i = lst.begin();
std::cout << i->abs_path << '\n';
EXPECT_EQ("", i->abs_path);
++i;
std::cout << i->abs_path << '\n';
++i;
std::cout << i->abs_path << '\n';
EXPECT_EQ("BestAndBest", i->abs_path);
auto view = SetListingView(i);
auto i2 = view.cbegin();
EXPECT_EQ("BestAndBest/CD1", i2->abs_path);
++i2;
EXPECT_EQ("BestAndBest/CD2", i2->abs_path);
}