testutils

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestExpression

func TestExpression(t *testing.T, e litsql.Expression, output string, args ...any)

func TestExpressionErrorIs

func TestExpressionErrorIs(t *testing.T, e litsql.Expression, errIs error)

func TestExpressionIsError

func TestExpressionIsError(t *testing.T, e litsql.Expression)

func TestExpressionSlice added in v0.3.6

func TestExpressionSlice(t *testing.T, e []litsql.Expression, output string, args ...any)

func TestExpressionSliceErrorIs added in v0.3.6

func TestExpressionSliceErrorIs(t *testing.T, e []litsql.Expression, errIs error)

func TestExpressionSliceIsError added in v0.3.6

func TestExpressionSliceIsError(t *testing.T, e []litsql.Expression)

func TestQuery added in v0.4.1

func TestQuery(t *testing.T, query litsql.Query, expected string, expectedArgs ...any)

func TestQueryErrorIs added in v0.4.1

func TestQueryErrorIs(t *testing.T, query litsql.Query, errIs error)

func TestQueryIsError added in v0.4.1

func TestQueryIsError(t *testing.T, query litsql.Query)

func TestQueryParseArgs added in v0.4.2

func TestQueryParseArgs(t *testing.T, query litsql.Query, expected string, argValues map[string]any, expectedArgs ...any)

func TestWriterExpression added in v0.3.6

func TestWriterExpression(t *testing.T, e litsql.Expression, output *TestBuffer, args ...any)

func TestWriterExpressionErrorIs added in v0.3.6

func TestWriterExpressionErrorIs(t *testing.T, e litsql.Expression, errIs error)

func TestWriterExpressionIsError added in v0.3.6

func TestWriterExpressionIsError(t *testing.T, e litsql.Expression)

Types

type TestBuffer

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

func NewTestBuffer

func NewTestBuffer(options ...TestBufferOption) *TestBuffer

func (*TestBuffer) Output

func (b *TestBuffer) Output() string

func (*TestBuffer) OutputNL

func (b *TestBuffer) OutputNL() string

func (*TestBuffer) Write

func (b *TestBuffer) Write(f string, args ...any)

func (*TestBuffer) WriteIndent

func (b *TestBuffer) WriteIndent(amount int)

func (*TestBuffer) WriteNewLine

func (b *TestBuffer) WriteNewLine()

func (*TestBuffer) WriteSeparator

func (b *TestBuffer) WriteSeparator()

type TestBufferOption

type TestBufferOption func(options *testBufferOptions)

func WithoutTestClausePrefix

func WithoutTestClausePrefix() TestBufferOption

type TestDialect

type TestDialect struct{}

func NewTestDialect

func NewTestDialect() *TestDialect

func (TestDialect) WriteArg

func (d TestDialect) WriteArg(w litsql.Writer, position int)

func (TestDialect) WriteCheckQuoted

func (d TestDialect) WriteCheckQuoted(w litsql.Writer, s string)

func (TestDialect) WriteQuoted

func (d TestDialect) WriteQuoted(w litsql.Writer, s string)

type TestTag added in v0.4.1

type TestTag interface{}

Jump to

Keyboard shortcuts

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