feature

package
v2.0.0-pre.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package feature implements utilities common to implementations of FeatureDetector.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFileForTest

func LoadFileForTest(name string) []byte

LoadFileForTest can be used in order to obtain the []byte contents of a file that is meant to be used for test data.

func TestDetector

func TestDetector(t *testing.T, detector detectors.FeaturesDetector, testData []TestData)

TestDetector runs a detector on each provided instance of TestData and asserts the ouput to be equal to the expected output.

Types

type TestData

type TestData struct {
	Data            map[string][]byte
	FeatureVersions []database.FeatureVersion
}

TestData represents the data used to test an implementation of FeatureDetector.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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