1#!/usr/bin/perl 2# (C) 2007 Jelmer Vernooij <jelmer@samba.org> 3# Published under the GNU General Public License 4use strict; 5 6use Test::More tests => 2; 7use FindBin qw($RealBin); 8use lib "$RealBin"; 9use Util; 10use Parse::Pidl; 11use Parse::Pidl::IDL; 12 13sub parse_idl($) 14{ 15 my $idl = shift; 16 my $pidl = Parse::Pidl::IDL::parse_string("interface echo { $idl }; ", "nofile"); 17 Parse::Pidl::NDR::Parse($pidl); 18} 19 20test_warnings("", sub {parse_idl("void x();"); }); 21test_warnings("nofile:0: top-level [out] pointer `x' is not a [ref] pointer\n", sub {parse_idl("void x([out,unique] int *x);"); }); 22