Commit 97c2a599 authored by Sergio Costas's avatar Sergio Costas

Removed extra __crust_disable__ statements in the unitests

parent 8cd6ce58
......@@ -296,7 +296,7 @@ class Test(unittest.TestCase):
self._all_fine_test("unitest/test60.c")
def test061IfWithNot2(self):
self._generic_test("unitest/test61.c", [ (crust.crust.MSG_ERROR, "Assignment to '{:s}' at line {:d}, which was already assigned at line {:d}", "param", 9, 5) ])
self._generic_test("unitest/test61.c", [ (crust.crust.MSG_ERROR, "Assignment to '{:s}' at line {:d}, which was already assigned at line {:d}", "param", 11, 7) ])
def test062Return(self):
self._all_fine_test("unitest/test62.c")
......
......@@ -5,5 +5,4 @@ int function(crust_t);
void main {
crust_t param4;
int retval = function(param4); // ERROR: param4 is used before being assigned
//__crust_disable__ // added here to ensure only one error per unitest
}
......@@ -2,10 +2,14 @@ typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
void main(crust_t __crust_borrow__ param) {
void function(crust_t __crust_borrow__);
void function2(crust_t);
void main() {
crust_t var2 = (crust_t) 5;
main(var2); // This is legal
function(var2); // This is legal
__crust_debug__
__crust_disable__ // added here to ensure only one error per unitest
function2(var2);
}
......@@ -2,9 +2,11 @@ typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
void main(crust_t __crust_borrow__ param) {
void function(crust_t __crust_borrow__);
void main() {
crust_t var2 = NULL;
main(var2); // This is legal
function(var2); // This is legal
__crust_debug__
}
......@@ -10,6 +10,6 @@ void main(crust_t param) {
main(param);
} else {
main(param); // all is legal
main(var2);
}
__crust_disable__ // added here to ensure only one error per unitest
}
......@@ -2,11 +2,15 @@ typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
void function(crust_t);
void main(crust_t param) {
crust_t var2 = (crust_t) 5;
if (!(param == NULL)) {
param = var2; // ERROR: param is not NULL
function(param);
} else {
function(var2);
}
__crust_disable__ // added here to ensure only one error per unitest
}
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