summaryrefslogtreecommitdiff
path: root/source4/pidl/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-02-28 02:01:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:59 -0500
commit3bc13d6eeda1a8e5e0ebec8c85c3aaf2ded2b111 (patch)
tree618b49b3ca1cd03a4fd386ade562686058cf1691 /source4/pidl/tests
parent4c99e87f9bf30ea3f7e22263ded9f9a0372a73c6 (diff)
downloadsamba-3bc13d6eeda1a8e5e0ebec8c85c3aaf2ded2b111.tar.gz
samba-3bc13d6eeda1a8e5e0ebec8c85c3aaf2ded2b111.tar.bz2
samba-3bc13d6eeda1a8e5e0ebec8c85c3aaf2ded2b111.zip
r21579: Use utility function to determine function names in ejs code.
(This used to be commit 1736de4c73a82be8357808dc8ec93d3917213449)
Diffstat (limited to 'source4/pidl/tests')
-rwxr-xr-xsource4/pidl/tests/samba-ejs.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/pidl/tests/samba-ejs.pl b/source4/pidl/tests/samba-ejs.pl
index 350cba571c..39fc22329c 100755
--- a/source4/pidl/tests/samba-ejs.pl
+++ b/source4/pidl/tests/samba-ejs.pl
@@ -4,13 +4,13 @@
use strict;
use warnings;
-use Test::More tests => 13;
+use Test::More tests => 17;
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
- $res $res_hdr fn_declare);
+ $res $res_hdr fn_declare TypeFunctionName);
is("&foo", get_pointer_to("foo"));
is("&(&foo)", get_pointer_to(get_pointer_to("foo")));
@@ -40,3 +40,8 @@ $res_hdr = "";
fn_declare({ PROPERTIES => {} }, "mybla(int foo)");
is($res, "static mybla(int foo)\n");
is($res_hdr, "");
+
+is(TypeFunctionName("ejs_pull", "uint32"), "ejs_pull_uint32");
+is(TypeFunctionName("ejs_pull", {TYPE => "ENUM", NAME => "bar"}), "ejs_pull_ENUM_bar");
+is(TypeFunctionName("ejs_pull", {TYPE => "TYPEDEF", NAME => "bar", DATA => undef}), "ejs_pull_bar");
+is(TypeFunctionName("ejs_push", {TYPE => "STRUCT", NAME => "bar"}), "ejs_push_STRUCT_bar");