~mmach/netext73/trompeloeil-cpp

« back to all changes in this revision

Viewing changes to compilation_errors/negative_limit_interval_second.cpp

  • Committer: mmach
  • Date: 2023-06-16 19:07:20 UTC
  • Revision ID: netbit73@gmail.com-20230616190720-kowhg7e12jao67gj
1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Trompeloeil C++ mocking framework
 
3
 *
 
4
 * Copyright Björn Fahller 2014,2017
 
5
 *
 
6
 *  Use, modification and distribution is subject to the
 
7
 *  Boost Software License, Version 1.0. (See accompanying
 
8
 *  file LICENSE_1_0.txt or copy at
 
9
 *  http://www.boost.org/LICENSE_1_0.txt)
 
10
 *
 
11
 * Project home: https://github.com/rollbear/trompeloeil
 
12
 */
 
13
 
 
14
//In TIMES the first value must not exceed the second
 
15
#include <trompeloeil.hpp>
 
16
 
 
17
struct MS
 
18
{
 
19
  MAKE_MOCK0(f, int());
 
20
};
 
21
 
 
22
int main()
 
23
{
 
24
  trompeloeil::sequence seq;
 
25
  MS obj;
 
26
 
 
27
#if (TROMPELOEIL_CPLUSPLUS == 201103L)
 
28
 
 
29
  REQUIRE_CALL_V(obj, f(),
 
30
    .RETURN(0)
 
31
    .TIMES(3,2));
 
32
 
 
33
#else /* (TROMPELOEIL_CPLUSPLUS == 201103L) */
 
34
 
 
35
  REQUIRE_CALL(obj, f())
 
36
    .RETURN(0)
 
37
    .TIMES(3,2);
 
38
 
 
39
#endif /* !(TROMPELOEIL_CPLUSPLUS == 201103L) */
 
40
}