-
Notifications
You must be signed in to change notification settings - Fork 2
/
biology.cpp
59 lines (50 loc) · 1.01 KB
/
biology.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include "biology.h"
#include <cassert>
biology::biology()
{
//Nothing to be done yet :-)
}
double biology::get_health_increase_when_eating() const noexcept
{
return 0.2;
}
double biology::get_stamina_increase_when_eating() const noexcept
{
return 0.2;
}
double biology::get_health_decrease_when_eaten() const noexcept
{
return 2.0;
}
double biology::get_grass_reproduction_health() const noexcept
{
return 100.0;
}
void test_biology()
{
#define FIX_ISSUE_549_A
#ifdef FIX_ISSUE_549_A
{
const biology b;
assert(b.get_health_increase_when_eating() == 0.2);
}
#endif // FIX_ISSUE_549_A
#define FIX_ISSUE_549_B
#ifdef FIX_ISSUE_549_B
{
const biology b;
assert(b.get_stamina_increase_when_eating() == 0.2);
}
#endif // FIX_ISSUE_549_B
#define FIX_ISSUE_549_C
#ifdef FIX_ISSUE_549_C
{
const biology b;
assert(b.get_health_decrease_when_eaten() == 2.0);
}
#endif // FIX_ISSUE_549_C
{
const biology b;
assert(b.get_grass_reproduction_health() == 100.0);
}
}