summaryrefslogtreecommitdiff
path: root/extractor/fast_intersector_test.cc
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-06-25 15:13:30 +0100
committerPaul Baltescu <pauldb89@gmail.com>2013-06-25 15:13:30 +0100
commitcd4dbb5c0b581efb0369330ea330f2b473628a96 (patch)
treeb6d41b64b75100954cccdd3ef2f4035e2c7fa837 /extractor/fast_intersector_test.cc
parent5794c0109902cf19a52cc8f1799353270ed9d85d (diff)
Reduce memory used by precomputation.
Diffstat (limited to 'extractor/fast_intersector_test.cc')
-rw-r--r--extractor/fast_intersector_test.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/extractor/fast_intersector_test.cc b/extractor/fast_intersector_test.cc
index 76c3aaea..2e618b63 100644
--- a/extractor/fast_intersector_test.cc
+++ b/extractor/fast_intersector_test.cc
@@ -60,14 +60,14 @@ class FastIntersectorTest : public Test {
precomputation = make_shared<MockPrecomputation>();
EXPECT_CALL(*precomputation, GetCollocations())
- .WillRepeatedly(ReturnRef(collocations));
+ .WillRepeatedly(Return(collocations));
phrase_builder = make_shared<PhraseBuilder>(vocabulary);
intersector = make_shared<FastIntersector>(suffix_array, precomputation,
vocabulary, 15, 1);
}
- Index collocations;
+ Collocations collocations;
shared_ptr<MockDataArray> data_array;
shared_ptr<MockSuffixArray> suffix_array;
shared_ptr<MockPrecomputation> precomputation;
@@ -82,9 +82,9 @@ TEST_F(FastIntersectorTest, TestCachedCollocation) {
Phrase phrase = phrase_builder->Build(symbols);
PhraseLocation prefix_location(15, 16), suffix_location(16, 17);
- collocations[symbols] = expected_location;
+ collocations.push_back(make_pair(symbols, expected_location));
EXPECT_CALL(*precomputation, GetCollocations())
- .WillRepeatedly(ReturnRef(collocations));
+ .WillRepeatedly(Return(collocations));
intersector = make_shared<FastIntersector>(suffix_array, precomputation,
vocabulary, 15, 1);