gotest

package module
v0.0.0-...-b9e5ada Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 4 Imported by: 0

README

Testing library for Go

WARNING: This repository is work in progress and is purely experimental (PoC) at this point in time.

A Go library that simplifies testing through usage of generics.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert[T any](c C, value T, expectation match.Matcher[T])

Types

type C

type C interface {
	Fail(format string, args ...any)
}

C represents a testing context.

type MockC

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

func NewMockContext

func NewMockContext() *MockC

func (*MockC) DidFail

func (c *MockC) DidFail() bool

func (*MockC) Fail

func (c *MockC) Fail(format string, args ...any)

func (*MockC) FailureMessage

func (c *MockC) FailureMessage() string

type NativeC

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

func NewContext

func NewContext(t *testing.T) *NativeC

func (*NativeC) Fail

func (c *NativeC) Fail(format string, args ...any)

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

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