summaryrefslogtreecommitdiffstats
path: root/test/vpnor/toc_no_version.cpp
blob: b6073226cb7f527cb35385bd1da320c3ae87df88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2018 IBM Corp.

#include "config.h"
#include <assert.h>

#include "pnor_partition_table.hpp"

static constexpr auto BLOCK_SIZE = 4 * 1024;

int main()
{
    namespace vpnor = openpower::virtual_pnor;

    struct pnor_partition part;
    std::string line;

    line = "partition01=FOO,00001000,00002000,,ECC,PRESERVED";
    try
    {
        openpower::virtual_pnor::parseTocLine(line, BLOCK_SIZE, part);
    }
    catch (vpnor::MalformedTocEntry& e)
    {
        return 0;
    }

    assert(false);
}
OpenPOWER on IntegriCloud