Exemplo n.º 1
0
func TestGetBool(t *testing.T) {
	assert.False(t, getBool(nil))
	assert.False(t, getBool(&node.Node{ValueBool: false}))
	assert.True(t, getBool(&node.Node{ValueBool: true}))
	assert.True(t, getBool(system.NewBool(true)))
	assert.False(t, getBool(system.NewBool(false)))
	assert.True(t, getBool(true))
	assert.False(t, getBool(false))
	assert.False(t, getBool("a"))
}
Exemplo n.º 2
0
func (b *Aljb2) GetBool(ctx context.Context) *system.Bool {
	return system.NewBool(bool(*b))
}