diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
commit | e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch) | |
tree | 68cb5ef9081156392f1dd62a00c6ccc1451b93df /tools/pidl/tests/ndr_deprecations.pl | |
parent | Initial commit. (diff) | |
download | wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip |
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/pidl/tests/ndr_deprecations.pl')
-rwxr-xr-x | tools/pidl/tests/ndr_deprecations.pl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/pidl/tests/ndr_deprecations.pl b/tools/pidl/tests/ndr_deprecations.pl new file mode 100755 index 00000000..86828e59 --- /dev/null +++ b/tools/pidl/tests/ndr_deprecations.pl @@ -0,0 +1,26 @@ +#!/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); }); |