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

Commit 81d367cc authored by Martin Geisler's avatar Martin Geisler
Browse files

pdl: Align Rust canonical tests with source

I’ve been copying bits and pieces from the source files into the Rust
file and the definition has been accidentally reordered. They’re now
brought back in line with the source files.

Test: atest pdl_tests pdl_rust_generator_tests_{le,be}
Change-Id: I41c26557b90e5f17e3dc7304def6f2dbb1e09ec3
parent a4a73d75
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
big_endian_packets

// Packet bit fields

// The parser must be able to handle bit fields with scalar values
// up to 64 bits wide.  The parser should generate a static size guard.
packet Packet_Scalar_Field {
    a: 7,
    c: 57,
}
// Preliminary definitions

enum Enum7 : 7 {
    A = 1,
@@ -23,6 +16,17 @@ enum MaxDiscriminantEnum : 64 {
     Max = 0xffffffffffffffff,
}

// Packet bit fields

// The parser must be able to handle bit fields with scalar values
// up to 64 bits wide.  The parser should generate a static size guard.
packet Packet_Scalar_Field {
    a: 7,
    c: 57,
}

// The parser must be able to handle bit fields with enum values
// up to 64 bits wide.  The parser should generate a static size guard.
packet Packet_Enum_Field {
    a: Enum7,
    c: 57,
+11 −21
Original line number Diff line number Diff line
little_endian_packets

// Packet bit fields

// The parser must be able to handle bit fields with scalar values
// up to 64 bits wide.  The parser should generate a static size guard.
packet Packet_Scalar_Field {
    a: 7,
    c: 57,
}
// Preliminary definitions

enum Enum7 : 7 {
    A = 1,
@@ -23,21 +16,18 @@ enum MaxDiscriminantEnum : 64 {
     Max = 0xffffffffffffffff,
}

packet Packet_Enum_Field {
    a: Enum7,
    c: 57,
}
// Packet bit fields

packet Packet_Size_Field {
    _size_(b): 3,
    a: 61,
    b: 8[],
// The parser must be able to handle bit fields with scalar values
// up to 64 bits wide.  The parser should generate a static size guard.
packet Packet_Scalar_Field {
    a: 7,
    c: 57,
}

// The parser must be able to handle bit fields with count fields
// The parser must be able to handle bit fields with enum values
// up to 64 bits wide.  The parser should generate a static size guard.
packet Packet_Count_Field {
    _count_(b): 3,
    a: 61,
    b: 8[],
packet Packet_Enum_Field {
    a: Enum7,
    c: 57,
}