diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-08-25 08:27:06 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-08-25 08:27:06 +1000 |
commit | 9eacc3a8f396e74b0deed193f0f2ecffa3ba8e93 (patch) | |
tree | 28d045a42a9b09b42e34b9009a6635026ff3d9c8 /source4/pidl/tests/samba-ndr.pl | |
parent | 5631ebaf78fee35880aafe29578b8925c655e5f4 (diff) | |
parent | a22b9d648553e5e7e0ee19606d9bceeb3b356241 (diff) | |
download | samba-9eacc3a8f396e74b0deed193f0f2ecffa3ba8e93.tar.gz samba-9eacc3a8f396e74b0deed193f0f2ecffa3ba8e93.tar.bz2 samba-9eacc3a8f396e74b0deed193f0f2ecffa3ba8e93.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit a555334db67527b57bc6172e3d08f65caf1e6760)
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(); |