summaryrefslogtreecommitdiffstats
path: root/vpnor/test/toc_no_name.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vpnor/test/toc_no_name.cpp')
-rw-r--r--vpnor/test/toc_no_name.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/vpnor/test/toc_no_name.cpp b/vpnor/test/toc_no_name.cpp
new file mode 100644
index 0000000..d62056f
--- /dev/null
+++ b/vpnor/test/toc_no_name.cpp
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright (C) 2018 IBM Corp.
+
+#include "config.h"
+#include <assert.h>
+
+#include "vpnor/pnor_partition_table.hpp"
+
+static constexpr auto BLOCK_SIZE = 4 * 1024;
+
+int main()
+{
+ namespace vpnor = openpower::virtual_pnor;
+
+ const std::string line = "partition01=,00000000,00000400,80,ECC,PRESERVED";
+ struct pnor_partition part;
+
+ try
+ {
+ vpnor::parseTocLine(line, BLOCK_SIZE, part);
+ }
+ catch (vpnor::MalformedTocEntry& e)
+ {
+ return 0;
+ }
+
+ assert(false);
+}
OpenPOWER on IntegriCloud