|
@@ -88,54 +88,72 @@ L_TEST3: //update using array tests
|
|
|
.@succes = 0;
|
|
|
|
|
|
setarray .@item[0], 512,513,514,515;
|
|
|
- setarray .@count[0], 1,5,9,12;
|
|
|
+ setarray .@count[0], 1,5,9,12;
|
|
|
.@ret = checkweight2(.@item,.@count);
|
|
|
set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be sucess
|
|
|
+
|
|
|
cleararray .@item[0], 0, 4;
|
|
|
cleararray .@count[0], 0, 4;
|
|
|
setarray .@item[0], 512,513,514,515;
|
|
|
- setarray .@count[0], 1,5,-1,12;
|
|
|
+ setarray .@count[0], 1,5,-1,12;
|
|
|
.@ret = checkweight2(.@item,.@count);
|
|
|
set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, invalide amout
|
|
|
+
|
|
|
cleararray .@item[0], 0, 4;
|
|
|
cleararray .@count[0], 0, 4;
|
|
|
setarray .@item[0], 512,513,514,-1;
|
|
|
- setarray .@count[0], 1,5,15,12;
|
|
|
+ setarray .@count[0], 1,5,15,12;
|
|
|
.@ret = checkweight2(.@item,.@count);
|
|
|
set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, invalide id
|
|
|
+
|
|
|
cleararray .@item[0], 0, 4;
|
|
|
cleararray .@count[0], 0, 4;
|
|
|
setarray .@item[0], 717,715,716,714;
|
|
|
- setarray .@count[0], 300,300,300,300;
|
|
|
+ setarray .@count[0], 300,300,300,300;
|
|
|
.@ret = checkweight2(.@item,.@count);
|
|
|
set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, total by weight
|
|
|
+
|
|
|
cleararray .@item[0], 0, 4;
|
|
|
cleararray .@count[0], 0, 4;
|
|
|
setarray .@item[0], 6320,6320;
|
|
|
- setarray .@count[0], 31000,2000;
|
|
|
+ setarray .@count[0], 31000,2000;
|
|
|
.@ret = checkweight2(.@item,.@count);
|
|
|
set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, total by weight
|
|
|
+
|
|
|
cleararray .@item[0], 0, 2;
|
|
|
cleararray .@count[0], 0, 2;
|
|
|
setarray .@item[0], 2794,2795;
|
|
|
- setarray .@count[0], 95,5;
|
|
|
+ setarray .@count[0], 95,5;
|
|
|
.@ret = checkweight2(.@item,.@count);
|
|
|
set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success
|
|
|
- setarray .@count[0], 95,10;
|
|
|
+
|
|
|
+ setarray .@count[0], 95,10;
|
|
|
.@ret = checkweight2(.@item,.@count);
|
|
|
set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure overamount item
|
|
|
+
|
|
|
cleararray .@item[0], 0, 2;
|
|
|
cleararray .@count[0], 0, 2;
|
|
|
setarray .@item[0], 6320,6320,512;
|
|
|
- setarray .@count[0], 1,3;
|
|
|
+ setarray .@count[0], 1,3;
|
|
|
.@ret = checkweight2(.@item,.@count);
|
|
|
set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, size mistmatch
|
|
|
+
|
|
|
cleararray .@item[0], 0, 3;
|
|
|
cleararray .@count[0], 0, 2;
|
|
|
- setarray .@item[0], 6320,6320;
|
|
|
- setarray .@count[0], 1,3,5;
|
|
|
+ setarray .@item[0], 6320,6321;
|
|
|
+ setarray .@count[0], 1,3,5;
|
|
|
+ .@ret = checkweight2(.@item,.@count);
|
|
|
+ set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, size mistmatch
|
|
|
+
|
|
|
+ set .@weight_limit, MaxWeight;
|
|
|
+ set MaxWeight, 4294967296 - 1; //currently maxweight is stored as uint32 (2^32-1)
|
|
|
+ cleararray .@item[0], 0, 2;
|
|
|
+ cleararray .@count[0], 0, 3;
|
|
|
+ setarray .@item[0], 714;
|
|
|
+ setarray .@count[0], 300;
|
|
|
.@ret = checkweight2(.@item,.@count);
|
|
|
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, size mistmatch
|
|
|
+ set MaxWeight, .@weight_limit;
|
|
|
+ set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success, (test weight over 65k)
|
|
|
|
|
|
|
|
|
debugmes "End update by array tests";
|