GLOFNavData_T.cpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 
26 //==============================================================================
27 //
28 // This software was developed by Applied Research Laboratories at the
29 // University of Texas at Austin, under contract to an agency or agencies
30 // within the U.S. Department of Defense. The U.S. Government retains all
31 // rights to use, duplicate, distribute, disclose, or release this software.
32 //
33 // Pursuant to DoD Directive 523024
34 //
35 // DISTRIBUTION STATEMENT A: This software has been approved for public
36 // release, distribution is unlimited.
37 //
38 //==============================================================================
39 #include "TestUtil.hpp"
40 #include "GLOFNavData.hpp"
41 
42 namespace gnsstk
43 {
44  std::ostream& operator<<(std::ostream& s, GLOFNavSatType e)
45  {
46  s << StringUtils::asString(e);
47  return s;
48  }
49 
50 
51  std::ostream& operator<<(std::ostream& s, SVHealth h)
52  {
53  s << StringUtils::asString(h);
54  return s;
55  }
56 }
57 
58 
60 class TestClass : public gnsstk::GLOFNavData
61 {
62 public:
63  bool getXvt(const gnsstk::CommonTime& t, gnsstk::Xvt& xvt,
64  const gnsstk::ObsID& oid = gnsstk::ObsID()) override
65  { return false; }
66  gnsstk::NavDataPtr clone() const override
67  { return std::make_shared<TestClass>(*this); }
68 };
69 
70 
72 {
73 public:
74  unsigned constructorTest();
75  unsigned validateTest();
76 };
77 
78 
79 unsigned GLOFNavData_T ::
81 {
82  TUDEF("GLOFNavData", "GLOFNavData()");
83  TestClass uut;
85  TUASSERTE(gnsstk::CommonTime, exp, uut.xmit2);
87  uut.satType);
88  TUASSERTE(unsigned, -1, uut.slot);
89  TUASSERTE(bool, false, uut.lhealth);
91  TUASSERTE(gnsstk::CommonTime, exp, uut.beginFit);
92  TUASSERTE(gnsstk::CommonTime, exp, uut.endFit);
93  TURETURN();
94 }
95 
96 
97 unsigned GLOFNavData_T ::
99 {
100  TUDEF("GLOFNavData", "validate()");
101  TestClass uut;
103  TUASSERTE(bool, true, uut.validate());
104  TURETURN();
105 }
106 
107 
108 
109 int main()
110 {
111  GLOFNavData_T testClass;
112  unsigned errorTotal = 0;
113 
114  errorTotal += testClass.constructorTest();
115  errorTotal += testClass.validateTest();
116 
117  std::cout << "Total Failures for " << __FILE__ << ": " << errorTotal
118  << std::endl;
119 
120  return errorTotal;
121 }
gnsstk::NavDataPtr
std::shared_ptr< NavData > NavDataPtr
Factories instantiate these in response to find() requests.
Definition: NavData.hpp:62
gnsstk::GLOFNavSatType::Unknown
@ Unknown
Unknown/Uninitialized value.
TUASSERTE
#define TUASSERTE(TYPE, EXP, GOT)
Definition: TestUtil.hpp:81
TestClass::getXvt
bool getXvt(const gnsstk::CommonTime &t, gnsstk::Xvt &xvt, const gnsstk::ObsID &oid=gnsstk::ObsID()) override
Definition: GLOFNavData_T.cpp:63
GLOFNavData_T::constructorTest
unsigned constructorTest()
Definition: GLOFNavData_T.cpp:80
example5.oid
oid
Definition: example5.py:29
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
TestClass::clone
gnsstk::NavDataPtr clone() const override
Definition: GLOFNavData_T.cpp:66
gnsstk::SVHealth
SVHealth
Identify different types of SV health states.
Definition: SVHealth.hpp:52
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
TestClass::validate
bool validate() const override
Definition: InterSigCorr_T.cpp:64
gnsstk::SVHealth::Unknown
@ Unknown
Health is not known or is uninitialized.
TestUtil.hpp
GLOFNavData_T::validateTest
unsigned validateTest()
Definition: GLOFNavData_T.cpp:98
TURETURN
#define TURETURN()
Definition: TestUtil.hpp:232
gnsstk::ObsID
Definition: ObsID.hpp:82
gnsstk::operator<<
std::ostream & operator<<(std::ostream &s, const ObsEpoch &oe) noexcept
Definition: ObsEpochMap.cpp:54
gnsstk::CommonTime
Definition: CommonTime.hpp:84
GLOFNavData.hpp
gnsstk::Xvt
Definition: Xvt.hpp:60
TUDEF
#define TUDEF(CLASS, METHOD)
Definition: TestUtil.hpp:56
gnsstk::GLOFNavData
Definition: GLOFNavData.hpp:55
TestClass
Make GroupPathCorrector instantiatable for testing.
Definition: GroupPathCorrector_T.cpp:56
main
int main()
Definition: GLOFNavData_T.cpp:109
GLOFNavData_T
Definition: GLOFNavData_T.cpp:71
gnsstk::GLOFNavSatType
GLOFNavSatType
Values for GLONASS FDMA nav message, Word M.
Definition: GLOFNavSatType.hpp:51


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39