From 0ce06c26d8d0f6e2a5ac5f03919e3c204e063e93 Mon Sep 17 00:00:00 2001
From: tonynsyde <antonio.leo.polito@gmail.com>
Date: Thu, 3 Dec 2015 13:52:49 +0100
Subject: [PATCH] Fixing tests

---
 src/VTKWriter_unit_tests.hpp |   6 +-
 vtk_graph_test.vtk           | 369 ++++++++++++++++++++++++++++
 vtk_graph_v2_test.vtk        | 458 +++++++++++++++++++++++++++++++++++
 vtk_graph_v3_test.vtk        | 118 +++++++++
 vtk_graph_v4_test.vtk        | 227 +++++++++++++++++
 5 files changed, 1175 insertions(+), 3 deletions(-)
 create mode 100644 vtk_graph_v2_test.vtk
 create mode 100644 vtk_graph_v3_test.vtk
 create mode 100644 vtk_graph_v4_test.vtk

diff --git a/src/VTKWriter_unit_tests.hpp b/src/VTKWriter_unit_tests.hpp
index a9d79f63..c34568a6 100644
--- a/src/VTKWriter_unit_tests.hpp
+++ b/src/VTKWriter_unit_tests.hpp
@@ -200,7 +200,7 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph3D )
 
 	// check that match
 
-	bool test = compare("vtk_graph_v2.vtk","vtk_graph_test.vtk");
+	bool test = compare("vtk_graph_v2.vtk","vtk_graph_v2_test.vtk");
 	BOOST_REQUIRE_EQUAL(true,test);
 }
 
@@ -278,7 +278,7 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph3D_edge )
 
 	// check that match
 
-	bool test = compare("vtk_graph_v4.vtk","vtk_graph_test.vtk");
+	bool test = compare("vtk_graph_v4.vtk","vtk_graph_v4_test.vtk");
 	BOOST_REQUIRE_EQUAL(true,test);
 }
 
@@ -363,7 +363,7 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph2D )
 
 	// check that match
 
-	bool test = compare("vtk_graph_v3.vtk","vtk_graph_test.vtk");
+	bool test = compare("vtk_graph_v3.vtk","vtk_graph_v3_test.vtk");
 	BOOST_REQUIRE_EQUAL(true,test);
 }
 
diff --git a/vtk_graph_test.vtk b/vtk_graph_test.vtk
index 4d9aa58f..10f1f680 100644
--- a/vtk_graph_test.vtk
+++ b/vtk_graph_test.vtk
@@ -138,3 +138,372 @@ LOOKUP_TABLE default
 0
 0
 0
