Skip to content

Commit

Permalink
Should seek to beginning of file to read with FilePiece
Browse files Browse the repository at this point in the history
  • Loading branch information
kpu committed Jul 18, 2016
1 parent 80a20eb commit de344dc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lm/interpolate/merge_vocab_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ BOOST_AUTO_TEST_CASE(MergeVocabTest) {
BOOST_CHECK_EQUAL(universal_vocab.GetUniversalIdx(1, 3), 4);
BOOST_CHECK_EQUAL(universal_vocab.GetUniversalIdx(2, 3), 10);

util::SeekOrThrow(combined.get(), 0);
util::FilePiece f(combined.release());
BOOST_CHECK_EQUAL("<unk>", f.ReadLine('\0'));
BOOST_CHECK_EQUAL("a", f.ReadLine('\0'));
Expand Down

0 comments on commit de344dc

Please sign in to comment.