Lemma is an Electromagnetics API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SerializeCheck.h 2.4KB

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