diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-02-18 13:44:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:32 -0500 |
commit | 2b43de2ed8025ef598c31d41f0fe710f8e3a3658 (patch) | |
tree | 85aaf1780c3d2ae6b8df3368e2dd0007fcf01efa /source4/pidl/tests/ndr.pl | |
parent | ae76a5a92819bfd2d31bc5d23a540c6c71b47354 (diff) | |
download | samba-2b43de2ed8025ef598c31d41f0fe710f8e3a3658.tar.gz samba-2b43de2ed8025ef598c31d41f0fe710f8e3a3658.tar.bz2 samba-2b43de2ed8025ef598c31d41f0fe710f8e3a3658.zip |
r21428: Handle representation types in Needed().
(This used to be commit 34517c69e67d7eafa00e6fe0072bd04f074cdbde)
Diffstat (limited to 'source4/pidl/tests/ndr.pl')
-rwxr-xr-x | source4/pidl/tests/ndr.pl | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/source4/pidl/tests/ndr.pl b/source4/pidl/tests/ndr.pl index da22949c6d..baf06b1eae 100755 --- a/source4/pidl/tests/ndr.pl +++ b/source4/pidl/tests/ndr.pl @@ -4,7 +4,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 12; use FindBin qw($RealBin); use lib "$RealBin"; use Util; @@ -189,3 +189,29 @@ is_deeply(GetElementLevelTable($e), [ 'CONVERT_TO' => undef } ]); + +# representation_type +$e = { + 'FILE' => 'foo.idl', + 'NAME' => 'v', + 'PROPERTIES' => { represent_as => "bar" }, + 'POINTERS' => 0, + 'TYPE' => 'uint8', + 'PARENT' => { TYPE => 'STRUCT' }, + 'LINE' => 42 }; + +$ne = ParseElement($e); +is($ne->{REPRESENTATION_TYPE}, "bar"); + +# representation_type +$e = { + 'FILE' => 'foo.idl', + 'NAME' => 'v', + 'PROPERTIES' => { }, + 'POINTERS' => 0, + 'TYPE' => 'uint8', + 'PARENT' => { TYPE => 'STRUCT' }, + 'LINE' => 42 }; + +$ne = ParseElement($e); +is($ne->{REPRESENTATION_TYPE}, "uint8"); |