Selaa lähdekoodia

AEM survey added back

submodule
T-bone 6 vuotta sitten
vanhempi
commit
a8644b85af

+ 5
- 2
CMakeLists.txt Näytä tiedosto

79
 if (CXXTEST_FOUND)
79
 if (CXXTEST_FOUND)
80
 	# Do nothing
80
 	# Do nothing
81
 else()
81
 else()
82
+	message( STATUS "CxxTest will be built and installed along with Lemma, override if desired in GUI."  )
82
 	ExternalProject_Add(CxxTest
83
 	ExternalProject_Add(CxxTest
83
 		GIT_REPOSITORY "https://github.com/CxxTest/cxxtest.git"
84
 		GIT_REPOSITORY "https://github.com/CxxTest/cxxtest.git"
84
 		GIT_TAG "master"
85
 		GIT_TAG "master"
91
     	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
92
     	CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
92
 			-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
93
 			-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
93
 	)
94
 	)
94
-	set (CXXTEST_INCLUDE_DIR  "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/")
95
-	set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen" )
95
+	# The values "CACHE PATH "" FORCE" makes the GUI show the values of the local CxxTest, but this can cause issues 
96
+	# with users wanting to specify their own path, its not recommended  
97
+	set (CXXTEST_INCLUDE_DIR  "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/") # CACHE  PATH "" FORCE )
98
+	set (CXXTEST_PYTHON_TESTGEN_EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/external/CxxTest/src/CxxTest/bin/cxxtestgen") # CACHE PATH "" FORCE )
96
 	find_package(CxxTest REQUIRED)
99
 	find_package(CxxTest REQUIRED)
97
 endif()
100
 endif()
98
 
101
 

+ 16
- 22
Modules/FDEM1D/include/AEMSurvey.h Näytä tiedosto

12
  * @date      09/24/2013 04:06:42 PM
12
  * @date      09/24/2013 04:06:42 PM
13
  * @version   $Id$
13
  * @version   $Id$
14
  * @author    Trevor Irons (ti)
14
  * @author    Trevor Irons (ti)
15
- * @email     Trevor.Irons@xri-geo.com
15
+ * @email     Trevor.Irons@lemmasoftware.org
16
  * @copyright Copyright (c) 2013, XRI Geophysics, LLC
16
  * @copyright Copyright (c) 2013, XRI Geophysics, LLC
17
- * @copyright Copyright (c) 2013, Trevor Irons
17
+ * @copyright Copyright (c) 2013,2018 Trevor Irons
18
  */
18
  */
19
 
19
 
20
 #ifndef  AEMSURVEY_INC
20
 #ifndef  AEMSURVEY_INC
48
      * @copybrief LemmaObject::New()
48
      * @copybrief LemmaObject::New()
49
      * @copydetails LemmaObject::New()
49
      * @copydetails LemmaObject::New()
50
      */
50
      */
51
-    static AEMSurvey* New();
51
+    static std::shared_ptr<AEMSurvey> NewSP();
52
 
52
 
53
-    /**
54
-     *  @copybrief   LemmaObject::Delete()
55
-     *  @copydetails LemmaObject::Delete()
56
-     */
57
-    void Delete();
53
+    /** Default protected constructor, use New */
54
+    AEMSurvey (const ctor_key&);
55
+
56
+    /** Default protected destructor, use Delete */
57
+    ~AEMSurvey ();
58
 
58
 
59
     // ====================  OPERATORS     =======================
59
     // ====================  OPERATORS     =======================
60
 
60
 
66
      *  general loops int the new future.
66
      *  general loops int the new future.
67
      *  @param[in] isource is the source fiducial to return
67
      *  @param[in] isource is the source fiducial to return
68
      */
68
      */
69
-    DipoleSource* GetSource(const int& isource);
69
+    std::shared_ptr<DipoleSource> GetSource(const int& isource);
70
 
70
 
71
     /** @return the total number of sources
71
     /** @return the total number of sources
72
      */
72
      */
79
 
79
 
80
     // ====================  INQUIRY       =======================
80
     // ====================  INQUIRY       =======================
81
 
81
 
82
+    /** Returns the name of the underlying class, similiar to Python's type */
83
+    virtual std::string GetName() const {
84
+        return this->CName;
85
+    }
86
+
82
     protected:
87
     protected:
83
 
88
 
84
     // ====================  LIFECYCLE     =======================
89
     // ====================  LIFECYCLE     =======================
85
 
90
 
86
-    /** Default protected constructor, use New */
87
-    AEMSurvey (const std::string& name);
88
-
89
-    /** Default protected destructor, use Delete */
90
-    ~AEMSurvey ();
91
-
92
-    /**
93
-     *  @copybrief   LemmaObject::Release()
94
-     *  @copydetails LemmaObject::Release()
95
-     */
96
-    void Release();
97
-
98
     private:
91
     private:
99
 
92
 
100
     // ====================  DATA MEMBERS  =========================
93
     // ====================  DATA MEMBERS  =========================
101
 
94
 
102
-    std::vector<DipoleSource*>  Sources;
95
+    std::vector< std::shared_ptr<DipoleSource> >  Sources;
103
 
96
 
104
     VectorXr Freqs;
97
     VectorXr Freqs;
105
 
98
 
99
+    static constexpr auto CName = "AEMSurvey";
106
 
100
 
107
 }; // -----  end of class  AEMSurvey  -----
