Esempio 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)
}
Esempio 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)
}
Esempio 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)
}
Esempio 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)
}
Esempio 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)
}
Esempio 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)
}