From d7a7b7fb0c423c461c24e8157ad926d0cee07da1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 27 Feb 2007 23:47:07 +0000 Subject: r21572: More work towards supporting tagged types. (This used to be commit 4d28396f0928444406334888f4bc345e74a380df) --- source4/pidl/tests/ndr.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source4/pidl/tests/ndr.pl') diff --git a/source4/pidl/tests/ndr.pl b/source4/pidl/tests/ndr.pl index 26fb6c290b..9824d1e815 100755 --- a/source4/pidl/tests/ndr.pl +++ b/source4/pidl/tests/ndr.pl @@ -4,12 +4,12 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 17; use FindBin qw($RealBin); use lib "$RealBin"; use Util; use Parse::Pidl::Util qw(MyDumper); -use Parse::Pidl::NDR qw(GetElementLevelTable ParseElement); +use Parse::Pidl::NDR qw(GetElementLevelTable ParseElement align_type); # Case 1 @@ -203,3 +203,11 @@ $e = { $ne = ParseElement($e, undef); is($ne->{REPRESENTATION_TYPE}, "uint8"); + +is(align_type("uint32"), 4); +is(align_type("uint16"), 2); +is(align_type("uint8"), 1); +is(align_type({ TYPE => "STRUCT", "NAME" => "bla", + ELEMENTS => [ { TYPE => "uint16" } ] }), 4); +is(align_type({ TYPE => "STRUCT", "NAME" => "bla", + ELEMENTS => [ { TYPE => "uint8" } ] }), 4); -- cgit