summary refs log tree commit diff stats
path: root/rust/qemu-macros/src/tests.rs
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-07-16 10:50:58 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-09-22 17:17:18 +0200
commit60c96a8775c163383043d4ece6065dcb8f940856 (patch)
tree5541255d411bfbcb8064d778ab35ead1faeaeb5f /rust/qemu-macros/src/tests.rs
parent193f2ab6e076f0f3d07081802bee2d36eb86086f (diff)
downloadfocaccia-qemu-60c96a8775c163383043d4ece6065dcb8f940856.tar.gz
focaccia-qemu-60c96a8775c163383043d4ece6065dcb8f940856.zip
rust: qemu-macros: switch #[property] parsing to use combinators
Since we are going to add more attribute parsing for high-level migration
state macros, use the attrs crate instead of a handwritten parser for
device properties as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-macros/src/tests.rs')
-rw-r--r--rust/qemu-macros/src/tests.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/rust/qemu-macros/src/tests.rs b/rust/qemu-macros/src/tests.rs
index 9ab7eab7f3..00a106612f 100644
--- a/rust/qemu-macros/src/tests.rs
+++ b/rust/qemu-macros/src/tests.rs
@@ -60,7 +60,7 @@ fn test_derive_device() {
                 migrate_clock: bool,
             }
         },
-        "unrecognized field `defalt`"
+        "Expected one of `default` or `rename`"
     );
     // Check that repeated attributes are not allowed:
     derive_compile_fail!(
@@ -73,7 +73,8 @@ fn test_derive_device() {
                 migrate_clock: bool,
             }
         },
-        "`rename` can only be used at most once"
+        "Duplicate argument",
+        "Already used here",
     );
     derive_compile_fail!(
         derive_device_or_error,
@@ -85,7 +86,8 @@ fn test_derive_device() {
                 migrate_clock: bool,
             }
         },
-        "`default` can only be used at most once"
+        "Duplicate argument",
+        "Already used here",
     );
     // Check that the field name is preserved when `rename` isn't used:
     derive_compile!(