2012-05-11 20:15:54 +02:00
|
|
|
/*
|
|
|
|
* Created by Phil on 11/5/2012.
|
|
|
|
* Copyright 2012 Two Blue Cubes Ltd. All rights reserved.
|
|
|
|
*
|
|
|
|
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
*/
|
|
|
|
#ifndef TWOBLUECUBES_CATCH_EXPRESSION_BUILDER_HPP_INCLUDED
|
|
|
|
#define TWOBLUECUBES_CATCH_EXPRESSION_BUILDER_HPP_INCLUDED
|
|
|
|
|
|
|
|
#include "catch_expression.hpp"
|
2012-10-16 09:31:05 +02:00
|
|
|
#include "catch_assertionresult_builder.h"
|
2012-05-11 20:15:54 +02:00
|
|
|
|
2012-05-11 20:22:28 +02:00
|
|
|
namespace Catch {
|
2012-05-11 20:15:54 +02:00
|
|
|
|
2012-05-11 20:22:28 +02:00
|
|
|
class ExpressionBuilder {
|
2012-05-11 20:15:54 +02:00
|
|
|
public:
|
|
|
|
|
|
|
|
template<typename T>
|
2012-05-11 20:22:28 +02:00
|
|
|
Expression<const T&> operator->* ( const T & operand ) {
|
2012-10-19 09:01:05 +02:00
|
|
|
return Expression<const T&>( operand );
|
2012-05-11 20:15:54 +02:00
|
|
|
}
|
|
|
|
|
2012-05-11 20:22:28 +02:00
|
|
|
Expression<bool> operator->* ( bool value ) {
|
2012-10-19 09:01:05 +02:00
|
|
|
return Expression<bool>( value );
|
2012-05-11 20:15:54 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace Catch
|
|
|
|
|
|
|
|
#endif // TWOBLUECUBES_CATCH_EXPRESSION_BUILDER_HPP_INCLUDED
|