101
 }; // -----  end of class  AEMSurvey  -----
108
 
102
 

+ 18
- 24
Modules/FDEM1D/include/AEMSurveyReader.h Näytä tiedosto

12
  * @date      09/24/2013 04:29:27 PM
12
  * @date      09/24/2013 04:29:27 PM
13
  * @version   $Id$
13
  * @version   $Id$
14
  * @author    Trevor Irons (ti)
14
  * @author    Trevor Irons (ti)
15
- * @email     Trevor.Irons@xri-geo.com
15
+ * @email     Trevor.Irons@lemmasoftware.org
16
  * @copyright Copyright (c) 2013, XRI Geophysics, LLC
16
  * @copyright Copyright (c) 2013, XRI Geophysics, LLC
17
  * @copyright Copyright (c) 2013, Trevor Irons
17
  * @copyright Copyright (c) 2013, Trevor Irons
18
  */
18
  */
39
 
39
 
40
         // ====================  LIFECYCLE     =======================
40
         // ====================  LIFECYCLE     =======================
41
 
41
 
42
-        /*c
43
-         * @copybrief LemmaObject::New()
44
-         * @copydetails LemmaObject::New()
45
-         */
46
-        static AEMSurveyReader* New();
47
-
48
         /**
42
         /**
49
-         *  @copybrief   LemmaObject::Delete()
50
-         *  @copydetails LemmaObject::Delete()
43
+         * @copybrief LemmaObject::NewSP()
44
+         * @copydetails LemmaObject::NewSP()
51
          */
45
          */
52
-        void Delete();
46
+        static std::shared_ptr<AEMSurveyReader> NewSP();
47
+
48
+        /** Default protected constructor, use New */
49
+        AEMSurveyReader (const ctor_key&);
50
+
51
+        /** Default protected destructor, use Delete */
52
+        ~AEMSurveyReader ();
53
 
53
 
54
         // ====================  OPERATORS     =======================
54
         // ====================  OPERATORS     =======================
55
 
55
 
103
         /**
103
         /**
104
          * @return the AEMSurvey based on the file read
104
          * @return the AEMSurvey based on the file read
105
          */
105
          */
106
-        AEMSurvey* GetSurvey();
106
+        std::shared_ptr<AEMSurvey> GetSurvey();
107
 
107
 
108
         // ====================  INQUIRY       =======================
108
         // ====================  INQUIRY       =======================
109
+        /** Returns the name of the underlying class, similiar to Python's type */
110
+        virtual std::string GetName() const {
111
+            return this->CName;
112
+        }
109
 
