Exemple #1
0
// TestComposeMap_Increment_Echo_Square_Something
func TestComposeMap_Increment_Echo_Square_Something(t *testing.T) {
	f := maybe.ComposeMap(square, MapEcho, increment)
	_m := maybe.New(3)
	m := f(_m)
	assertSomethingValue(t, m, 16)
}
Exemple #2
0
// TestComposeMap_Increment_Double_Something
func TestComposeMap_Increment_Double_Something(t *testing.T) {
	f := maybe.ComposeMap(double, increment)
	_m := maybe.New(2)
	m := f(_m)
	assertSomethingValue(t, m, 6)
}
Exemple #3
0
// TestComposeMap_Increment_Something
func TestComposeMap_Increment_Something(t *testing.T) {
	f := maybe.ComposeMap(increment)
	_m := maybe.New(1)
	m := f(_m)
	assertSomethingValue(t, m, 2)
}
Exemple #4
0
// TestComposeMap_Increment_Nothing
func TestComposeMap_Increment_Nothing(t *testing.T) {
	f := maybe.ComposeMap(increment)
	_m := maybe.Nothing()
	m := f(_m)
	assertNothing(t, m)
}
Exemple #5
0
// TestComposeMap_Empty_Something
func TestComposeMap_Empty_Something(t *testing.T) {
	f := maybe.ComposeMap()
	_m := maybe.New(SOMETHING)
	m := f(_m)
	assertSomething(t, m)
}
Exemple #6
0
// TestComposeMap_Empty_Nothing
func TestComposeMap_Empty_Nothing(t *testing.T) {
	f := maybe.ComposeMap()
	_m := maybe.Nothing()
	m := f(_m)
	assertNothing(t, m)
}