issues

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package issues : htmltest issue store, provides a store and issue structs.

Index

Constants

View Source
const (
	// LevelNone : option to suppress output, actual error types follow
	LevelNone int = 99
	// LevelError : Fatal problems, presence of an error causes tests to fail
	LevelError int = 3
	// LevelWarning : An advisory, tests still pass
	LevelWarning int = 2
	// LevelInfo : Verbose information, normally hidden, not too noisy
	LevelInfo int = 1
	// LevelDebug : Debug output, normally hidden, very noisy
	LevelDebug int = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	Level     int                // Level of the issue, use the consts at the top of this file
	Document  *htmldoc.Document  // Document this issue pertains to
	Reference *htmldoc.Reference // Reference this issue pertains to
	Message   string             // Error message, keep short
	// contains filtered or unexported fields
}

Issue struct representing a single issue with a document. Set all except Document and Reference, set one or the other.

type IssueStore

type IssueStore struct {
	// contains filtered or unexported fields
}

IssueStore : store of htmltest issues.

func NewIssueStore

func NewIssueStore(logLevel int, printImmediately bool) IssueStore

NewIssueStore : Create an issuestore, assigns defaults and returns.

func (*IssueStore) AddIssue

func (iS *IssueStore) AddIssue(issue Issue)

AddIssue : Add an issue to the issue store, thread safe.

func (*IssueStore) Count

func (iS *IssueStore) Count(level int) int

Count : Counts the number of issues in the store at, or above, the given level.

func (*IssueStore) CountByDoc added in v0.3.0

func (iS *IssueStore) CountByDoc(level int, doc *htmldoc.Document) int

CountByDoc : Count the number of issues in the store at, or above, the given level pertaining to the provided document. Thread safe.

func (*IssueStore) DumpIssues added in v0.1.1

func (iS *IssueStore) DumpIssues(force bool)

DumpIssues : Dump all issues to stdout, called by test helpers when issue asserts fail.

func (*IssueStore) MessageMatchCount

func (iS *IssueStore) MessageMatchCount(substr string) int

MessageMatchCount : Count the number of issues in the store containing the provided substr.

func (*IssueStore) PrintDocumentIssues added in v0.3.0

func (iS *IssueStore) PrintDocumentIssues(doc *htmldoc.Document)

PrintDocumentIssues : Print issues pertaining to a single document, given that document's SitePath. Respects log level.

func (*IssueStore) WriteLog

func (iS *IssueStore) WriteLog(path string)

WriteLog : Write the issue store to the given path, filtered by logLevel given in NewIssueStore.

Jump to

Keyboard shortcuts

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