Skip to content
Snippets Groups Projects
Commit 8d3ca331 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix broken liblatinime_unittests" am: 62013c4f am: 5e1756c5 am: 326ff853

Original change: https://android-review.googlesource.com/c/platform/packages/inputmethods/LatinIME/+/1589747

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I942d720895724ae24a241a59c3feaf71b5d2cba2
parents a9bbf1d3 326ff853
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,13 @@ TEST(FormatUtilsTest, TestDetectFormatVersion) {
{
const std::vector<uint8_t> buffer =
getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_2, 0, 0);
EXPECT_EQ(FormatUtils::VERSION_2, FormatUtils::detectFormatVersion(
EXPECT_EQ(FormatUtils::UNKNOWN_VERSION, FormatUtils::detectFormatVersion(
ReadOnlyByteArrayView(buffer.data(), buffer.size())));
}
{
const std::vector<uint8_t> buffer =
getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_202, 0, 0);
EXPECT_EQ(FormatUtils::VERSION_202, FormatUtils::detectFormatVersion(
ReadOnlyByteArrayView(buffer.data(), buffer.size())));
}
{
......@@ -75,7 +81,7 @@ TEST(FormatUtilsTest, TestDetectFormatVersion) {
{
const std::vector<uint8_t> buffer =
getBuffer(FormatUtils::MAGIC_NUMBER - 1, FormatUtils::VERSION_2, 0, 0);
getBuffer(FormatUtils::MAGIC_NUMBER - 1, FormatUtils::VERSION_402, 0, 0);
EXPECT_EQ(FormatUtils::UNKNOWN_VERSION, FormatUtils::detectFormatVersion(
ReadOnlyByteArrayView(buffer.data(), buffer.size())));
}
......@@ -87,7 +93,7 @@ TEST(FormatUtilsTest, TestDetectFormatVersion) {
}
{
const std::vector<uint8_t> buffer =
getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_2, 0, 0);
getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_402, 0, 0);
EXPECT_EQ(FormatUtils::UNKNOWN_VERSION, FormatUtils::detectFormatVersion(
ReadOnlyByteArrayView(buffer.data(), buffer.size() - 1)));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment