@@ -13,25 +13,25 @@ using no_flows_config_t =
13
13
} // namespace
14
14
15
15
TEST_CASE (" config models concept" , " [sub_irq_impl]" ) {
16
- static_assert (interrupt::sub_irq_config<no_flows_config_t >);
16
+ STATIC_REQUIRE (interrupt::sub_irq_config<no_flows_config_t >);
17
17
}
18
18
19
19
TEST_CASE (" config default status policy is clear first" , " [sub_irq_impl]" ) {
20
- static_assert (std::is_same_v<no_flows_config_t ::status_policy_t ,
21
- interrupt::clear_status_first>);
20
+ STATIC_REQUIRE (std::is_same_v<no_flows_config_t ::status_policy_t ,
21
+ interrupt::clear_status_first>);
22
22
}
23
23
24
24
TEST_CASE (" config status policy can be supplied" , " [sub_irq_impl]" ) {
25
25
using config_t =
26
26
interrupt::sub_irq<enable_field_t <0 >, status_field_t <0 >,
27
27
interrupt::policies<interrupt::clear_status_last>>;
28
- static_assert (std::is_same_v<config_t ::status_policy_t ,
29
- interrupt::clear_status_last>);
28
+ STATIC_REQUIRE (std::is_same_v<config_t ::status_policy_t ,
29
+ interrupt::clear_status_last>);
30
30
}
31
31
32
32
TEST_CASE (" impl models concept" , " [sub_irq_impl]" ) {
33
33
using impl_t = interrupt::sub_irq_impl<no_flows_config_t , test_nexus>;
34
- static_assert (interrupt::sub_irq_interface<impl_t >);
34
+ STATIC_REQUIRE (interrupt::sub_irq_interface<impl_t >);
35
35
}
36
36
37
37
namespace {
@@ -43,7 +43,7 @@ using flow_config_t = interrupt::sub_irq<enable_field_t<0>, status_field_t<0>,
43
43
TEST_CASE (" impl runs a flow when enabled and status" , " [sub_irq_impl]" ) {
44
44
using impl_t =
45
45
interrupt::sub_irq_impl<flow_config_t <std::true_type>, test_nexus>;
46
- static_assert (impl_t ::active);
46
+ STATIC_REQUIRE (impl_t ::active);
47
47
48
48
enable_field_t <0 >::value = true ;
49
49
status_field_t <0 >::value = true ;
@@ -55,7 +55,7 @@ TEST_CASE("impl runs a flow when enabled and status", "[sub_irq_impl]") {
55
55
TEST_CASE (" impl doesn't run a flow when not enabled" , " [sub_irq_impl]" ) {
56
56
using impl_t =
57
57
interrupt::sub_irq_impl<flow_config_t <std::true_type>, test_nexus>;
58
- static_assert (impl_t ::active);
58
+ STATIC_REQUIRE (impl_t ::active);
59
59
60
60
enable_field_t <0 >::value = false ;
61
61
status_field_t <0 >::value = true ;
@@ -67,7 +67,7 @@ TEST_CASE("impl doesn't run a flow when not enabled", "[sub_irq_impl]") {
67
67
TEST_CASE (" impl doesn't run a flow when not status" , " [sub_irq_impl]" ) {
68
68
using impl_t =
69
69
interrupt::sub_irq_impl<flow_config_t <std::true_type>, test_nexus>;
70
- static_assert (impl_t ::active);
70
+ STATIC_REQUIRE (impl_t ::active);
71
71
72
72
enable_field_t <0 >::value = true ;
73
73
status_field_t <0 >::value = false ;
@@ -79,12 +79,12 @@ TEST_CASE("impl doesn't run a flow when not status", "[sub_irq_impl]") {
79
79
TEST_CASE (" impl is inactive when flow is not active" , " [sub_irq_impl]" ) {
80
80
using impl_t =
81
81
interrupt::sub_irq_impl<flow_config_t <std::false_type>, test_nexus>;
82
- static_assert (not impl_t ::active);
82
+ STATIC_REQUIRE (not impl_t ::active);
83
83
}
84
84
85
85
TEST_CASE (" impl is inactive when there are no flows" , " [sub_irq_impl]" ) {
86
86
using impl_t = interrupt::sub_irq_impl<no_flows_config_t , test_nexus>;
87
- static_assert (not impl_t ::active);
87
+ STATIC_REQUIRE (not impl_t ::active);
88
88
}
89
89
90
90
TEST_CASE (" impl reports one enable field when active" , " [sub_irq_impl]" ) {
0 commit comments