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