26 #include <mln/fun/v2i/index_of_value.hh>
27 #include <mln/value/int_u8.hh>
28 #include <mln/value/int_s8.hh>
36 fun::v2i::index_of_value<bool> f;
37 mln_assertion(f(
false) == 0);
38 mln_assertion(f(
true) == 1);
41 fun::v2i::index_of_value< value::int_u8 > f;
42 mln_assertion(f( 0) == 0);
43 mln_assertion(f(255) == 255);
46 fun::v2i::index_of_value< value::int_s8 > f;
47 mln_assertion(f(-127) == 0);
48 mln_assertion(f(+127) == 254);