From 2b43de2ed8025ef598c31d41f0fe710f8e3a3658 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 18 Feb 2007 13:44:01 +0000 Subject: r21428: Handle representation types in Needed(). (This used to be commit 34517c69e67d7eafa00e6fe0072bd04f074cdbde) --- source4/pidl/tests/ndr.pl | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'source4/pidl/tests/ndr.pl') 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"); -- cgit