testFastContainers.cpp
Go to the documentation of this file.
1 
10 #include <gtsam/inference/Key.h>
11 #include <gtsam/base/FastSet.h>
12 #include <gtsam/base/FastVector.h>
13 
14 #include <boost/assign/std/vector.hpp>
15 #include <boost/assign/std/set.hpp>
16 
18 
19 using namespace boost::assign;
20 using namespace gtsam;
21 
22 /* ************************************************************************* */
23 TEST( testFastContainers, KeySet ) {
24 
25  KeyVector init_vector {2, 3, 4, 5};
26 
27  KeySet actSet(init_vector);
28  KeySet expSet; expSet += 2, 3, 4, 5;
29  EXPECT(actSet == expSet);
30 }
31 
32 /* ************************************************************************* */
33 int main() { TestResult tr; return TestRegistry::runAllTests(tr); }
34 /* ************************************************************************* */
static int runAllTests(TestResult &result)
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition: Key.h:86
#define EXPECT(condition)
Definition: Test.h:151
int main()
A thin wrapper around std::vector that uses a custom allocator.
traits
Definition: chartTesting.h:28
void init_vector(Vector &X, int size)
Definition: init_vector.hh:28
TEST(testFastContainers, KeySet)
A thin wrapper around std::set that uses boost&#39;s fast_pool_allocator.


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:46:35