blob: 43c37ebd7c71d7441a028a862dc0024463595294 (
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
26
27
28
29
30
31
32
33
|
#include <gtest/gtest.h>
#include <memory>
#include <string>
#include "alignment.h"
using namespace std;
using namespace ::testing;
namespace extractor {
namespace {
class AlignmentTest : public Test {
protected:
virtual void SetUp() {
alignment = make_shared<Alignment>("sample_alignment.txt");
}
shared_ptr<Alignment> alignment;
};
TEST_F(AlignmentTest, TestGetLinks) {
vector<pair<int, int>> expected_links = {
make_pair(0, 0), make_pair(1, 1), make_pair(2, 2)
};
EXPECT_EQ(expected_links, alignment->GetLinks(0));
expected_links = {make_pair(1, 0), make_pair(2, 1)};
EXPECT_EQ(expected_links, alignment->GetLinks(1));
}
} // namespace
} // namespace extractor
|