113
 
110
         protected:
114
         protected:
111
 
115
 
112
         // ====================  LIFECYCLE     =======================
116
         // ====================  LIFECYCLE     =======================
113
 
117
 
114
-        /** Default protected constructor, use New */
115
-        AEMSurveyReader (const std::string& name);
116
-
117
-        /** Default protected destructor, use Delete */
118
-        ~AEMSurveyReader ();
119
-
120
-        /**
121
-         *  @copybrief   LemmaObject::Release()
122
-         *  @copydetails LemmaObject::Release()
123
-         */
124
-        void Release();
125
-
126
         private:
118
         private:
127
 
119
 
128
         // ====================  DATA MEMBERS  =========================
120
         // ====================  DATA MEMBERS  =========================
129
 
121
 
130
-        AEMSurvey*  Survey;
122
+        std::shared_ptr<AEMSurvey>  Survey;
123
+
124
+        static constexpr auto CName = "AEMSurveyReader";
131
 
125
 
132
     }; // -----  end of class  AEMSurveyReader  -----
126
     }; // -----  end of class  AEMSurveyReader  -----
133
 
127
 

+ 2
- 1
Modules/FDEM1D/include/FDEM1D Näytä tiedosto

10
 
10
 
11
 #include "EMEarth1D.h"
11
 #include "EMEarth1D.h"
12
 
12
 
13
-//#include "AEMSurvey.h"
13
+#include "AEMSurvey.h"
14
+#include "AEMSurveyReader.h"
14
 
15
 
15
 // internal
16
 // internal
16
 //#include "KernelEM1DManager.h"
17
 //#include "KernelEM1DManager.h"

+ 8
- 31
Modules/FDEM1D/src/AEMSurvey.cpp Näytä tiedosto

12
  * @date      09/24/2013 04:09:04 PM
12
  * @date      09/24/2013 04:09:04 PM
13
  * @version   $Id$
13
  * @version   $Id$
14
  * @author    Trevor Irons (ti)
14
  * @author    Trevor Irons (ti)
15
- * @email     Trevor.Irons@xri-geo.com
15
+ * @email     Trevor.Irons@lemmasoftware.org
16
  * @copyright Copyright (c) 2013, XRI Geophysics, LLC
16
  * @copyright Copyright (c) 2013, XRI Geophysics, LLC
17
  * @copyright Copyright (c) 2013, Trevor Irons
17
  * @copyright Copyright (c) 2013, Trevor Irons
18
+ * @copyright Copyright (c) 2018, Trevor Irons
18
  */
19
  */
19
 
20
 
20
 #include "AEMSurvey.h"
21
 #include "AEMSurvey.h"
24
 // ====================  FRIEND METHODS  =====================
25
 // ====================  FRIEND METHODS  =====================
25
 
26
 
26
 std::ostream &operator<<(std::ostream &stream, const AEMSurvey &ob) {
27
 std::ostream &operator<<(std::ostream &stream, const AEMSurvey &ob) {
27
-
28
-    stream << *(LemmaObject*)(&ob);
29
-
28
+    stream << ob.Serialize() << "\n";
30
     return stream;
29
     return stream;
31
 }
30
 }
32
 
31
 
37
 //      Method:  AEMSurvey
36
 //      Method:  AEMSurvey
38
 // Description:  constructor (protected)
37
 // Description:  constructor (protected)
39
 //--------------------------------------------------------------------------------------
38
 //--------------------------------------------------------------------------------------
40
-AEMSurvey::AEMSurvey (const std::string& name) : LemmaObject(name) {
39
+AEMSurvey::AEMSurvey (const ctor_key& key) : LemmaObject(key) {
41
 
40
 
42
 }  // -----  end of method AEMSurvey::AEMSurvey  (constructor)  -----
41
 }  // -----  end of method AEMSurvey::AEMSurvey  (constructor)  -----
43
 
42
 
44
 
