1#ifndef CSVWRITER_UNIT_TESTS_HPP_
2#define CSVWRITER_UNIT_TESTS_HPP_
4#include "CSVWriter.hpp"
5#include "Vector/vector_test_util.hpp"
7BOOST_AUTO_TEST_SUITE( csv_writer_test )
10BOOST_AUTO_TEST_CASE( csv_writer_particles )
19 if (v_cl.
rank() != 0) {
return;}
20 std::string c2 = std::string(
"openfpm_io/test_data/csv_out_test.csv");
21 std::string c3 = std::string(
"openfpm_io/test_data/csv_out_unk_test.csv");
26 std::string c2 = std::string(
"test_data/csv_out_test.csv");
27 std::string c3 = std::string(
"test_data/csv_out_unk_test.csv");
33 auto v_prp = allocate_openfpm_prp(16);
38 for (
size_t i = 0 ; i < v_prp.size() ; i++)
49 csv_writer.
write(
"csv_out.csv",v_pos,v_prp);
51 bool test = compare(
"csv_out.csv",c2);
52 BOOST_REQUIRE_EQUAL(
true,test);
57 auto v_prp = allocate_openfpm_aggregate_with_complex(16);
62 for (
size_t i = 0 ; i < v_prp.size() ; i++)
73 csv_writer.
write(
"csv_out_unk.csv",v_pos,v_prp);
78 bool test = compare(
"csv_out_unk.csv",c3);
79 BOOST_REQUIRE_EQUAL(
true,test);
85BOOST_AUTO_TEST_SUITE_END()
bool write(std::string file, v_pos &v, v_prp &prp, size_t offset=0)
It write a CSV file.
This class implement the point shape in an N-dimensional space.
size_t rank()
Get the process unit id.
size_t getProcessUnitID()
Get the process unit id.
Implementation of VCluster class.
Implementation of 1-D std::vector like structure.