Documentation ¶
Overview ¶
This provides various testing utilities that are compatible with the gocheck package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DirectoryMatches = &directoryMatcher{ &CheckerInfo{Name: "DirectoryMatches", Params: []string{"obtained", "expected"}}, }
View Source
var ErrorIsNil Checker = &errorIsNilChecker{ &CheckerInfo{Name: "ErrorIsNil", Params: []string{"value"}}, }
The IsNil checker tests whether the obtained value is nil.
For example:
c.Assert(err, IsNil)
View Source
var FileMatches = &fileMatcher{ &CheckerInfo{Name: "FileMatches", Params: []string{"obtained", "expected"}}, }
View Source
var HasFilesNamed = &directoryContains{ &CheckerInfo{Name: "HasFilesNamed", Params: []string{"obtained", "expected"}}, }
View Source
var NilOrErrorMatches = &nilErrorMatcher{ &CheckerInfo{Name: "NilOrErrorMatches", Params: []string{"obtained", "regex"}}, }
Functions ¶
func CreateTestFile ¶
This creates a file named fileName in a temporary directory specifically created for this file. The contents are then written to the file. This file will be deleted at the end of a test. If creation of the file fails, the test will be aborted. The method will return the full path to the created file.
func UnsafeUnixCopyTree ¶
Function to copy a directory tree in UNIX-ey OSes. This just runs cp -r
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.