testutil

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const StandardTestExpr = "sqrt(25) * (3.14 * x + 2.5) - abs(-5) + pow(2, 3)"

StandardTestExpr 标准测试表达式

Variables

View Source
var StandardTestResult = decimal.NewFromFloat(94.0)

StandardTestResult 标准测试结果

View Source
var StandardTestVars = map[string]decimal.Decimal{
	"x": decimal.NewFromFloat(5.0),
}

StandardTestVars 标准测试变量

Functions

func CreateTestCases

func CreateTestCases() []struct {
	Name       string
	Expression string
	Vars       map[string]decimal.Decimal
	Want       decimal.Decimal
	WantErr    bool
}

CreateTestCases 创建基本测试用例

Types

This section is empty.

Jump to

Keyboard shortcuts

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