• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Created by Martin on 27/5/2017.
3  *  Copyright 2017 Two Blue Cubes Ltd. All rights reserved.
4  *
5  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
6  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7  */
8 
9 #include <iostream>
10 #include <cstdio>
11 
12 namespace {
13 
14 struct truthy {
truthy__anonabb247960111::truthy15     truthy(bool b):m_value(b){}
operator bool__anonabb247960111::truthy16     operator bool() const {
17         return false;
18     }
19     bool m_value;
20 };
21 
operator <<(std::ostream & o,truthy)22 std::ostream& operator<<(std::ostream& o, truthy) {
23     o << "Hey, its truthy!";
24     return o;
25 }
26 
27 } // end anonymous namespace
28 
29 #include "catch.hpp"
30 
31 TEST_CASE( "Reconstruction should be based on stringification: #914" , "[Decomposition][failing][.]") {
32     CHECK(truthy(false));
33 }
34 
35 TEST_CASE("#1005: Comparing pointer to int and long (NULL can be either on various systems)", "[Decomposition]") {
36     FILE* fptr = nullptr;
37     REQUIRE(fptr == 0);
38     REQUIRE(fptr == 0l);
39 }
40