summaryrefslogtreecommitdiff
path: root/source4/pidl/tests/ndr_deprecations.pl
blob: 89738e42f63f2e69662ced07d0effd0d35e00556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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); });