From 6963e9b90bc1bfa1e370701e792f34fb0c3e6944 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 12 Jan 2008 21:14:44 +0100 Subject: pidl: Move tests for the CUtil module to a separate file. (This used to be commit ce40890ef0166ad11dd835249f52e2ab5876efba) --- source4/pidl/tests/cutil.pl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 source4/pidl/tests/cutil.pl (limited to 'source4/pidl/tests/cutil.pl') diff --git a/source4/pidl/tests/cutil.pl b/source4/pidl/tests/cutil.pl new file mode 100755 index 0000000000..78c8bce45e --- /dev/null +++ b/source4/pidl/tests/cutil.pl @@ -0,0 +1,21 @@ +#!/usr/bin/perl +# (C) 2007 Jelmer Vernooij +# Published under the GNU General Public License +use strict; +use warnings; + +use Test::More tests => 7; +use FindBin qw($RealBin); +use lib "$RealBin"; +use Util; +use Parse::Pidl::Util qw(MyDumper); +use Parse::Pidl::CUtil qw(get_pointer_to get_value_of); + +is("&foo", get_pointer_to("foo")); +is("&(&foo)", get_pointer_to(get_pointer_to("foo"))); +is("*foo", get_pointer_to("**foo")); +is("foo", get_pointer_to("*foo")); + +is("foo", get_value_of("&foo")); +is("*foo", get_value_of("foo")); +is("**foo", get_value_of("*foo")); -- cgit