summaryrefslogtreecommitdiffstats
path: root/pidl/tests/ndr_compat.pl
blob: 06f7efb40009c87d1f536a9d3ee50dd7b09d5fe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
# (C) 2007 Jelmer Vernooij <jelmer@samba.org>
# Published under the GNU General Public License
use strict;
use warnings;

use Test::More tests => 2;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util; 
use Parse::Pidl;
use Parse::Pidl::IDL;

sub parse_idl($) 
{
	my $idl = shift;
	my $pidl = Parse::Pidl::IDL::parse_string("interface echo { $idl }; ", "nofile");
	Parse::Pidl::NDR::Parse($pidl);
}

test_warnings("", sub {parse_idl("void x();"); });
test_warnings("nofile:0: top-level [out] pointer `x' is not a [ref] pointer\n", sub {parse_idl("void x([out,unique] int *x);"); });