Browse Source

Added test

enhancement_3
Trevor Irons 7 years ago
parent
commit
a3470f6569
1 changed files with 70 additions and 0 deletions
  1. 70
    0
      LemmaCore/testing/SerializeCheck.h

+ 70
- 0
LemmaCore/testing/SerializeCheck.h View File

@@ -0,0 +1,70 @@
1
+/* This file is part of Lemma, a geophysical modelling and inversion API.
2
+ * More information is available at http://lemmasoftware.org
3
+ */
4
+
5
+/* This Source Code Form is subject to the terms of the Mozilla Public
6
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
7
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
+ */
9
+
10
+/**
11
+ * @file
12
+ * @date      06/16/2016 09:12:46 PM
13
+ * @version   $Id$
14
+ * @author    Trevor Irons (ti)
15
+ * @email     tirons@egi.utah.edu
16
+ * @copyright Copyright (c) 2016, University of Utah
17
+ * @copyright Copyright (c) 2016, Trevor Irons & Lemma Software, LLC
18
+ */
19
+
20
+#include <cxxtest/TestSuite.h>
21
+#include <LemmaCore>
22
+
23
+using namespace Lemma;
24
+
25
+class MyTestSuite : public CxxTest::TestSuite
26
+{
27
+    public:
28
+
29
+    void testASCIIParser( void )
30
+    {
31
+        auto Obj = ASCIIParser::NewSP();
32
+        YAML::Node node = Obj->Serialize();
33
+        auto Obj2 = ASCIIParser::DeSerialize(node);
34
+        TS_ASSERT_EQUALS( Obj->GetName(), Obj2->GetName() );
35
+    }
36
+
37
+// /*
38
+//     void testCubicSplineInterpolator(void)
39
+//     {
40
+//         auto Obj = CubicSplineInterpolator::NewSP();
41
+//         TS_ASSERT_EQUALS( Obj->GetName(), std::string("CubicSplineInterpolator") );
42
+//     }
43
+//
44
+//     void testRectilinearGrid( void )
45
+//     {
46
+//         auto Obj = RectilinearGrid::NewSP();
47
+//         TS_ASSERT_EQUALS( Obj->GetName(), std::string("RectilinearGrid") );
48
+//     }
49
+//
50
+//     void testRectilinearGridReader( void )
51
+//     {
52
+//         auto Obj = RectilinearGridReader::NewSP();
53
+//         TS_ASSERT_EQUALS( Obj->GetName(), std::string("RectilinearGridReader") );
54
+//     }
55
+//
56
+//     void testRectilinearGridVTKExporter( void )
57
+//     {
58
+//         auto Obj = RectilinearGridVTKExporter::NewSP();
59
+//         TS_ASSERT_EQUALS( Obj->GetName(), std::string("RectilinearGridVTKExporter") );
60
+//     }
61
+//
62
+//     void testWindowFilter( void )
63
+//     {
64
+//         auto Obj = WindowFilter::NewSP();
65
+//         TS_ASSERT_EQUALS( Obj->GetName(), std::string("WindowFilter") );
66
+//     }
67
+// */
68
+
69
+};
70
+

Loading…
Cancel
Save