瀏覽代碼

Merge pull request #968 from thvdveld/fix-test-feature-flag

Fix wrong feature flag for UDP broadcast test
Dario Nieuwenhuis 8 月之前
父節點
當前提交
4ed4f2a62d
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. 8 4
      src/iface/interface/tests/mod.rs

+ 8 - 4
src/iface/interface/tests/mod.rs

@@ -61,11 +61,15 @@ fn test_new_panic() {
     Interface::new(config, &mut device, Instant::ZERO);
 }
 
+#[cfg(feature = "socket-udp")]
 #[rstest]
-#[cfg(feature = "default")]
-fn test_handle_udp_broadcast(
-    #[values(Medium::Ip, Medium::Ethernet, Medium::Ieee802154)] medium: Medium,
-) {
+#[case::ip(Medium::Ip)]
+#[cfg(feature = "medium-ip")]
+#[case::ethernet(Medium::Ethernet)]
+#[cfg(feature = "medium-ethernet")]
+#[case::ieee802154(Medium::Ieee802154)]
+#[cfg(feature = "medium-ieee802154")]
+fn test_handle_udp_broadcast(#[case] medium: Medium) {
     use crate::socket::udp;
     use crate::wire::IpEndpoint;