aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test.c')
-rw-r--r--test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test.c b/test.c
index c7e7f5c..988b352 100644
--- a/test.c
+++ b/test.c
@@ -7,6 +7,7 @@ typedef struct {
} IntVec;
IntVec* test();
+int testtwo(IntVec*);
int main() {
IntVec* v = test();
@@ -22,5 +23,20 @@ int main() {
int value = inner[i];
printf("%d ", value);
}
+ puts("\n\n");
+
+ testtwo(v);
+
+ size = (*v).size;
+ cap = (*v).cap;
+ inner = (*v).inner;
+
+ printf("%d\n", size);
+ printf("%d\n", cap);
+
+ for (int i = 0; i < size; ++i) {
+ int value = inner[i];
+ printf("%d ", value);
+ }
puts("\n");
}