[svn-r16217] Bug fix

PG compiler complains about array out of bounds (a rank of zero was not checked)
Adding a scalar dataset to the test generator program. this case is run on a previous existing run, the case was added to 2 existing files

Tested: windows, linux
This commit is contained in:
Pedro Vicente Nunes 2008-12-23 09:56:13 -05:00
parent 1448a3e8bb
commit 5b7de16d6a
6 changed files with 2100 additions and 2010 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
dataset: </refreg> and </refreg>
Referenced dataset 10272 10272
Referenced dataset 10720 10720
------------------------------------------------------------
Region blocks
block #0 (2,2)-(7,7) (0,0)-(2,2)

View File

@ -32,6 +32,7 @@ file1 file2
x x /g1/reference
x x /g1/reference2D
x x /g1/reference3D
x x /g1/scalar
x x /g1/string
x x /g1/string2D
x x /g1/string3D
@ -687,6 +688,12 @@ position difference
[ 0 ] 1 0 1
[ 1 ] 2 0 2
48 differences found
dataset: </g1/scalar> and </g1/scalar>
size: H5S_SCALAR H5S_SCALAR
position scalar scalar difference
------------------------------------------------------------
2 1 1
1 differences found
dataset: </g1/string> and </g1/string>
size: [2] [2]
position string string difference
@ -854,7 +861,7 @@ position vlen3D vlen3D difference
[ 3 2 1 ] 59 0 59
59 differences found
dataset: </refreg> and </refreg>
Referenced dataset 10272 10272
Referenced dataset 10720 10720
------------------------------------------------------------
Region blocks
block #0 (2,2)-(7,7) (0,0)-(2,2)

View File

@ -209,13 +209,17 @@ hsize_t diff_array( void *_mem1,
/* get the size. */
size = H5Tget_size( m_type );
acc[rank-1]=1;
for(j=(rank-2); j>=0; j--)
if ( rank > 0 )
{
acc[j]=acc[j+1]*dims[j+1];
acc[rank-1]=1;
for(j=(rank-2); j>=0; j--)
{
acc[j]=acc[j+1]*dims[j+1];
}
for ( j = 0; j < rank; j++)
pos[j]=0;
}
for ( j = 0; j < rank; j++)
pos[j]=0;
if(H5Tis_variable_str(m_type))
{
@ -5573,6 +5577,10 @@ void print_pos( int *ph, /* print header */
}
parallel_print("]" );
}
else
{
parallel_print(" ");
}
}
/*-------------------------------------------------------------------------