1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2012 - SCILAB ENTERPRISES - Simon GARESTE
4//
5//  This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- CLI SHELL MODE -->
8//
9msgerr = msprintf(gettext("%s: Wrong number of input argument(s): %d expected.\n"), "h5isGroup", 1);
10assert_checkerror("h5isGroup()",msgerr,77);
11assert_checkfalse(h5isGroup("42"));
12assert_checkfalse(h5isGroup(42));
13w = "testing";
14x = list(1, "hello");
15save(TMPDIR + "/w.sod", "w");
16save(TMPDIR + "/x.sod", "x");
17a = h5open(TMPDIR + "/w.sod", "r");
18assert_checkequal(h5isGroup(a),%F);
19assert_checkequal(h5isGroup(a.root),%T);
20assert_checkequal(h5isGroup(a.root.w),%F);
21assert_checkequal(h5isGroup(a.root.w.type),%F);
22h5close(a);
23b = h5open(TMPDIR + "/x.sod", "r");
24assert_checkequal(h5isGroup(b),%F);
25assert_checkequal(h5isGroup(b.root),%T);
26assert_checkequal(h5isGroup(b.root.x),%T);
27h5close(b);
28