mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-06 21:52:28 +08:00
* feat:(slice add AppendIfAbsent function) * feat:(slice add TernaryOperator function) Co-authored-by: george.zheng <george.zheng@ambergroup.io>
15 lines
285 B
Go
15 lines
285 B
Go
package common
|
|
|
|
import (
|
|
"github.com/duke-git/lancet/v2/internal"
|
|
"testing"
|
|
)
|
|
|
|
func TestTernaryOperator(t *testing.T) {
|
|
assert := internal.NewAssert(t, "TernaryOperator")
|
|
trueValue := "1"
|
|
falseValue := "0"
|
|
|
|
assert.Equal(trueValue, TernaryOperator(true, trueValue, falseValue))
|
|
}
|