pidl: fixed unit tests for trailer alignment
authorAndrew Tridgell <tridge@samba.org>
Fri, 2 Oct 2009 07:14:15 +0000 (17:14 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 2 Oct 2009 07:14:15 +0000 (17:14 +1000)
pidl/tests/samba-ndr.pl

index 5c9c6afd8511194ae69fe68151141f86a2656b1a..e2578178099f21ca73ba73705e9d5b6707508ff2 100755 (executable)
@@ -223,6 +223,7 @@ $generator->ParseStructPush({
                        ELEMENTS => [ ]}, "ndr", "x");
 is($generator->{res}, "if (ndr_flags & NDR_SCALARS) {
        NDR_CHECK(ndr_push_align(ndr, 4));
                        ELEMENTS => [ ]}, "ndr", "x");
 is($generator->{res}, "if (ndr_flags & NDR_SCALARS) {
        NDR_CHECK(ndr_push_align(ndr, 4));
+       NDR_CHECK(ndr_push_trailer_align(ndr, 4));
 }
 if (ndr_flags & NDR_BUFFERS) {
 }
 }
 if (ndr_flags & NDR_BUFFERS) {
 }
@@ -248,6 +249,7 @@ is($generator->{res}, "if (ndr_flags & NDR_SCALARS) {
        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_string_array_size(ndr, x->el1)));
        NDR_CHECK(ndr_push_align(ndr, 4));
        NDR_CHECK(ndr_push_mytype(ndr, NDR_SCALARS, &x->el1));
        NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_string_array_size(ndr, x->el1)));
        NDR_CHECK(ndr_push_align(ndr, 4));
        NDR_CHECK(ndr_push_mytype(ndr, NDR_SCALARS, &x->el1));
+       NDR_CHECK(ndr_push_trailer_align(ndr, 4));
 }
 if (ndr_flags & NDR_BUFFERS) {
 }
 }
 if (ndr_flags & NDR_BUFFERS) {
 }