File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,12 @@ struct shared_sub_irq_impl : Config {
8686 using Config::status_field;
8787
8888 [[nodiscard]] static auto get_interrupt_enables () {
89- return stdx::tuple_cat (Subs::get_interrupt_enables ()...);
89+ if constexpr (active) {
90+ return stdx::tuple_cat (stdx::make_tuple (enable_field),
91+ Subs::get_interrupt_enables ()...);
92+ } else {
93+ return stdx::tuple{};
94+ }
9095 }
9196
9297 static auto run () -> void {
Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ TEST_CASE(
9898 using impl_t =
9999 interrupt::shared_sub_irq_impl<flow_config_t <std::true_type>,
100100 active_sub_impl_t , inactive_sub_impl_t >;
101- CHECK (impl_t::get_interrupt_enables () ==
102- stdx::tuple{enable_field_t <17 >{}, enable_field_t <0 >{}});
101+
102+ auto expected = stdx::tuple{enable_field_t <0 >{}, enable_field_t <17 >{}};
103+ auto actual = impl_t::get_interrupt_enables ();
104+
105+ CHECK (std::size (expected) == std::size (actual));
106+ CHECK (expected == actual);
103107}
You can’t perform that action at this time.
0 commit comments