languagetesting

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockLanguage

type MockLanguage struct {
	mock.Mock
}

MockLanguage is an autogenerated mock type for the Language type

func NewMockLanguage

func NewMockLanguage(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLanguage

NewMockLanguage creates a new instance of MockLanguage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func NewMockLanguageNamed

func NewMockLanguageNamed(t *testing.T, id string) *MockLanguage

NewMockLanguageNamed returns a new named mocked language.

func (*MockLanguage) DefaultFileExtension added in v0.6.0

func (_m *MockLanguage) DefaultFileExtension() string

DefaultFileExtension provides a mock function with no fields

func (*MockLanguage) DefaultTestFileSuffix added in v0.6.0

func (_m *MockLanguage) DefaultTestFileSuffix() string

DefaultTestFileSuffix provides a mock function with no fields

func (*MockLanguage) ExecuteTests added in v0.6.0

func (_m *MockLanguage) ExecuteTests(logger *log.Logger, repositoryPath string) (*language.TestResult, []error, error)

ExecuteTests provides a mock function with given fields: logger, repositoryPath

func (*MockLanguage) Files

func (_m *MockLanguage) Files(logger *log.Logger, repositoryPath string) ([]string, error)

Files provides a mock function with given fields: logger, repositoryPath

func (*MockLanguage) ID

func (_m *MockLanguage) ID() string

ID provides a mock function with no fields

func (*MockLanguage) ImportPath

func (_m *MockLanguage) ImportPath(projectRootPath string, filePath string) string

ImportPath provides a mock function with given fields: projectRootPath, filePath

func (*MockLanguage) Mistakes added in v0.6.0

func (_m *MockLanguage) Mistakes(logger *log.Logger, repositoryPath string) ([]string, error)

Mistakes provides a mock function with given fields: logger, repositoryPath

func (*MockLanguage) Name

func (_m *MockLanguage) Name() string

Name provides a mock function with no fields

func (*MockLanguage) SupportsFix added in v1.0.0

func (_m *MockLanguage) SupportsFix() bool

SupportsFix provides a mock function with no fields

func (*MockLanguage) SupportsTemplate added in v1.0.0

func (_m *MockLanguage) SupportsTemplate() bool

SupportsTemplate provides a mock function with no fields

func (*MockLanguage) TestFilePath

func (_m *MockLanguage) TestFilePath(projectRootPath string, filePath string) string

TestFilePath provides a mock function with given fields: projectRootPath, filePath

func (*MockLanguage) TestFramework

func (_m *MockLanguage) TestFramework() string

TestFramework provides a mock function with no fields

type TestCaseExecuteTests added in v0.6.0

type TestCaseExecuteTests struct {
	Name string

	Language language.Language

	RepositoryPath   string
	RepositoryChange func(t *testing.T, repositoryPath string)

	ExpectedTestResult   *language.TestResult
	ExpectedProblemTexts []string
	ExpectedError        error
	ExpectedErrorText    string
}

TestCaseExecuteTests holds a test case for "test execution" task.

func (*TestCaseExecuteTests) Validate added in v0.6.0

func (tc *TestCaseExecuteTests) Validate(t *testing.T)

Validate validates the object.

type TestCaseMistakes added in v0.6.2

type TestCaseMistakes struct {
	Name string

	Language       language.Language
	RepositoryPath string

	ExpectedMistakes         []string
	ExpectedMistakesContains func(t *testing.T, mistakes []string)
}

TestCaseMistakes holds a test case for "mistake fixing" task.

func (*TestCaseMistakes) Validate added in v0.6.2

func (tc *TestCaseMistakes) Validate(t *testing.T)

Validate validates the object.

Jump to

Keyboard shortcuts

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