* 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:
Minero Aoki 2008-12-07 08:08:29 +00:00
parent 1524d3d719
commit b469db1b82
3 changed files with 15 additions and 1 deletions

11
test/decloverride2.cb Normal file
View File

@ -0,0 +1,11 @@
import stdio;
import decloverride2;
int f(void) { return 77; }
int
main(void)
{
printf("%d\n", f());
return 0;
}

2
test/decloverride2.hb Normal file
View File

@ -0,0 +1,2 @@
extern int f(void);
extern int f(void);

View File

@ -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