43
 
45
 //--------------------------------------------------------------------------------------
44
 //--------------------------------------------------------------------------------------
46
 //       Class:  AEMSurvey
45
 //       Class:  AEMSurvey
47
-//      Method:  New()
46
+//      Method:  NewSP()
48
 // Description:  public constructor
47
 // Description:  public constructor
49
 //--------------------------------------------------------------------------------------
48
 //--------------------------------------------------------------------------------------
50
-AEMSurvey* AEMSurvey::New() {
51
-    AEMSurvey*  Obj = new AEMSurvey("AEMSurvey");
52
-    Obj->AttachTo(Obj);
53
-    return Obj;
49
+std::shared_ptr<AEMSurvey> AEMSurvey::NewSP() {
50
+    return std::make_shared<AEMSurvey>(ctor_key());
54
 }
51
 }
55
 
52
 
56
 //--------------------------------------------------------------------------------------
53
 //--------------------------------------------------------------------------------------
60
 //--------------------------------------------------------------------------------------
57
 //--------------------------------------------------------------------------------------
61
 AEMSurvey::~AEMSurvey () {
58
 AEMSurvey::~AEMSurvey () {
62
 
59
 
63
-    for (unsigned int isc=0; isc<Sources.size(); ++isc) Sources[isc]->Delete();
64
-
65
 }  // -----  end of method AEMSurvey::~AEMSurvey  (destructor)  -----
60
 }  // -----  end of method AEMSurvey::~AEMSurvey  (destructor)  -----
66
 
61
 
67
 //--------------------------------------------------------------------------------------
62
 //--------------------------------------------------------------------------------------
68
 //       Class:  AEMSurvey
63
 //       Class:  AEMSurvey
69
-//      Method:  Delete
70
-// Description:  public destructor
71
-//--------------------------------------------------------------------------------------
72
-void AEMSurvey::Delete() {
73
-    this->DetachFrom(this);
74
-}
75
-
76
-//--------------------------------------------------------------------------------------
77
-//       Class:  AEMSurvey
78
-//      Method:  Release
79
-// Description:  destructor (protected)
80
-//--------------------------------------------------------------------------------------
81
-void AEMSurvey::Release() {
82
-    delete this;
83
-}
84
-
85
-//--------------------------------------------------------------------------------------
86
-//       Class:  AEMSurvey
87
 //      Method:  GetSource
64
 //      Method:  GetSource
88
 //--------------------------------------------------------------------------------------
65
 //--------------------------------------------------------------------------------------
89
-DipoleSource* AEMSurvey::GetSource ( const int& isource ) {
66
+std::shared_ptr<DipoleSource> AEMSurvey::GetSource ( const int& isource ) {
90
     return Sources[isource] ;
67
     return Sources[isource] ;
91
 }		// -----  end of method AEMSurvey::GetSource  -----
68
 }		// -----  end of method AEMSurvey::GetSource  -----
92
 
69
 

+ 8
- 37
Modules/FDEM1D/src/AEMSurveyReader.cpp Näytä tiedosto

24
     // ====================  FRIEND METHODS  =====================
24
     // ====================  FRIEND METHODS  =====================
25
 
25
 
26
     std::ostream &operator<<(std::ostream &stream, const AEMSurveyReader &ob) {
26
     std::ostream &operator<<(std::ostream &stream, const AEMSurveyReader &ob) {
27
-
28
-        stream << *(LemmaObject*)(&ob);
29
-
27
+        stream << ob.Serialize() << "\n";
30
         return stream;
28
         return stream;
31
     }
29
     }
32
 
30
 
37
     //      Method:  AEMSurveyReader
35
     //      Method:  AEMSurveyReader
38
     // Description:  constructor (protected)
36
     // Description:  constructor (protected)
39
     //--------------------------------------------------------------------------------------
37
     //--------------------------------------------------------------------------------------
