mirror of https://github.com/KLayout/klayout.git
Updating shape count output format and tests
This commit is contained in:
parent
9e0572b863
commit
d326df2424
|
|
@ -604,7 +604,8 @@ BD_PUBLIC int strmxor (int argc, char *argv[])
|
|||
|
||||
const char *line_format = " %-10s %-12s %s";
|
||||
|
||||
std::string headline = tl::sprintf (line_format, tl::to_string (tr ("Layer")), tl::to_string (tr ("Output")), tl::to_string (tr ("Differences (shape count)")));
|
||||
std::string headline = tl::sprintf (line_format, tl::to_string (tr ("Layer")), tl::to_string (tr ("Output")),
|
||||
deep ? tl::to_string (tr ("Differences (hierarchical/flat count)")) : tl::to_string (tr ("Differences (shape count)")));
|
||||
|
||||
const char *sep = " ----------------------------------------------------------------";
|
||||
|
||||
|
|
@ -633,7 +634,7 @@ BD_PUBLIC int strmxor (int argc, char *argv[])
|
|||
out = r->second.layout->get_properties (r->second.layer_output).to_string ();
|
||||
}
|
||||
if (deep) {
|
||||
value = tl::sprintf (tl::to_string (tr ("%lu (hierarchical) %lu (flat)")), r->second.count (), r->second.flat_count ());
|
||||
value = tl::sprintf (tl::to_string (tr ("%-6lu / %-6lu")), r->second.count (), r->second.flat_count ());
|
||||
} else {
|
||||
value = tl::to_string (r->second.count ());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,11 +146,11 @@ TEST(1A_Deep)
|
|||
"Layer 10/0 is not present in first layout, but in second\n"
|
||||
"Result summary (layers without differences are not shown):\n"
|
||||
"\n"
|
||||
" Layer Output Differences (hierarchical shape count)\n"
|
||||
" Layer Output Differences (hierarchical/flat count)\n"
|
||||
" ----------------------------------------------------------------\n"
|
||||
" 3/0 3/0 3\n"
|
||||
" 6/0 6/0 314\n"
|
||||
" 8/1 8/1 1\n"
|
||||
" 3/0 3/0 3 / 30 \n"
|
||||
" 6/0 6/0 314 / 314 \n"
|
||||
" 8/1 8/1 1 / 1 \n"
|
||||
" 10/0 - (no such layer in first layout)\n"
|
||||
"\n"
|
||||
);
|
||||
|
|
@ -188,11 +188,11 @@ TEST(1A_DeepNoEmptyCells)
|
|||
"Layer 10/0 is not present in first layout, but in second\n"
|
||||
"Result summary (layers without differences are not shown):\n"
|
||||
"\n"
|
||||
" Layer Output Differences (hierarchical shape count)\n"
|
||||
" Layer Output Differences (hierarchical/flat count)\n"
|
||||
" ----------------------------------------------------------------\n"
|
||||
" 3/0 3/0 3\n"
|
||||
" 6/0 6/0 314\n"
|
||||
" 8/1 8/1 1\n"
|
||||
" 3/0 3/0 3 / 30 \n"
|
||||
" 6/0 6/0 314 / 314 \n"
|
||||
" 8/1 8/1 1 / 1 \n"
|
||||
" 10/0 - (no such layer in first layout)\n"
|
||||
"\n"
|
||||
);
|
||||
|
|
@ -248,11 +248,11 @@ TEST(1B_Deep)
|
|||
"Layer 10/0 is not present in first layout, but in second\n"
|
||||
"Result summary (layers without differences are not shown):\n"
|
||||
"\n"
|
||||
" Layer Output Differences (hierarchical shape count)\n"
|
||||
" Layer Output Differences (hierarchical/flat count)\n"
|
||||
" ----------------------------------------------------------------\n"
|
||||
" 3/0 - 3\n"
|
||||
" 6/0 - 314\n"
|
||||
" 8/1 - 1\n"
|
||||
" 3/0 - 3 / 30 \n"
|
||||
" 6/0 - 314 / 314 \n"
|
||||
" 8/1 - 1 / 1 \n"
|
||||
" 10/0 - (no such layer in first layout)\n"
|
||||
"\n"
|
||||
);
|
||||
|
|
@ -830,10 +830,10 @@ TEST(7_OptimizeDeep)
|
|||
EXPECT_EQ (cap.captured_text (),
|
||||
"Result summary (layers without differences are not shown):\n"
|
||||
"\n"
|
||||
" Layer Output Differences (hierarchical shape count)\n"
|
||||
" Layer Output Differences (hierarchical/flat count)\n"
|
||||
" ----------------------------------------------------------------\n"
|
||||
" 2/0 2/0 1\n"
|
||||
" 3/0 3/0 8\n"
|
||||
" 2/0 2/0 1 / 12 \n"
|
||||
" 3/0 3/0 8 / 8 \n"
|
||||
"\n"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue