@@ -17,9 +17,10 @@ extern auto log_one_64bit_rt_arg() -> void;
17
17
extern auto log_one_formatted_rt_arg () -> void;
18
18
extern auto log_two_rt_args () -> void;
19
19
extern auto log_rt_enum_arg () -> void;
20
- extern auto log_with_non_default_module_id () -> void;
21
- extern auto log_with_fixed_module_id () -> void;
20
+ extern auto log_with_non_default_module () -> void;
21
+ extern auto log_with_fixed_module () -> void;
22
22
extern auto log_with_fixed_string_id () -> void;
23
+ extern auto log_with_fixed_module_id () -> void;
23
24
24
25
TEST_CASE (" log zero arguments" , " [catalog]" ) {
25
26
test_critical_section::count = 0 ;
@@ -88,16 +89,17 @@ TEST_CASE("log module ids change", "[catalog]") {
88
89
CHECK ((last_header & expected_static) == expected_static);
89
90
90
91
auto default_header = last_header;
91
- log_with_non_default_module_id ();
92
+ log_with_non_default_module ();
92
93
CHECK ((last_header & expected_static) == expected_static);
93
94
CHECK ((last_header ^ default_header) == (1u << 16u ));
94
95
}
95
96
96
- TEST_CASE (" log with fixed module id" , " [catalog]" ) {
97
+ TEST_CASE (" log with stable module id" , " [catalog]" ) {
97
98
std::uint32_t expected_static = (1u << 24u ) | (7u << 4u ) | 3u ;
98
99
99
- log_with_fixed_module_id ();
100
+ log_with_fixed_module ();
100
101
CHECK ((last_header & expected_static) == expected_static);
102
+ // module ID 17 is fixed by stable_strings.json
101
103
CHECK ((last_header & ~expected_static) == (17u << 16u ));
102
104
}
103
105
@@ -110,3 +112,12 @@ TEST_CASE("log with fixed string id", "[catalog]") {
110
112
// string ID 1337 is fixed by environment
111
113
CHECK (last_header == ((1337u << 4u ) | 1u ));
112
114
}
115
+
116
+ TEST_CASE (" log with fixed module id" , " [catalog]" ) {
117
+ std::uint32_t expected_static = (1u << 24u ) | (7u << 4u ) | 3u ;
118
+
119
+ log_with_fixed_module_id ();
120
+ CHECK ((last_header & expected_static) == expected_static);
121
+ // module ID 7 is fixed by environment
122
+ CHECK ((last_header & ~expected_static) == (7u << 16u ));
123
+ }
0 commit comments