40
-    AEMSurveyReader::AEMSurveyReader (const std::string& name) :
41
-        LemmaObject(name), Survey(NULL) {
38
+    AEMSurveyReader::AEMSurveyReader (const ctor_key& key) : LemmaObject(key), Survey(nullptr) {
42
 
39
 
43
     }  // -----  end of method AEMSurveyReader::AEMSurveyReader  (constructor)  -----
40
     }  // -----  end of method AEMSurveyReader::AEMSurveyReader  (constructor)  -----
44
 
41
 
48
     //      Method:  New()
45
     //      Method:  New()
49
     // Description:  public constructor
46
     // Description:  public constructor
50
     //--------------------------------------------------------------------------------------
47
     //--------------------------------------------------------------------------------------
51
-    AEMSurveyReader* AEMSurveyReader::New() {
52
-        AEMSurveyReader*  Obj = new AEMSurveyReader("AEMSurveyReader");
53
-        Obj->AttachTo(Obj);
54
-        return Obj;
48
+    std::shared_ptr<AEMSurveyReader> AEMSurveyReader::NewSP() {
49
+        return std::make_shared<AEMSurveyReader>(ctor_key());
55
     }
50
     }
56
 
51
 
57
     //--------------------------------------------------------------------------------------
52
     //--------------------------------------------------------------------------------------
60
     // Description:  destructor (protected)
55
     // Description:  destructor (protected)
61
     //--------------------------------------------------------------------------------------
56
     //--------------------------------------------------------------------------------------
62
     AEMSurveyReader::~AEMSurveyReader () {
57
     AEMSurveyReader::~AEMSurveyReader () {
63
-        if (Survey) Survey->Delete();
64
     }  // -----  end of method AEMSurveyReader::~AEMSurveyReader  (destructor)  -----
58
     }  // -----  end of method AEMSurveyReader::~AEMSurveyReader  (destructor)  -----
65
 
59
 
66
     //--------------------------------------------------------------------------------------
60
     //--------------------------------------------------------------------------------------
67
     //       Class:  AEMSurveyReader
61
     //       Class:  AEMSurveyReader
68
-    //      Method:  Delete
69
-    // Description:  public destructor
70
-    //--------------------------------------------------------------------------------------
71
-    void AEMSurveyReader::Delete() {
72
-        this->DetachFrom(this);
73
-    }
74
-
75
-    //--------------------------------------------------------------------------------------
76
-    //       Class:  AEMSurveyReader
77
-    //      Method:  Release
78
-    // Description:  destructor (protected)
79
-    //--------------------------------------------------------------------------------------
80
-    void AEMSurveyReader::Release() {
81
-        delete this;
82
-    }
83
-
84
-
85
-    //--------------------------------------------------------------------------------------
86
-    //       Class:  AEMSurveyReader
87
     //      Method:  GetSurvey
62
     //      Method:  GetSurvey
88
     //--------------------------------------------------------------------------------------
63
     //--------------------------------------------------------------------------------------
89
-    AEMSurvey* AEMSurveyReader::GetSurvey (  ) {
64
+    std::shared_ptr<AEMSurvey> AEMSurveyReader::GetSurvey (  ) {
90
         return Survey;
65
         return Survey;
91
     }		// -----  end of method AEMSurveyReader::GetSurvey  -----
66
     }		// -----  end of method AEMSurveyReader::GetSurvey  -----
92
 
67
 
97
     //--------------------------------------------------------------------------------------
72
     //--------------------------------------------------------------------------------------
