[dia] New test-sizeof (atually just dump sizes)



commit 737387c7aa87d86567ce9837344f4a5ebedbe898
Author: Hans Breuer <hans breuer org>
Date:   Sat Aug 1 21:31:22 2009 +0200

    New test-sizeof (atually just dump sizes)

 tests/makefile.msc  |    3 ++-
 tests/test-sizeof.c |   27 +++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/tests/makefile.msc b/tests/makefile.msc
index b2f6cbf..d9b0099 100644
--- a/tests/makefile.msc
+++ b/tests/makefile.msc
@@ -15,7 +15,8 @@ DEFINES = -DHAVE_CONFIG_H
 
 TESTS = \
 	test-boundingbox.exe \
-	test-objects.exe
+	test-objects.exe \
+	test-sizeof.exe
 
 all :	$(TESTS)
 
diff --git a/tests/test-sizeof.c b/tests/test-sizeof.c
new file mode 100644
index 0000000..ab3a08c
--- /dev/null
+++ b/tests/test-sizeof.c
@@ -0,0 +1,27 @@
+/* not really a test but only an interactive check */
+
+#include "config.h"
+#include <stdio.h>
+
+#include "object.h"
+#include "connection.h"
+#include "element.h"
+#include "../objects/UML/class.h"
+
+int
+main (int argc, char** argv)
+{
+#define DUMP(o) g_print ("%s: %d\n", #o, sizeof(##o))
+
+  DUMP(DiaObject);
+  DUMP(Connection);
+  DUMP(Element);
+  DUMP(UMLClass);
+
+  DUMP(Handle);
+  DUMP(ConnectionPoint);
+
+#undef DUMP
+
+  return 0;
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]