1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00
samba-mirror/source4/pidl/tests/ndr_deprecations.pl
Jelmer Vernooij ecf2c1effb r21222: Merge a couple of pidl fixes:
* Pidl will now warn when trying to use pointers as integers in expressions.
* "subcontext()" is now marked as deprecated. The alternatives,
  transmit_as() / represent_as() should be available soon.
* More tests.
* Remove some unused code in smbtorture.
(This used to be commit 37c0da541e3962164d5af3e3c9560803a733f3b7)
2007-10-10 14:44:48 -05:00

29 lines
619 B
Perl
Executable File

#!/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 => 1;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
use Parse::Pidl::Util qw(MyDumper);
use Parse::Pidl::NDR qw(ValidElement);
# Case 1
my $e = {
'FILE' => 'foo.idl',
'NAME' => 'v',
'PROPERTIES' => {"subcontext" => 1},
'POINTERS' => 0,
'TYPE' => 'uint8',
'PARENT' => { TYPE => 'STRUCT' },
'LINE' => 42 };
test_warnings("foo.idl:42: subcontext() is deprecated. Use represent_as() or transmit_as() instead\n",
sub { ValidElement($e); });