From 7a3a459af5bbd1dbefa3e0bbbb11795c8f555b0a Mon Sep 17 00:00:00 2001 From: Dejan Mircevski Date: Mon, 30 Nov 2015 11:21:09 -0500 Subject: [PATCH] Mention that ParsedInstruction owns its components. Also close a parenthesis in ParsedInstruction printout. --- test/BinaryParse.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/BinaryParse.cpp b/test/BinaryParse.cpp index fc5756c..fe93b8d 100644 --- a/test/BinaryParse.cpp +++ b/test/BinaryParse.cpp @@ -50,7 +50,8 @@ using ::testing::ElementsAre; using ::testing::Eq; // An easily-constructible and comparable object for the contents of an -// spv_parsed_instruction_t. +// spv_parsed_instruction_t. Unlike spv_parsed_instruction_t, owns the memory +// of its components. struct ParsedInstruction { ParsedInstruction(const spv_parsed_instruction_t& inst) : words(inst.words, inst.words + inst.num_words), @@ -88,6 +89,7 @@ std::ostream& operator<<(std::ostream& os, const ParsedInstruction& inst) { << " number_kind: " << int(operand.number_kind) << " number_bit_width: " << int(operand.number_bit_width) << "}"; } + os << ")"; return os; } -- 2.7.4