Пример #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)
}
Пример #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)
}
Пример #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)
}
Пример #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)
}
Пример #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)
}
Пример #6
0
// TestComposeMap_Empty_Nothing
func TestComposeMap_Empty_Nothing(t *testing.T) {
	f := maybe.ComposeMap()
	_m := maybe.Nothing()
	m := f(_m)
	assertNothing(t, m)
}