diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-08-26 16:26:08 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-08-26 16:26:08 +1000 |
commit | f08786686c0bf2440e35ce29b8e0b1a2f116fe3a (patch) | |
tree | fd7ac6f7cd8528c550952731347f03397c70df77 /source4/pidl/tests/samba-ndr.pl | |
parent | b5a3f45f645204bcc3d6caa47993b7839c8e4c99 (diff) | |
parent | 4eba234a7352094e1640e8ff9d80a20f8d4705a3 (diff) | |
download | samba-f08786686c0bf2440e35ce29b8e0b1a2f116fe3a.tar.gz samba-f08786686c0bf2440e35ce29b8e0b1a2f116fe3a.tar.bz2 samba-f08786686c0bf2440e35ce29b8e0b1a2f116fe3a.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into pac-verify
(This used to be commit b706708210a05d6f10474a3cd2bbc550704d4356)
Diffstat (limited to 'source4/pidl/tests/samba-ndr.pl')
-rwxr-xr-x | source4/pidl/tests/samba-ndr.pl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source4/pidl/tests/samba-ndr.pl b/source4/pidl/tests/samba-ndr.pl index 114ca01cfa..cdfe0514f1 100755 --- a/source4/pidl/tests/samba-ndr.pl +++ b/source4/pidl/tests/samba-ndr.pl @@ -220,7 +220,7 @@ $generator->ParseStructPush({ TYPE => "STRUCT", PROPERTIES => {}, ALIGN => 4, - ELEMENTS => [ ]}, "x"); + ELEMENTS => [ ]}, "ndr", "x"); is($generator->{res}, "if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); } @@ -243,7 +243,7 @@ $generator->ParseStructPush({ PROPERTIES => {}, ALIGN => 4, SURROUNDING_ELEMENT => $e, - ELEMENTS => [ $e ]}, "x"); + ELEMENTS => [ $e ]}, "ndr", "x"); is($generator->{res}, "if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_string_array_size(ndr, x->el1))); NDR_CHECK(ndr_push_align(ndr, 4)); @@ -262,20 +262,23 @@ is(TypeFunctionName("ndr_push", {TYPE => "STRUCT", NAME => "bar"}), "ndr_push_ST $generator = new Parse::Pidl::Samba4::NDR::Parser(); $generator->ParseElementPrint({ NAME => "x", TYPE => "rt", REPRESENTATION_TYPE => "rt", PROPERTIES => { noprint => 1}, - LEVELS => [ { TYPE => "DATA", DATA_TYPE => "rt"} ]}, "var", { "x" => "r->foobar" } ); + LEVELS => [ { TYPE => "DATA", DATA_TYPE => "rt"} ]}, + "ndr", "var", { "x" => "r->foobar" } ); is($generator->{res}, ""); $generator = new Parse::Pidl::Samba4::NDR::Parser(); $generator->ParseElementPrint({ NAME => "x", TYPE => "rt", REPRESENTATION_TYPE => "rt", PROPERTIES => {}, - LEVELS => [ { TYPE => "DATA", DATA_TYPE => "rt" }]}, "var", { "x" => "r->foobar" } ); + LEVELS => [ { TYPE => "DATA", DATA_TYPE => "rt" }]}, + "ndr", "var", { "x" => "r->foobar" } ); is($generator->{res}, "ndr_print_rt(ndr, \"x\", &var);\n"); # make sure that a print function for an element with value() set works $generator = new Parse::Pidl::Samba4::NDR::Parser(); $generator->ParseElementPrint({ NAME => "x", TYPE => "uint32", REPRESENTATION_TYPE => "uint32", PROPERTIES => { value => "23" }, - LEVELS => [ { TYPE => "DATA", DATA_TYPE => "uint32"} ]}, "var", { "x" => "r->foobar" } ); + LEVELS => [ { TYPE => "DATA", DATA_TYPE => "uint32"} ]}, + "ndr", "var", { "x" => "r->foobar" } ); is($generator->{res}, "ndr_print_uint32(ndr, \"x\", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?23:var);\n"); $generator = new Parse::Pidl::Samba4::NDR::Parser(); |