2017-06-19 15:28:10 +10:00
|
|
|
#include "tap.hpp"
|
|
|
|
|
|
|
|
#include "types/comparator.hpp"
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int, char**)
|
|
|
|
{
|
2018-08-05 14:42:02 +10:00
|
|
|
cruft::TAP::logger tap;
|
2017-06-19 15:28:10 +10:00
|
|
|
|
|
|
|
const auto a = { 1, 2, 3 };
|
|
|
|
const auto b = { 1, 2, 4 };
|
|
|
|
|
|
|
|
tap.expect (
|
2018-08-05 14:42:02 +10:00
|
|
|
cruft::comparator::indexed<decltype(a)> ()(a, b),
|
2017-06-19 15:28:10 +10:00
|
|
|
"compare initializer_list as a coordinate, success"
|
|
|
|
);
|
|
|
|
|
|
|
|
tap.expect (
|
2018-08-05 14:42:02 +10:00
|
|
|
!cruft::comparator::indexed<decltype(a)> ()(b, a),
|
2017-06-19 15:28:10 +10:00
|
|
|
"compare initializer_list as a coordinate, failure"
|
|
|
|
);
|
|
|
|
|
2017-06-29 15:27:16 +10:00
|
|
|
tap.expect (
|
2018-08-05 14:42:02 +10:00
|
|
|
!cruft::comparator::indexed<decltype (a)> ()(a, a),
|
2017-06-29 15:27:16 +10:00
|
|
|
"self compare initializer_list as a coordinate, failure"
|
|
|
|
);
|
|
|
|
|
2017-06-19 15:28:10 +10:00
|
|
|
return tap.status ();
|
|
|
|
}
|