line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
# Some simple tests for pidl |
3
|
|
|
|
|
|
|
# (C) 2005 Jelmer Vernooij |
4
|
|
|
|
|
|
|
# Published under the GNU General Public License |
5
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
2871
|
use Test::More tests => 8; |
|
1
|
|
|
|
|
22411
|
|
|
1
|
|
|
|
|
11
|
|
8
|
1
|
|
|
1
|
|
1400
|
use FindBin qw($RealBin); |
|
1
|
|
|
|
|
1153
|
|
|
1
|
|
|
|
|
338
|
|
9
|
1
|
|
|
1
|
|
959
|
use lib "$RealBin/../lib"; |
|
1
|
|
|
|
|
833
|
|
|
1
|
|
|
|
|
7
|
|
10
|
1
|
|
|
1
|
|
155
|
use lib "$RealBin"; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
11
|
1
|
|
|
1
|
|
846
|
use Util qw(test_samba4_ndr); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
test_samba4_ndr("simple", "void Test(); ", |
14
|
|
|
|
|
|
|
" |
15
|
|
|
|
|
|
|
uint8_t data[] = { 0x02 }; |
16
|
|
|
|
|
|
|
uint8_t result; |
17
|
|
|
|
|
|
|
DATA_BLOB b; |
18
|
|
|
|
|
|
|
struct ndr_pull *ndr; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
b.data = data; |
21
|
|
|
|
|
|
|
b.length = 1; |
22
|
|
|
|
|
|
|
ndr = ndr_pull_init_blob(&b, mem_ctx); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
if (NT_STATUS_IS_ERR(ndr_pull_uint8(ndr, NDR_SCALARS, &result))) |
25
|
|
|
|
|
|
|
return 1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
if (result != 0x02) |
28
|
|
|
|
|
|
|
return 2; |
29
|
|
|
|
|
|
|
"); |