Commit 4a9ba1e4 authored by Sergio Costas's avatar Sergio Costas

Added extra test

parent ed51f94c
......@@ -967,6 +967,9 @@ class Test(unittest.TestCase):
def test231SetGlobalToNullAfterUse(self):
self._generic_test("unitest/test231.c", [ (crust.crust.MSG_CRITICAL, "Trying to set to NOT_NULL the state of the already accessed global variable '{:s}' at line {:d}", "var1", 10) ])
def test232SetGlobalToNullInSeveralPaths(self):
if __name__ == '__main__':
typedef __crust__ unsigned char *crust_t;
crust_t var1;
void main(int p) {
if (p == 0) {
__crust_set_null__(var1); // this is allowed because we haven't accessed var1
} else {
__crust_set_not_null__(var1); // just ensuring that one execution path doesn't affect others
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