Commit 0f4761e8 authored by Sergio Costas's avatar Sergio Costas

Added two tests for __crust_no_0__

parent 7e8ad6fc
......@@ -404,5 +404,11 @@ class Test(unittest.TestCase):
def testWhileCrustVarFine(self):
self._all_fine_test("unitest/test102.c")
def testWhileWithoutNoZero(self):
self._generic_test("unitest/test103.c",[ (crust.crust.MSG_ERROR,"Parameter {:d} when calling function '{:s}' at line {:d} isn't initialized",1,"function",15) ])
def testWhileWithNoZeroFine(self):
self._all_fine_test("unitest/test104.c")
if __name__ == '__main__':
unittest.main()
typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
void function(crust_t param);
void main(int b) {
crust_t param;
while(b) {
param = (crust_t) 1;
break;
}
function(param);
}
typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
void function(crust_t param);
void main(int b) {
crust_t param;
__crust_no_0__ while(b) {
param = (crust_t) 1;
break;
}
function(param);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment