github
6 of 1611 new or added lines in 20 files covered. (0.37%)
258 existing lines in 9 files now uncovered.33269 of 107800 relevant lines covered (30.86%)
46970.76 hits per line
1 |
#pragma once
|
|
2 |
|
|
3 |
#include <QtDebug> |
|
4 |
|
|
5 |
class Experiment { |
|
6 |
public:
|
|
7 |
enum Mode {
|
|
8 |
OFF = 0,
|
|
9 |
BASE = 1,
|
|
10 |
EXPERIMENT = 2
|
|
11 |
}; |
|
12 |
|
|
13 |
static inline bool isEnabled() { |
|
14 |
return s_mode != OFF;
|
|
15 |
} |
|
16 |
|
|
UNCOV
17
|
static void disable() { |
× |
UNCOV
18
|
qDebug() << "Experiment::setExperiment OFF";
|
× |
UNCOV
19
|
s_mode = OFF; |
× |
UNCOV
20
|
} |
× |
21 |
|
|
UNCOV
22
|
static void setExperiment() { |
× |
UNCOV
23
|
qDebug() << "Experiment::setExperiment EXPERIMENT";
|
× |
UNCOV
24
|
s_mode = EXPERIMENT; |
× |
UNCOV
25
|
} |
× |
26 |
|
|
UNCOV
27
|
static void setBase() { |
× |
UNCOV
28
|
qDebug() << "Experiment::setExperiment BASE";
|
× |
UNCOV
29
|
s_mode = BASE; |
× |
UNCOV
30
|
} |
× |
31 |
|
|
UNCOV
32
|
static inline bool isExperiment() { |
× |
UNCOV
33
|
return s_mode == EXPERIMENT;
|
× |
34 |
} |
|
35 |
|
|
UNCOV
36
|
static inline bool isBase() { |
× |
UNCOV
37
|
return s_mode == BASE;
|
× |
38 |
} |
|
39 |
|
|
40 |
static Mode mode() {
|
4,023✔ |
41 |
return s_mode;
|
4,023✔ |
42 |
} |
|
43 |
|
|
44 |
private:
|
|
45 |
Experiment(); |
|
46 |
|
|
47 |
static volatile Mode s_mode; |
|
48 |
}; |