Fix BinaryDictDecoderEncoderTests.

Bug: 12809791
Change-Id: I04313df78692b01e153a34c932a37f079a924105
main
Keisuke Kuroyanagi 2014-01-31 19:44:17 +09:00
parent de76e62b69
commit 5cb7509314
1 changed files with 13 additions and 0 deletions

View File

@ -108,6 +108,19 @@ public class BinaryDictDecoderEncoderTests extends AndroidTestCase {
} }
} }
@Override
protected void setUp() throws Exception {
super.setUp();
BinaryDictionary.setCurrentTimeForTest(0);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
// Quit test mode.
BinaryDictionary.setCurrentTimeForTest(-1);
}
private void generateWords(final int number, final Random random) { private void generateWords(final int number, final Random random) {
final int[] codePointSet = CodePointUtils.generateCodePointSet(DEFAULT_CODE_POINT_SET_SIZE, final int[] codePointSet = CodePointUtils.generateCodePointSet(DEFAULT_CODE_POINT_SET_SIZE,
random); random);