@@ -14,7 +14,7 @@ END_TEST
14
14
START_TEST ( test_filesize2datablocks )
15
15
{
16
16
static const struct testdata_s {
17
- int fsize ,
17
+ unsigned fsize ,
18
18
result488 ,
19
19
result512 ;
20
20
} testdata [] = {
@@ -36,7 +36,7 @@ START_TEST ( test_filesize2datablocks )
36
36
for ( unsigned i = 0 ; i < ntests ; ++ i ) {
37
37
//ck_assert_int_eq ( filesize2datablocks ( testdata[i].fsize, 488 ),
38
38
// testdata[i].result488 );
39
- int dblocks = filesize2datablocks ( testdata [i ].fsize , 488 );
39
+ unsigned dblocks = filesize2datablocks ( testdata [i ].fsize , 488 );
40
40
ck_assert_msg ( dblocks == testdata [i ].result488 ,
41
41
"datablocks incorrect: %d, expected %d, blocksize %d" ,
42
42
dblocks , testdata [i ].result488 , testdata [i ].fsize );
@@ -55,8 +55,8 @@ END_TEST
55
55
START_TEST ( test_datablocks2extblocks )
56
56
{
57
57
static const struct testdata_s {
58
- int datablocks ,
59
- result ;
58
+ unsigned datablocks ,
59
+ result ;
60
60
} testdata [] = {
61
61
{ 0 , 0 },
62
62
{ 1 , 0 },
@@ -69,7 +69,7 @@ START_TEST ( test_datablocks2extblocks )
69
69
};
70
70
static const unsigned ntests = sizeof ( testdata ) / sizeof ( struct testdata_s );
71
71
for ( unsigned i = 0 ; i < ntests ; ++ i ) {
72
- int extblocks = datablocks2extblocks ( testdata [i ].datablocks );
72
+ unsigned extblocks = datablocks2extblocks ( testdata [i ].datablocks );
73
73
ck_assert_msg ( extblocks == testdata [i ].result ,
74
74
"ext. blocks incorrect: %d, expected %d, datablocks %d" ,
75
75
extblocks , testdata [i ].result , testdata [i ].datablocks );
@@ -81,7 +81,7 @@ END_TEST
81
81
START_TEST ( test_filesize2blocks )
82
82
{
83
83
static const struct testdata_s {
84
- int fsize ,
84
+ unsigned fsize ,
85
85
result488 ,
86
86
result512 ;
87
87
} testdata [] = {
@@ -115,7 +115,7 @@ START_TEST ( test_filesize2blocks )
115
115
};
116
116
static const unsigned ntests = sizeof ( testdata ) / sizeof ( struct testdata_s );
117
117
for ( unsigned i = 0 ; i < ntests ; ++ i ) {
118
- int nblocks = filesize2blocks ( testdata [i ].fsize , 488 );
118
+ unsigned nblocks = filesize2blocks ( testdata [i ].fsize , 488 );
119
119
ck_assert_msg ( nblocks == testdata [i ].result488 ,
120
120
"blocks incorrect: %d, expected %d, blocksize %d" ,
121
121
nblocks , testdata [i ].result488 , testdata [i ].fsize );
@@ -132,8 +132,8 @@ END_TEST
132
132
START_TEST ( test_datablocks2posInExtBlk )
133
133
{
134
134
static const struct testdata_s {
135
- int datablock_idx ,
136
- result ;
135
+ unsigned datablock_idx ,
136
+ result ;
137
137
} testdata [] = {
138
138
//{ 0, -1 },
139
139
//{ 1, -1 },
@@ -163,7 +163,7 @@ START_TEST ( test_datablocks2posInExtBlk )
163
163
};
164
164
static const unsigned ntests = sizeof ( testdata ) / sizeof ( struct testdata_s );
165
165
for ( unsigned i = 0 ; i < ntests ; ++ i ) {
166
- int posInExtBlk = datablock2posInExtBlk ( testdata [i ].datablock_idx );
166
+ unsigned posInExtBlk = datablock2posInExtBlk ( testdata [i ].datablock_idx );
167
167
ck_assert_msg ( posInExtBlk == testdata [i ].result ,
168
168
"pos in ext. block incorrect: %d, expected %d, datablocks %d" ,
169
169
posInExtBlk , testdata [i ].result , testdata [i ].datablock_idx );
0 commit comments