File tree Expand file tree Collapse file tree 5 files changed +2212
-1
lines changed
Expand file tree Collapse file tree 5 files changed +2212
-1
lines changed Original file line number Diff line number Diff line change @@ -316,7 +316,10 @@ if(ENABLE_UNIT_TEST)
316316 # add test.cpp for unit test
317317
318318 # remove the main.cpp and add test.cpp
319- set (TEST_SOURCES "../../../tests/unitTests/test.cpp" )
319+ set (TEST_SOURCES
320+ "../../../tests/unitTests/test_material_neohookean.cpp"
321+ )
322+
320323 list (REMOVE_ITEM CSRCS "main.cpp" )
321324 list (APPEND CSRCS ${TEST_SOURCES} )
322325
Original file line number Diff line number Diff line change 1+ #ifndef TEST_COMMON_H
2+ #define TEST_COMMON_H
3+
4+ #include < stdlib.h>
5+ #include < iostream>
6+ #include < random>
7+ #include < chrono>
8+ #include " CepMod.h"
9+ #include " ComMod.h"
10+ #include " gtest/gtest.h"
11+
12+
13+ // --------------------------------------------------------------
14+ // -------------------- Mock svMultiPhysics object -------------------
15+ // --------------------------------------------------------------
16+
17+
18+ class MockCepMod : public CepMod {
19+ public:
20+ MockCepMod () {
21+ // initialize if needed
22+ }
23+ // Mock methods if needed
24+ };
25+ class MockdmnType : public dmnType {
26+ public:
27+ MockdmnType () {
28+ // initialize if needed
29+ }
30+ // MockstModelType mockStM;
31+ // Mock methods if needed
32+ };
33+ class MockmshType : public mshType {
34+ public:
35+ MockmshType () {
36+ // initialize if needed
37+ }
38+ // Mock methods if needed
39+ };
40+ class MockeqType : public eqType {
41+ public:
42+ MockeqType () {
43+ // initialize if needed
44+ }
45+ MockdmnType mockDmn;
46+ // Mock methods if needed
47+ };
48+ class MockComMod : public ComMod {
49+ public:
50+ MockComMod () {
51+ // initialize if needed
52+ nsd = 3 ;
53+ }
54+ MockeqType mockEq;
55+ MockmshType mockMsh;
56+ // Mock methods if needed
57+ };
58+
59+
60+ // --------------------------------------------------------------
61+ // --------------------Base class for testing ------------------------
62+ // --------------------------------------------------------------
63+ class TestBase {
64+ public:
65+ MockComMod com_mod;
66+ MockCepMod cep_mod;
67+ };
68+
69+
70+ #endif
You can’t perform that action at this time.
0 commit comments