mirror of
https://github.com/IBM/fp-go.git
synced 2025-08-10 22:31:32 +02:00
fix: some more tests
Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
@@ -176,3 +176,25 @@ func TestFromArrayMap(t *testing.T) {
|
||||
"C": "C",
|
||||
}, res2)
|
||||
}
|
||||
|
||||
func TestEmpty(t *testing.T) {
|
||||
nonEmpty := map[string]string{
|
||||
"a": "A",
|
||||
"b": "B",
|
||||
}
|
||||
empty := Empty[string, string]()
|
||||
|
||||
assert.True(t, IsEmpty(empty))
|
||||
assert.False(t, IsEmpty(nonEmpty))
|
||||
assert.False(t, IsNonEmpty(empty))
|
||||
assert.True(t, IsNonEmpty(nonEmpty))
|
||||
}
|
||||
|
||||
func TestHas(t *testing.T) {
|
||||
nonEmpty := map[string]string{
|
||||
"a": "A",
|
||||
"b": "B",
|
||||
}
|
||||
assert.True(t, Has("a", nonEmpty))
|
||||
assert.False(t, Has("c", nonEmpty))
|
||||
}
|
||||
|
Reference in New Issue
Block a user