testcommon

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testcommon provides re-usable unit testing functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(test *testing.T, correct, got string)

Compare compares a correct string with a result string and produces formatted output showing them side-by-side with their differences highlighted.

func CompareHex

func CompareHex(test *testing.T, correct, got string)

CompareHex is like compare, but it prits out the differences in

func LogColumns

func LogColumns(test *testing.T, width int, columns ...any)

LogColumns logs columns of text side by side, each column 80 characters wide.

func LogColumnsStyle

func LogColumnsStyle(test *testing.T, width int, style string, columns ...any)

LogColumnsStyle is like LogColumns, but accepts an ANSI escape code as an argument (without the \033[). For example, passing 31m causes the text to be red.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL