aboutsummaryrefslogtreecommitdiff
path: root/tests/hello_world_loop.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-12 18:27:53 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-12 18:27:53 -0800
commitdb37551c793b6ecbef610f00fe4b6018e1e54b21 (patch)
tree60c6c4bda46265a7993a3ecb264c7070d426b2fa /tests/hello_world_loop.cpp
parent7782c8cd4e7b186f0cbd5e78cf5ee4e843d82565 (diff)
additional -s emcc tests
Diffstat (limited to 'tests/hello_world_loop.cpp')
-rw-r--r--tests/hello_world_loop.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/hello_world_loop.cpp b/tests/hello_world_loop.cpp
index 02241ff1..3ab717e3 100644
--- a/tests/hello_world_loop.cpp
+++ b/tests/hello_world_loop.cpp
@@ -2,6 +2,12 @@
#include<string.h>
#include<stdlib.h>
+extern "C" {
+ void dump(char *s) {
+ puts(s);
+ }
+}
+
int main() {
char *original = (char*)"h e l l o , w o r l d ! ";
char *copy = (char*)malloc(strlen(original));
@@ -9,7 +15,7 @@ int main() {
copy[i/2] = original[i];
}
copy[strlen(copy)+1] = (int)&original; // force original to be on the stack
- puts(copy);
+ dump(copy);
return 1;
}