package testutils

import "github.com/irfansharif/solver/internal/testutils"

Index

Functions

func Compile

func Compile(tb testing.TB, input string) *ast.Statement

Compile compiles the given statement and returns the corresponding AST node.

Types

type Scanner

type Scanner struct {
	*testing.T
	*bufio.Scanner
	// contains filtered or unexported fields
}

Scanner is a convenience wrapper around a bufio.Scanner that keeps track of the last read line number. It also:

func NewScanner

func NewScanner(t *testing.T, r io.Reader, name string, line int) *Scanner

func (*Scanner) Error

func (s *Scanner) Error(args ...interface{})

Error is thin wrapper around testing.T's interface.

func (*Scanner) Errorf

func (s *Scanner) Errorf(format string, args ...interface{})

Errorf is thin wrapper around testing.T's interface.

func (*Scanner) Fatal

func (s *Scanner) Fatal(args ...interface{})

Fatal is thin wrapper around testing.T's interface.

func (*Scanner) Fatalf

func (s *Scanner) Fatalf(format string, args ...interface{})

Fatalf is thin wrapper around testing.T's interface.

func (*Scanner) Log

func (s *Scanner) Log(args ...interface{})

Log is thin wrapper around testing.T's interface.

func (*Scanner) Logf

func (s *Scanner) Logf(format string, args ...interface{})

Logf is thin wrapper around testing.T's interface.

func (*Scanner) Scan

func (s *Scanner) Scan() bool

Scan is a thin wrapper around the bufio Scanner's interface.

Source Files

compile.go scanner.go

Directories

PathSynopsis
internal/testutils/bazel
internal/testutils/parserPackage parser contains the parsing primitives needed to process the datadriven tests.
internal/testutils/parser/ast
internal/testutils/parser/lexer
internal/testutils/parser/token
Version
v0.0.0-20220713194315-9c33ad307075 (latest)
Published
Jul 13, 2022
Platform
linux/amd64
Imports
8 packages
Last checked
3 weeks ago

Tools for package owners.