pidl: Move tests for the CUtil module to a separate file.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 12 Jan 2008 20:14:44 +0000 (21:14 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 12 Jan 2008 20:14:44 +0000 (21:14 +0100)
source/pidl/tests/cutil.pl [new file with mode: 0755]
source/pidl/tests/samba-ejs.pl

diff --git a/source/pidl/tests/cutil.pl b/source/pidl/tests/cutil.pl
new file mode 100755 (executable)
index 0000000..78c8bce
--- /dev/null
@@ -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"));
index adc00e224fd58dcf2aacaa3cb39502afbda493a0..094d37a103b5babf41cb42663916652be113d733 100755 (executable)
@@ -4,23 +4,14 @@
 use strict;
 use warnings;
 
 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 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);
 
         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");
 my $ejs = new Parse::Pidl::Samba4::EJS();
 
 $ejs->check_null_pointer("bla");