Drake
rules_test_utilities.h File Reference
#include <algorithm>
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "drake/automotive/maliput/api/rules/regions.h"
#include "drake/common/unused.h"
Include dependency graph for rules_test_utilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  AssertionResultCollector
 AssertionResultCollector helps with the creation of concise and well-traced testing subroutines when using googletest. More...
 

Namespaces

 drake
 
 drake::maliput
 
 drake::maliput::api
 
 drake::maliput::api::rules
 
 drake::maliput::api::rules::test
 

Macros

#define MALIPUT_ADD_RESULT(collector, result)   collector.AddResult(__FILE__, __LINE__, #result, result)
 Adds AssertionResult result to AssertionResultCollector collector. More...
 
#define MALIPUT_IS_EQUAL(e1, e2)   ::drake::maliput::api::rules::test::IsEqual(#e1, #e2, e1, e2)
 Returns an AssertionResult which is successful if e1 equals e2 according to the IsEqual() predicate-formatter function. More...
 

Functions

inline::testing::AssertionResult IsEqual (const char *a_expression, const char *b_expression, const double &a, const double &b)
 Predicate-formatter which tests equality of double. More...
 
template<class T >
inline::testing::AssertionResult IsEqual (const char *a_expression, const char *b_expression, const TypeSpecificIdentifier< T > &a, const TypeSpecificIdentifier< T > &b)
 Predicate-formatter which tests equality of TypeSpecificIdentifier<T>. More...
 
inline::testing::AssertionResult IsEqual (const char *a_expression, const char *b_expression, const SRange &a, const SRange &b)
 Predicate-formatter which tests equality of SRange. More...
 
inline::testing::AssertionResult IsEqual (const char *a_expression, const char *b_expression, const LaneSRange &a, const LaneSRange &b)
 Predicate-formatter which tests equality of LaneSRange. More...
 
inline::testing::AssertionResult IsEqual (const char *a_expression, const char *b_expression, const std::vector< LaneSRange > &a, const std::vector< LaneSRange > &b)
 Predicate-formatter which tests equality of std::vector<LaneSRange>. More...
 
inline::testing::AssertionResult IsEqual (const char *a_expression, const char *b_expression, const LaneSRoute &a, const LaneSRoute &b)
 Predicate-formatter which tests equality of LaneSRoute. More...
 

Macro Definition Documentation

#define MALIPUT_ADD_RESULT (   collector,
  result 
)    collector.AddResult(__FILE__, __LINE__, #result, result)

Adds AssertionResult result to AssertionResultCollector collector.

The location of the invocation and the literal expression of result will be recorded by the collector.

#define MALIPUT_IS_EQUAL (   e1,
  e2 
)    ::drake::maliput::api::rules::test::IsEqual(#e1, #e2, e1, e2)

Returns an AssertionResult which is successful if e1 equals e2 according to the IsEqual() predicate-formatter function.

The literal expressions for e1 and e2 will be provided to IsEqual().