mirror of https://github.com/aamine/cbc
* test: test declaration override (error path).
git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4097 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
parent
1524d3d719
commit
b469db1b82
|
@ -0,0 +1,11 @@
|
|||
import stdio;
|
||||
import decloverride2;
|
||||
|
||||
int f(void) { return 77; }
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
printf("%d\n", f());
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
extern int f(void);
|
||||
extern int f(void);
|
|
@ -237,6 +237,7 @@ test_25_block() {
|
|||
assert_out "1;2;3;1;OK" ./block
|
||||
assert_out "1;2;3" ./defvar
|
||||
assert_out "77" ./decloverride
|
||||
assert_compile_error decloverride2.cb
|
||||
}
|
||||
|
||||
test_26_funcptr() {
|
||||
|
@ -363,7 +364,7 @@ assert_compile_success() {
|
|||
|
||||
assert_compile_error() {
|
||||
shunit_begin_test
|
||||
if eval "$CBC $@" >tc.out 2>&1
|
||||
if "$CBC" "$@" >tc.out 2>&1
|
||||
then
|
||||
echo "shunit[$@]: compile error not occured"
|
||||
shunit_test_failed
|
||||
|
|
Loading…
Reference in New Issue