blob: 17b2ea02f64c24dca30d930d2f196b669dc3c193 [file] [log] [blame]
Andrew Jeffery437c80f2018-02-26 09:59:51 +10301// SPDX-License-Identifier: Apache-2.0
2// Copyright (C) 2018 IBM Corp.
3
4#include "config.h"
Andrew Jeffery437c80f2018-02-26 09:59:51 +10305
Andrew Jeffery53c21aa2018-03-26 11:56:16 +10306#include "vpnor/pnor_partition_table.hpp"
Andrew Jeffery437c80f2018-02-26 09:59:51 +10307
Andrew Jeffery261f61a2019-03-14 09:57:28 +10308#include <cassert>
William A. Kennington IIId5f1d402018-10-11 13:55:04 -07009
Andrew Jeffery437c80f2018-02-26 09:59:51 +103010static constexpr auto BLOCK_SIZE = 4 * 1024;
11
12int main()
13{
14 namespace vpnor = openpower::virtual_pnor;
15
16 struct pnor_partition part;
17 std::string line;
18
19 line = "partition01=FOO,,00001000,80,ECC,PRESERVED";
20 try
21 {
22 openpower::virtual_pnor::parseTocLine(line, BLOCK_SIZE, part);
23 }
24 catch (vpnor::MalformedTocEntry& e)
25 {
26 return 0;
27 }
28
29 assert(false);
30}