+CELL_DATA 44
+SCALARS x float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS y float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS z float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS prp1 float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS prp2 unsigned_long
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+SCALARS prp3 double
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS prp4 unsigned_char
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+SCALARS prp5 long
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
diff --git a/vtk_graph_v2_test.vtk b/vtk_graph_v2_test.vtk
new file mode 100644
index 00000000..a2a6d3ed
--- /dev/null
+++ b/vtk_graph_v2_test.vtk
@@ -0,0 +1,458 @@
+# vtk DataFile Version 3.0
+Graph
+ASCII
+DATASET POLYDATA
+POINTS 8 float
+0.000000 0.000000 0.000000
+0.000000 0.000000 1.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 1.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 1.000000
+1.000000 1.000000 0.000000
+1.000000 1.000000 1.000000
+VERTICES 8 16
+1 0
+1 1
+1 2
+1 3
+1 4
+1 5
+1 6
+1 7
+LINES 36 108
+2 0 6
+2 0 2
+2 0 3
+2 0 1
+2 0 4
+2 0 5
+2 1 3
+2 1 0
+2 1 5
+2 1 7
+2 2 6
+2 2 0
+2 2 7
+2 2 3
+2 3 2
+2 3 0
+2 3 7
+2 3 1
+2 4 0
+2 4 6
+2 4 7
+2 4 5
+2 5 4
+2 5 0
+2 5 1
+2 5 7
+2 6 4
+2 6 0
+2 6 2
+2 6 7
+2 7 6
+2 7 2
+2 7 4
+2 7 5
+2 7 1
+2 7 3
+POINT_DATA 8
+VECTORS x float
+0.000000 0.000000 0.000000
+0.000000 0.000000 1.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 1.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 1.000000
+1.000000 1.000000 0.000000
+1.000000 1.000000 1.000000
+SCALARS prp1 unsigned_long
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+SCALARS prp2 double
+LOOKUP_TABLE default
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+CELL_DATA 44
+SCALARS x float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS y float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS z float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS prp1 float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS prp2 unsigned_long
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+SCALARS prp3 double
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS prp4 unsigned_char
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+SCALARS prp5 long
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
diff --git a/vtk_graph_v3_test.vtk b/vtk_graph_v3_test.vtk
new file mode 100644
index 00000000..69044dc1
--- /dev/null
+++ b/vtk_graph_v3_test.vtk
@@ -0,0 +1,118 @@
+# vtk DataFile Version 3.0
+Graph
+ASCII
+DATASET POLYDATA
+POINTS 4 float
+0.000000 0.000000 0.000000
+0.000000 1.000000 0.000000
+1.000000 0.000000 0.000000
+1.000000 1.000000 0.000000
+VERTICES 4 8
+1 0
+1 1
+1 2
+1 3
+LINES 4 12
+2 0 1
+2 1 3
+2 2 0
+2 3 2
+POINT_DATA 4
+VECTORS x float
+0.000000 0.000000 0
+0.000000 1.000000 0
+1.000000 0.000000 0
+1.000000 1.000000 0
+SCALARS prp1 unsigned_long
+LOOKUP_TABLE default
+0
+0
+0
+0
+SCALARS prp2 double
+LOOKUP_TABLE default
+0.000000
+0.000000
+0.000000
+0.000000
+CELL_DATA 8
+SCALARS x float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS y float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS z float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS prp1 float
+LOOKUP_TABLE default
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS prp2 unsigned_long
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+SCALARS prp3 double
+LOOKUP_TABLE default
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+SCALARS prp4 unsigned_char
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+SCALARS prp5 long
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
diff --git a/vtk_graph_v4_test.vtk b/vtk_graph_v4_test.vtk
new file mode 100644
index 00000000..7d0a1174
--- /dev/null
+++ b/vtk_graph_v4_test.vtk
@@ -0,0 +1,227 @@
+# vtk DataFile Version 3.0
+Graph
+ASCII
+DATASET POLYDATA
+POINTS 8 float
+0.000000 0.000000 0.000000
+0.000000 0.000000 1.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 1.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 1.000000
+1.000000 1.000000 0.000000
+1.000000 1.000000 1.000000
+VERTICES 8 16
+1 0
+1 1
+1 2
+1 3
+1 4
+1 5
+1 6
+1 7
+LINES 36 108
+2 0 6
+2 0 2
+2 0 3
+2 0 1
+2 0 4
+2 0 5
+2 1 3
+2 1 0
+2 1 5
+2 1 7
+2 2 6
+2 2 0
+2 2 7
+2 2 3
+2 3 2
+2 3 0
+2 3 7
+2 3 1
+2 4 0
+2 4 6
+2 4 7
+2 4 5
+2 5 4
+2 5 0
+2 5 1
+2 5 7
+2 6 4
+2 6 0
+2 6 2
+2 6 7
+2 7 6
+2 7 2
+2 7 4
+2 7 5
+2 7 1
+2 7 3
+POINT_DATA 8
+VECTORS x float
+0.000000 0.000000 0.000000
+0.000000 0.000000 1.000000
+0.000000 1.000000 0.000000
+0.000000 1.000000 1.000000
+1.000000 0.000000 0.000000
+1.000000 0.000000 1.000000
+1.000000 1.000000 0.000000
+1.000000 1.000000 1.000000
+SCALARS prp1 unsigned_long
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+SCALARS prp2 double
+LOOKUP_TABLE default
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+CELL_DATA 44
+VECTORS x float
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+0.000000 0.000000 1.000000
+SCALARS prp1 unsigned_long
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+SCALARS prp2 double
+LOOKUP_TABLE default
+0
+0
+0
+0
+0
+0
+0
+0
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
+0.000000
-- 
GitLab