zyttesting

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormatTest

type FormatTest struct {
	Name   string
	Layout string
	Value  time.Time
	Want   string
}

func (FormatTest) Run

func (tc FormatTest) Run(t *testing.T, l Locale)

type Locale

type Locale interface {
	ParseInLocation(layout, value string, loc *time.Location) (time.Time, error)
	Format(layout string, t time.Time) string
}

type LocaleDataTest

type LocaleDataTest struct{}

func (LocaleDataTest) Run

func (tc LocaleDataTest) Run(t *testing.T, data zytdata.LocaleData)

type LocaleTest

type LocaleTest struct {
	ParseInLocation []ParseInLocationTest

	Format []FormatTest
}

func (LocaleTest) Run

func (tc LocaleTest) Run(t *testing.T, l Locale)

type ParseInLocationTest

type ParseInLocationTest struct {
	Name    string
	Layout  string
	Value   string
	Loc     *time.Location
	Want    time.Time
	WantErr error
}

func (ParseInLocationTest) Run

func (tc ParseInLocationTest) Run(t *testing.T, l Locale)

Jump to

Keyboard shortcuts

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