2017-06-13 16:59:24 +10:00
|
|
|
#include "tap.hpp"
|
|
|
|
|
|
|
|
#include "./iterator.hpp"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <array>
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
int
|
|
|
|
main (int, char**)
|
|
|
|
{
|
|
|
|
util::TAP::logger tap;
|
|
|
|
|
|
|
|
std::vector<int> v_int { 1, 2, 3 };
|
|
|
|
std::array<float,3> a_float { 1.1f, 2.2f, 3.3f };
|
2017-09-15 15:21:25 +10:00
|
|
|
char c_char[] = { 'a', 'b', 'c' };
|
2017-06-13 16:59:24 +10:00
|
|
|
|
|
|
|
bool success = true;
|
2017-09-15 15:21:25 +10:00
|
|
|
for (auto [i, v, a, c]: util::izip (v_int, a_float, c_char)) {
|
|
|
|
success = success &&
|
|
|
|
v_int[i] == v &&
|
|
|
|
util::exactly_equal (a_float[i], a) &&
|
|
|
|
c_char[i] == c;
|
2017-06-13 16:59:24 +10:00
|
|
|
}
|
|
|
|
|
2017-09-15 15:21:25 +10:00
|
|
|
tap.expect (success, "izip containers of int, float, and char and an initialiser_list");
|
2017-06-13 16:59:24 +10:00
|
|
|
return tap.status ();
|
|
|
|
}
|