Commit de0217f2 authored by Sergio Costas's avatar Sergio Costas

Two extra tests for the case when a crust pointer is used in a comparison "alone"

parent d3da5bf3
......@@ -976,6 +976,12 @@ class Test(unittest.TestCase):
def test234CompareWithCrustPointerAlone2(self):
self._all_fine_test("unitest/test234.c")
def test235CompareWithCrustPointerAlone3(self):
self._generic_test("unitest/test235.c", [ (crust.crust.MSG_ERROR, "Memory block '{:s}', initialized at line {:d}, is still in use at exit point in line {:d}", "p", 5, 10) ])
def test236CompareWithCrustPointerAlone4(self):
self._generic_test("unitest/test236.c", [ (crust.crust.MSG_ERROR, "Memory block '{:s}', initialized at line {:d}, is still in use at exit point in line {:d}", "p", 5, 12) ])
if __name__ == '__main__':
try:
os.remove("error_list.txt")
......
typedef __crust__ unsigned char *crust_t;
void function(crust_t);
void main(crust_t p) {
if (!p) {
function(p);
}
}
typedef __crust__ unsigned char *crust_t;
void function(crust_t);
void main(crust_t p) {
if (p) {
int a = 5;
} else {
function(p);
}
}
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