Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e70791c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7149879 from 8d3ca331 to sc-release

Change-Id: I979410b788b592c7af2fbe2a7c917792b25c6d04
parents 117b9e27 8d3ca331
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -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)));
    }