Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 946e28de authored by Martin Geisler's avatar Martin Geisler Committed by Cherrypicker Worker
Browse files

pdl: Add structs to Rust canonical tests

We can parse the definitions fine (we parse them like a packet), but
we cannot yet handle struct fields.

Test: atest pdl_tests pdl_rust_generator_tests_{le,be}
(cherry picked from https://android-review.googlesource.com/q/commit:e7fb30313fbd12d91087dc3ed610b923805ff381)
Merged-In: Idd14f43ad0cf32ebeeaa532b15b36259e0808728
Change-Id: Idd14f43ad0cf32ebeeaa532b15b36259e0808728
parent 75cee25f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -12,6 +12,16 @@ enum Enum16 : 16 {
    B = 0xccdd,
}

struct SizedStruct {
    a: 8,
}

struct UnsizedStruct {
    _size_(array): 2,
    _reserved_: 6,
    array: 8[],
}

enum MaxDiscriminantEnum : 64 {
     Max = 0xffffffffffffffff,
}
+10 −0
Original line number Diff line number Diff line
@@ -12,6 +12,16 @@ enum Enum16 : 16 {
    B = 0xccdd,
}

struct SizedStruct {
    a: 8,
}

struct UnsizedStruct {
    _size_(array): 2,
    _reserved_: 6,
    array: 8[],
}

enum MaxDiscriminantEnum : 64 {
     Max = 0xffffffffffffffff,
}