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 /* ************************************************************************* */
TestRegistry::runAllTests
static int runAllTests(TestResult &result)
Definition: TestRegistry.cpp:27
main
int main()
Definition: testDiscreteFactor.cpp:41
Testable.h
Concept check for values that can be used in unit tests.
EXPECT
#define EXPECT(condition)
Definition: Test.h:150
TestHarness.h
keys
const KeyVector keys
Definition: testRegularImplicitSchurFactor.cpp:40
gtsam::DiscreteKeys
DiscreteKeys is a set of keys that can be assembled using the & operator.
Definition: DiscreteKey.h:41
TEST
TEST(DisreteKeys, Serialization)
Definition: testDiscreteFactor.cpp:29
DiscreteFactor.h
serializationTestHelpers.h
TestResult
Definition: TestResult.h:26
gtsam
traits
Definition: SFMdata.h:40
gtsam::DiscreteKey
std::pair< Key, size_t > DiscreteKey
Definition: DiscreteKey.h:38
std
Definition: BFloat16.h:88


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:39:49