test alloca

git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4104 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
Minero Aoki 2008-12-07 15:58:04 +00:00
parent 76fd64dc52
commit 0defdae27a
2 changed files with 16 additions and 0 deletions

12
test/alloca.cb Normal file
View File

@ -0,0 +1,12 @@
import stdio;
import string;
import alloca;
int
main(void)
{
char* p = alloca(32);
strcpy(p, "Hello");
printf("<<%s>>\n", p);
return 0;
}

View File

@ -312,6 +312,10 @@ test_35_invalidstmt() {
assert_compile_success validstmt1.cb assert_compile_success validstmt1.cb
} }
test_36_alloca() {
assert_out "<<Hello>>" ./alloca
}
### ###
### Local Assertions ### Local Assertions
### ###