98
     void AEMSurveyReader::ReadASCIIAEMFile (  const std::string& fname ) {
73
     void AEMSurveyReader::ReadASCIIAEMFile (  const std::string& fname ) {
99
 
74
 
100
-        if (Survey) Survey->Delete();
101
-        Survey = AEMSurvey::New();
102
-        ASCIIParser* Parser = ASCIIParser::New();
75
+        Survey = AEMSurvey::NewSP();
76
+        auto Parser = ASCIIParser::NewSP();
103
         Parser->SetCommentString("//");
77
         Parser->SetCommentString("//");
104
         Parser->Open(fname);
78
         Parser->Open(fname);
105
 
79
 
136
             //std::vector<int> ivals = Parser->ReadInts(1);   // number of frequencies
110
             //std::vector<int> ivals = Parser->ReadInts(1);   // number of frequencies
137
             int nf = Parser->ReadInts(1)[0];   // number of frequencies
111
             int nf = Parser->ReadInts(1)[0];   // number of frequencies
138
             for (int isc=0; isc<nf; ++isc) {
112
             for (int isc=0; isc<nf; ++isc) {
139
-                Survey->Sources.push_back(DipoleSource::New());
113
+                Survey->Sources.push_back(DipoleSource::NewSP());
140
                 int cnt = Survey->Sources.size() - 1; //
114
                 int cnt = Survey->Sources.size() - 1; //
141
                 // and now set it
115
                 // and now set it
142
                 Survey->Sources[cnt]->SetNumberOfFrequencies(1);
116
                 Survey->Sources[cnt]->SetNumberOfFrequencies(1);
159
             }
133
             }
160
             Parser->JumpToLocation(bp);
134
             Parser->JumpToLocation(bp);
161
         }
135
         }
162
-
163
-        Parser->Delete();
164
-
165
         return ;
136
         return ;
166
     }		// -----  end of method AEMSurveyReader::ReadASCIIAEMFile  -----
137
     }		// -----  end of method AEMSurveyReader::ReadASCIIAEMFile  -----
167
 
138
 

+ 4
- 4
Modules/FDEM1D/testing/CMakeLists.txt Näytä tiedosto

1
 include_directories(${CXXTEST_INCLUDE_DIR})
1
 include_directories(${CXXTEST_INCLUDE_DIR})
2
 
2
 
3
-CXXTEST_ADD_TEST(unittestFEM1D_GetNameCheck GetNameCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/GetNameCheck.h)
4
-target_link_libraries(unittestFEM1D_GetNameCheck "lemmacore" "fdem1d" "yaml-cpp")
3
+CXXTEST_ADD_TEST(unittest_FEM1D_GetNameCheck GetNameCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/GetNameCheck.h)
4
+target_link_libraries(unittest_FEM1D_GetNameCheck "lemmacore" "fdem1d" "yaml-cpp")
5
 
5
 
6
-CXXTEST_ADD_TEST(unittestFEM1D_SerializeCheck SerializeCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/SerializeCheck.h)
7
-target_link_libraries(unittestFEM1D_SerializeCheck "lemmacore" "fdem1d" "yaml-cpp")
6
+CXXTEST_ADD_TEST(unittest_FEM1D_SerializeCheck SerializeCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/SerializeCheck.h)
7
+target_link_libraries(unittest_FEM1D_SerializeCheck "lemmacore" "fdem1d" "yaml-cpp")

+ 33
- 3
Modules/FDEM1D/testing/GetNameCheck.h Näytä tiedosto

33
         TS_ASSERT_EQUALS( Obj->GetName(), std::string("LayeredEarthEM") );
33
         TS_ASSERT_EQUALS( Obj->GetName(), std::string("LayeredEarthEM") );
34
     }
34
     }
35
 
35
 
36
+    void testLayeredEarthEMReader( void )
37
+    {
38
+        auto Obj = LayeredEarthEMReader::NewSP();
39
+        TS_ASSERT_EQUALS( Obj->GetName(), std::string("LayeredEarthEMReader") );
40
+    }
41
+
36
     void testFieldPoints( void )
42
     void testFieldPoints( void )
37
     {
43
     {
38
         auto Obj = FieldPoints::NewSP();
44
         auto Obj = FieldPoints::NewSP();
39
         TS_ASSERT_EQUALS( Obj->GetName(), std::string("FieldPoints") );
45
         TS_ASSERT_EQUALS( Obj->GetName(), std::string("FieldPoints") );
40
     }
46
     }
41
 
47
 
