summaryrefslogtreecommitdiff
path: root/extractor/matching_test.cc
blob: 9593aa86c825e575fc01653259a3d315dda0765b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <gtest/gtest.h>

#include <vector>

#include "matching.h"

using namespace std;

namespace {

TEST(MatchingTest, SameSize) {
  vector<int> positions{1, 2, 3};
  Matching left(positions.begin(), positions.size(), 0);
  Matching right(positions.begin(), positions.size(), 0);
  EXPECT_EQ(positions, left.Merge(right, positions.size()));
}

TEST(MatchingTest, DifferentSize) {
  vector<int> positions{1, 2, 3};
  Matching left(positions.begin(), positions.size() - 1, 0);
  Matching right(positions.begin() + 1, positions.size() - 1, 0);
  vector<int> result = left.Merge(right, positions.size());
}

}  // namespace