From 8219a518aefc8a87e16ffbec8cd06944a0160032 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 11 Feb 2022 10:54:41 +0000 Subject: tools/syz-testbed: introduce BoolCell cell type --- tools/syz-testbed/table.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tools/syz-testbed/table.go') diff --git a/tools/syz-testbed/table.go b/tools/syz-testbed/table.go index f8ead50fb..31312ac93 100644 --- a/tools/syz-testbed/table.go +++ b/tools/syz-testbed/table.go @@ -35,6 +35,10 @@ type RatioCell struct { TotalCount int } +type BoolCell struct { + Value bool +} + func NewValueCell(sample *stats.Sample) *ValueCell { return &ValueCell{Value: sample.Median(), Sample: sample} } @@ -55,6 +59,19 @@ func (c *RatioCell) String() string { return fmt.Sprintf("%d / %d", c.TrueCount, c.TotalCount) } +func NewBoolCell(value bool) *BoolCell { + return &BoolCell{ + Value: value, + } +} + +func (c *BoolCell) String() string { + if c.Value { + return "YES" + } + return "NO" +} + func NewTable(topLeft string, columns ...string) *Table { return &Table{ TopLeftHeader: topLeft, -- cgit mrf-deployment