Commit 6e0a0992 authored by Sergio Costas's avatar Sergio Costas

Added comments to the tests

Fixed 135 so it doesn't generate an error
parent c1a7cbde
......@@ -669,10 +669,10 @@ class Test(unittest.TestCase):
self._generic_test("unitest/test133.c", [ (crust.crust.MSG_ERROR, "Memory block '{:s}', initialized at line {:d}, is still in use at exit point at line {:d}", "param", 12, 21) ])
def test134ReturnCrustExpectCrust(self):
lib = self._all_fine_test("unitest/test134.c")
self._all_fine_test("unitest/test134.c")
def test135ReturnNoCrustExpectNoCrust(self):
self._generic_test("unitest/test135.c", [ (crust.crust.MSG_ERROR, "Memory block '{:s}', initialized at line {:d}, is still in use at exit point at line {:d}", "param", 5, 7) ])
self._all_fine_test("unitest/test135.c")
def test136ReturnCrustExpectNoCrust(self):
self._generic_test("unitest/test136.c", [ (crust.crust.MSG_ERROR, "Return statement at line {:d} is returning a crust value, but is must return a non-crust one", 7) ])
......
......@@ -4,5 +4,5 @@ typedef __crust_t__ unsigned char *crust_t;
crust_t main(crust_t param) {
return param;
return param; // All fine: expects a crust value, and a crust value is returned
}
......@@ -2,7 +2,7 @@ typedef __crust_t__ unsigned char *crust_t;
#define NULL ((void *)0)
int main(crust_t param) {
int main(int param) {
return 0;
return param; // All fine: expects a non-crust value, and a non-crust value is returned
}
......@@ -4,5 +4,5 @@ typedef __crust_t__ unsigned char *crust_t;
int main(crust_t param) {
return param;
return param; // Error: expects a non-crust value, but a crust value is returned
}
......@@ -4,5 +4,5 @@ typedef __crust_t__ unsigned char *crust_t;
crust_t main(int param) {
return param;
return param; // Error: expects a crust value, but a non-crust value is returned
}
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