forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.cpp
More file actions
31 lines (24 loc) · 847 Bytes
/
config.cpp
File metadata and controls
31 lines (24 loc) · 847 Bytes
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
#include <catch2/catch_test_macros.hpp>
#include <rerun.hpp>
#define TEST_TAG "[set_enabled]"
SCENARIO("Rerun default_enabled can be configured", TEST_TAG) {
GIVEN("The initial state") {
THEN("The default value of default_enabled is true") {
CHECK(rerun::is_default_enabled());
}
}
GIVEN("Logging has been disabled") {
rerun::set_default_enabled(false);
THEN("default_enabled returns false") {
CHECK_FALSE(rerun::is_default_enabled());
}
}
// NOTE: This needs to go last or else we end up globally disabling
// default recordings, which breaks other tests.
GIVEN("Logging has been enabled") {
rerun::set_default_enabled(true);
THEN("default_enabled returns true") {
CHECK(rerun::is_default_enabled());
}
}
}