From dec5e6a5c37dd07fdfa8c938506a0777d9000d77 Mon Sep 17 00:00:00 2001 From: David Fang Date: Fri, 1 May 2020 10:31:35 -0700 Subject: [PATCH] Protect a line of code that wasn't mutation-proof. Improves branch coverage. PiperOrigin-RevId: 309431227 --- verilog/formatting/formatter_test.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/verilog/formatting/formatter_test.cc b/verilog/formatting/formatter_test.cc index a2b613d71..677fcf5ed 100644 --- a/verilog/formatting/formatter_test.cc +++ b/verilog/formatting/formatter_test.cc @@ -1585,6 +1585,13 @@ static const std::initializer_list kFormatterTestCases = { " input logic z\n" ");\n" "endinterface\n"}, + {// interface declaration with multiple ports + " interface if1( input\tlogic z, output logic a)\n;endinterface\t\t", + "interface if1 (\n" + " input logic z,\n" // should be one-per-line, even it it fits + " output logic a\n" + ");\n" + "endinterface\n"}, {// interface declaration with parameters and ports " interface if1#( parameter int W= 8 )(input logic z);endinterface\t\t", // doesn't fit on one line