Fixed up testing etc

This commit is contained in:
Nathan Braswell
2015-01-09 14:28:07 -05:00
parent ad0e90f74a
commit 9e9b4371da
54 changed files with 16 additions and 6 deletions

27
tests/test_memTest.krak Normal file
View File

@@ -0,0 +1,27 @@
import mem:*;
import io:*;
typedef AnObject {
|int| a;
|int| b;
|char*| c;
|void| print() {
print(a+b);
print("\n");
print(c);
print("\n");
}
};
|int| main() {
|AnObject*| ptr = new<AnObject>();
ptr->a = 4;
ptr->b = 7;
ptr->c = "Hello decent memory! Quite a nice feeling\n";
ptr->print();
delete<AnObject>(ptr);
return 0;
}