MCPcopy Create free account
hub / github.com/cogentcore/core / TestValidatorValid

Function TestValidatorValid

core/value_test.go:82–88  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

80}
81
82func TestValidatorValid(t *testing.T) {
83 b := NewBody()
84 tf := Bind(validator("my@string"), NewTextField(b))
85 b.AssertRender(t, "bind/validator-valid", func() {
86 tf.SendChange() // trigger validation
87 })
88}
89
90func TestValidatorInvalid(t *testing.T) {
91 b := NewBody()

Callers

nothing calls this directly

Calls 6

AssertRenderMethod · 0.95
NewBodyFunction · 0.85
BindFunction · 0.85
validatorTypeAlias · 0.85
NewTextFieldFunction · 0.85
SendChangeMethod · 0.80

Tested by

no test coverage detected