1 #ifndef CSVWRITER_UNIT_TESTS_HPP_
2 #define CSVWRITER_UNIT_TESTS_HPP_
4 #include "CSVWriter.hpp"
5 #include "Vector/vector_test_util.hpp"
7 BOOST_AUTO_TEST_SUITE( csv_writer_test )
10 BOOST_AUTO_TEST_CASE( csv_writer_particles )
17 std::string c2 = std::string(
"test_data/csv_out_test.csv");
18 std::string c3 = std::string(
"test_data/csv_out_unk_test.csv");
22 auto v_prp = allocate_openfpm_prp(16);
27 for (
size_t i = 0 ; i < v_prp.size() ; i++)
38 csv_writer.
write(
"csv_out.csv",v_pos,v_prp);
40 bool test = compare(
"csv_out.csv",c2);
41 BOOST_REQUIRE_EQUAL(
true,test);
46 auto v_prp = allocate_openfpm_aggregate_with_complex(16);
51 for (
size_t i = 0 ; i < v_prp.size() ; i++)
62 csv_writer.
write(
"csv_out_unk.csv",v_pos,v_prp);
67 bool test = compare(
"csv_out_unk.csv",c3);
68 BOOST_REQUIRE_EQUAL(
true,test);
74 BOOST_AUTO_TEST_SUITE_END()
bool write(std::string file, v_pos &v, v_prp &prp, size_t offset=0)
It write a CSV file.
size_t getProcessUnitID()
Get the process unit id.
Implementation of VCluster class.
Implementation of 1-D std::vector like structure.