Ejemplo n.º 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)
}
Ejemplo n.º 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)
}
Ejemplo n.º 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)
}
Ejemplo n.º 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)
}
Ejemplo n.º 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)
}
Ejemplo n.º 6
0
// TestComposeMap_Empty_Nothing
func TestComposeMap_Empty_Nothing(t *testing.T) {
	f := maybe.ComposeMap()
	_m := maybe.Nothing()
	m := f(_m)
	assertNothing(t, m)
}