mirror of https://github.com/aamine/cbc
test alloca
git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4104 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
parent
76fd64dc52
commit
0defdae27a
|
@ -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;
|
||||||
|
}
|
|
@ -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
|
||||||
###
|
###
|
||||||
|
|
Loading…
Reference in New Issue