helpers

package
v7.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: MIT Imports: 4 Imported by: 4

Documentation

Overview

Package helpers provides basic helper methods for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LongestStringLength

func LongestStringLength(strings []string) (result int)

LongestStringLength provides the length of the longest string in the given string collection.

func TableFields

func TableFields(table *gherkin.DataTable) (result []string)

TableFields provides the header fields of the given table.

func UniqueString

func UniqueString() string

UniqueString provides a globally unique number.

Types

type OrderedStringSet

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

OrderedStringSet is a Set for strings that provides the accumulated strings in the order they were received. The zero value is a fully functional empty set.

func NewOrderedStringSet

func NewOrderedStringSet(elements ...string) OrderedStringSet

NewOrderedStringSet provides instances of OrderedStringSet populated with the given elements.

func (OrderedStringSet) Add

Add provides a new Set with the given element added. If the element already exists, it re-uses the existing element and does not append a new one.

func (OrderedStringSet) Contains

func (set OrderedStringSet) Contains(text string) bool

Contains indicates whether this Set contains the given string.

func (OrderedStringSet) Slice

func (set OrderedStringSet) Slice() []string

Slice provides the elements of this set in the order they were received.

func (OrderedStringSet) String

func (set OrderedStringSet) String() string

Jump to

Keyboard shortcuts

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