From 9858fdefdce350c622a0aad8020510a6cd9f5d61 Mon Sep 17 00:00:00 2001 From: Kedar Sovani Date: Thu, 12 Jan 2023 18:31:13 +0530 Subject: [PATCH] tests: Fix test cases for featuremap --- matter/src/lib.rs | 1 + matter/tests/data_model/attributes.rs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/matter/src/lib.rs b/matter/src/lib.rs index 08f2c19..a0a9603 100644 --- a/matter/src/lib.rs +++ b/matter/src/lib.rs @@ -50,6 +50,7 @@ //! pid: 0xFFF1, //! hw_ver: 2, //! sw_ver: 1, +//! serial_no: "aabbcc".to_string(), //! }; //! //! /// Get the Matter Object diff --git a/matter/tests/data_model/attributes.rs b/matter/tests/data_model/attributes.rs index 5e230c7..b53614f 100644 --- a/matter/tests/data_model/attributes.rs +++ b/matter/tests/data_model/attributes.rs @@ -238,6 +238,7 @@ fn test_read_wc_endpoint_wc_attribute() { let attr_list_tlvs = get_tlvs( &mut buf, &[ + GlobalElements::FeatureMap as u16, GlobalElements::AttributeList as u16, echo_cluster::Attributes::Att1 as u16, echo_cluster::Attributes::Att2 as u16, @@ -247,6 +248,14 @@ fn test_read_wc_endpoint_wc_attribute() { ); let expected = &[ + attr_data!( + GenericPath::new( + Some(0), + Some(echo_cluster::ID), + Some(GlobalElements::FeatureMap as u32), + ), + ElementType::U8(0) + ), attr_data!( GenericPath::new( Some(0), @@ -279,6 +288,14 @@ fn test_read_wc_endpoint_wc_attribute() { ), ElementType::U32(echo_cluster::ATTR_CUSTOM_VALUE) ), + attr_data!( + GenericPath::new( + Some(1), + Some(echo_cluster::ID), + Some(GlobalElements::FeatureMap as u32), + ), + ElementType::U8(0) + ), attr_data!( GenericPath::new( Some(1),