mirror of https://github.com/edouarda/brigand.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
2.1 KiB
C++
31 lines
2.1 KiB
C++
|
|
#include <brigand/functions/comparisons.hpp>
|
|
|
|
// integral constant tests
|
|
using value_int_one = brigand::integral_constant<int, 1>;
|
|
using value_int_two = brigand::integral_constant<int, 2>;
|
|
|
|
static_assert(brigand::less<value_int_one, value_int_two>::value == true, "invalid less result");
|
|
static_assert(brigand::less<value_int_one, value_int_one>::value == false, "invalid less result");
|
|
static_assert(brigand::less<value_int_two, value_int_one>::value == false, "invalid less result");
|
|
|
|
static_assert(brigand::less_equal<value_int_one, value_int_two>::value == true, "invalid less_equal result");
|
|
static_assert(brigand::less_equal<value_int_one, value_int_one>::value == true, "invalid less_equal result");
|
|
static_assert(brigand::less_equal<value_int_two, value_int_one>::value == false, "invalid less_equal result");
|
|
|
|
static_assert(brigand::greater<value_int_one, value_int_two>::value == false, "invalid greater result");
|
|
static_assert(brigand::greater<value_int_one, value_int_one>::value == false, "invalid greater result");
|
|
static_assert(brigand::greater<value_int_two, value_int_one>::value == true, "invalid greater result");
|
|
|
|
static_assert(brigand::greater_equal<value_int_one, value_int_two>::value == false, "invalid greater_equal result");
|
|
static_assert(brigand::greater_equal<value_int_one, value_int_one>::value == true, "invalid greater_equal result");
|
|
static_assert(brigand::greater_equal<value_int_two, value_int_one>::value == true, "invalid greater_equal result");
|
|
|
|
static_assert(brigand::equal_to<value_int_one, value_int_two>::value == false, "invalid equal_to result");
|
|
static_assert(brigand::equal_to<value_int_one, value_int_one>::value == true, "invalid equal_to result");
|
|
static_assert(brigand::equal_to<value_int_two, value_int_one>::value == false, "invalid equal_to result");
|
|
|
|
static_assert(brigand::not_equal_to<value_int_one, value_int_two>::value == true, "invalid not_equal_to result");
|
|
static_assert(brigand::not_equal_to<value_int_one, value_int_one>::value == false, "invalid not_equal_to result");
|
|
static_assert(brigand::not_equal_to<value_int_two, value_int_one>::value == true, "invalid not_equal_to result");
|