testDiscreteFactor.cpp
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
12 /*
13  * testDiscreteFactor.cpp
14  *
15  * @date Feb 14, 2011
16  * @author Duy-Nguyen Ta
17  */
18 
20 #include <gtsam/base/Testable.h>
23 
24 using namespace std;
25 using namespace gtsam;
26 using namespace gtsam::serializationTestHelpers;
27 
28 /* ************************************************************************* */
29 TEST(DisreteKeys, Serialization) {
31  keys& DiscreteKey(0, 2);
32  keys& DiscreteKey(1, 3);
33  keys& DiscreteKey(2, 4);
34 
35  EXPECT(equalsObj<DiscreteKeys>(keys));
36  EXPECT(equalsXML<DiscreteKeys>(keys));
37  EXPECT(equalsBinary<DiscreteKeys>(keys));
38 }
39 
40 /* ************************************************************************* */
41 int main() {
42  TestResult tr;
43  return TestRegistry::runAllTests(tr);
44 }
45 /* ************************************************************************* */
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
Definition: BFloat16.h:88
int main()
#define EXPECT(condition)
Definition: Test.h:150
traits
Definition: chartTesting.h:28
std::pair< Key, size_t > DiscreteKey
Definition: DiscreteKey.h:38
const KeyVector keys
TEST(DisreteKeys, Serialization)
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition: DiscreteKey.h:41


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:38:01