48
+    void testWireAntenna( void )
49
+    {
50
+        auto Obj = WireAntenna::NewSP();
51
+        TS_ASSERT_EQUALS( Obj->GetName(), std::string("WireAntenna") );
52
+    }
53
+
54
+    void testPolygonalWireAntenna( void )
55
+    {
56
+        auto Obj = PolygonalWireAntenna::NewSP();
57
+        TS_ASSERT_EQUALS( Obj->GetName(), std::string("PolygonalWireAntenna") );
58
+    }
59
+
42
     void testDipoleSource( void )
60
     void testDipoleSource( void )
43
     {
61
     {
44
         auto Obj = DipoleSource::NewSP();
62
         auto Obj = DipoleSource::NewSP();
45
         TS_ASSERT_EQUALS( Obj->GetName(), std::string("DipoleSource") );
63
         TS_ASSERT_EQUALS( Obj->GetName(), std::string("DipoleSource") );
46
     }
64
     }
47
 
65
 
48
-    void testWireAntenna( void )
66
+    void testEMEarth1D( void )
49
     {
67
     {
50
-        auto Obj = WireAntenna::NewSP();
51
-        TS_ASSERT_EQUALS( Obj->GetName(), std::string("WireAntenna") );
68
+        auto Obj = EMEarth1D::NewSP();
69
+        TS_ASSERT_EQUALS( Obj->GetName(), std::string("EMEarth1D") );
70
+    }
71
+
72
+    void testAEMSurvey( void )
73
+    {
74
+        auto Obj = AEMSurvey::NewSP();
75
+        TS_ASSERT_EQUALS( Obj->GetName(), std::string("AEMSurvey") );
76
+    }
77
+
78
+    void testAEMSurveyReader( void )
79
+    {
80
+        auto Obj = AEMSurveyReader::NewSP();
81
+        TS_ASSERT_EQUALS( Obj->GetName(), std::string("AEMSurveyReader") );
52
     }
82
     }
53
 
83
 
54
 //     void testKernelEM1DManager( void )
84
 //     void testKernelEM1DManager( void )

+ 6
- 6
Modules/LemmaCore/testing/CMakeLists.txt Näytä tiedosto

4
 #add_test( testLemmaCoreTwo testTwo )
4
 #add_test( testLemmaCoreTwo testTwo )
5
     	
5
     	
6
 include_directories(${CXXTEST_INCLUDE_DIR})
6
 include_directories(${CXXTEST_INCLUDE_DIR})
7
-CXXTEST_ADD_TEST(unittest_GetNameCheck GetNameCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/GetNameCheck.h)
8
-target_link_libraries(unittest_GetNameCheck "lemmacore")
7
+CXXTEST_ADD_TEST(unittest_LemmaCore_GetNameCheck GetNameCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/GetNameCheck.h)
8
+target_link_libraries(unittest_LemmaCore_GetNameCheck "lemmacore")
9
 
9
 
10
-CXXTEST_ADD_TEST(unittest_SerializeCheck SerializeCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/SerializeCheck.h)
11
-target_link_libraries(unittest_SerializeCheck "lemmacore")
10
+CXXTEST_ADD_TEST(unittest_LemmaCore_SerializeCheck SerializeCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/SerializeCheck.h)
11
+target_link_libraries(unittest_LemmaCore_SerializeCheck "lemmacore")
12
 
12
 
13
-CXXTEST_ADD_TEST(unittest_CopyDisableCheck CopyDisableCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/CopyDisableCheck.h)
14
-target_link_libraries(unittest_CopyDisableCheck "lemmacore")
13
+CXXTEST_ADD_TEST(unittest_LemmaCore_CopyDisableCheck CopyDisableCheck.cc ${CMAKE_CURRENT_SOURCE_DIR}/CopyDisableCheck.h)
14
+target_link_libraries(unittest_LemmaCore_CopyDisableCheck "lemmacore")
15
  
15
  

Loading…
Peruuta
Tallenna