mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-21 16:23:16 +08:00
change: move assertions to builtin
This commit is contained in:
15
builtin/assertion.go
Normal file
15
builtin/assertion.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package builtin
|
||||
|
||||
import "github.com/stretchr/testify/assert"
|
||||
|
||||
var Assertions = map[string]func(t assert.TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool{
|
||||
"equals": assert.EqualValues,
|
||||
"equal": assert.EqualValues, // alias for equals
|
||||
"greater_than": assert.Greater,
|
||||
"less_than": assert.Less,
|
||||
"greater_or_equals": assert.GreaterOrEqual,
|
||||
"less_or_equals": assert.LessOrEqual,
|
||||
"not_equal": assert.NotEqual,
|
||||
"contains": assert.Contains,
|
||||
"regex_match": assert.Regexp,
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package builtin
|
||||
|
||||
import "time"
|
||||
|
||||
var FunctionsMap = map[string]interface{}{
|
||||
var Functions = map[string]interface{}{
|
||||
"sleep": Sleep,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user