summaryrefslogtreecommitdiff
path: root/source4/pidl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-12 21:14:44 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-12 21:14:44 +0100
commit6963e9b90bc1bfa1e370701e792f34fb0c3e6944 (patch)
tree7a6e8c26d9bdc5dfef1cde895e62146c13c8e6e1 /source4/pidl
parent87fc0a43915fcdce3ac8deea50f3fafffaa42c37 (diff)
downloadsamba-6963e9b90bc1bfa1e370701e792f34fb0c3e6944.tar.gz
samba-6963e9b90bc1bfa1e370701e792f34fb0c3e6944.tar.bz2
samba-6963e9b90bc1bfa1e370701e792f34fb0c3e6944.zip
pidl: Move tests for the CUtil module to a separate file.
(This used to be commit ce40890ef0166ad11dd835249f52e2ab5876efba)
Diffstat (limited to 'source4/pidl')
-rwxr-xr-xsource4/pidl/tests/cutil.pl21
-rwxr-xr-xsource4/pidl/tests/samba-ejs.pl13
2 files changed, 23 insertions, 11 deletions
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 <jelmer@samba.org>
+# 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"));
diff --git a/source4/pidl/tests/samba-ejs.pl b/source4/pidl/tests/samba-ejs.pl
index adc00e224f..094d37a103 100755
--- a/source4/pidl/tests/samba-ejs.pl
+++ b/source4/pidl/tests/samba-ejs.pl
@@ -4,23 +4,14 @@
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 10;
use FindBin qw($RealBin);
use lib "$RealBin";
use Util;
use Parse::Pidl::Util qw(MyDumper);
-use Parse::Pidl::Samba4::EJS qw(get_pointer_to get_value_of check_null_pointer
+use Parse::Pidl::Samba4::EJS qw(check_null_pointer
fn_declare TypeFunctionName);
-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"));
-
my $ejs = new Parse::Pidl::Samba4::EJS();
$ejs->check_null_pointer("bla");