libMesh
node_test.C
Go to the documentation of this file.
1 // Ignore unused parameter warnings coming from cppunit headers
2 #include <libmesh/ignore_warnings.h>
3 #include <cppunit/extensions/HelperMacros.h>
4 #include <cppunit/TestCase.h>
5 #include <libmesh/restore_warnings.h>
6 
7 #include <libmesh/node.h>
8 
9 #include "../geom/point_test.h"
10 #include "../base/dof_object_test.h"
11 
12 // THE CPPUNIT_TEST_SUITE_END macro expands to code that involves
13 // std::auto_ptr, which in turn produces -Wdeprecated-declarations
14 // warnings. These can be ignored in GCC as long as we wrap the
15 // offending code in appropriate pragmas. We can't get away with a
16 // single ignore_warnings.h inclusion at the beginning of this file,
17 // since the libmesh headers pull in a restore_warnings.h at some
18 // point. We also don't bother restoring warnings at the end of this
19 // file since it's not a header.
20 #include <libmesh/ignore_warnings.h>
21 
22 using namespace libMesh;
23 
24 class NodeTest : public PointTestBase<Node>, public DofObjectTest<Node> {
25 public:
26  CPPUNIT_TEST_SUITE( NodeTest );
27 
28  POINTTEST
29 
30  DOFOBJECTTEST
31 
32  CPPUNIT_TEST_SUITE_END();
33 
34 private:
35 
37 
38 public:
39 
40  virtual void setUp()
41  {
43 
44  dof_object_instance = new Node(1,1,1);
45  DofObjectTest<Node>::setUp(dof_object_instance);
46  }
47 
48  virtual void tearDown()
49  {
51 
52  delete dof_object_instance;
53  }
54 
55 };
56 
A Node is like a Point, but with more information.
Definition: node.h:52
Node * dof_object_instance
Definition: node_test.C:36
virtual void setUp()
Definition: node_test.C:40
The libMesh namespace provides an interface to certain functionality in the library.
CPPUNIT_TEST_SUITE_REGISTRATION(NodeTest)
virtual void tearDown()
Definition: point_test.h:20
virtual void setUp()
Definition: point_test.h:15
void setUp(DerivedClass *derived_instance)
virtual void tearDown()
Definition: node_test.C:48