summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-02 00:18:19 +0000
committerDavid Robillard <d@drobilla.net>2010-02-02 00:18:19 +0000
commit9b585b48d826ba0e035a73cb5e9673c975c04821 (patch)
tree03e2bc99fc89eefd2c72b0fd78befacffd4b9d6f /test
parentae780b14c88cbbfab06a11ae7213a713eac89959 (diff)
downloadraul-9b585b48d826ba0e035a73cb5e9673c975c04821.tar.gz
raul-9b585b48d826ba0e035a73cb5e9673c975c04821.tar.bz2
raul-9b585b48d826ba0e035a73cb5e9673c975c04821.zip
Make sizeof(Raul::Atom) the size of a pointer.
Accomplished by wrapping up blob stuff in a separately allocated object so all Atoms don't pay the size penalty. Bump version to 0.6.2 and ABI version to 5,0,0. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2403 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'test')
-rw-r--r--test/atom_test.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/atom_test.cpp b/test/atom_test.cpp
new file mode 100644
index 0000000..5174600
--- /dev/null
+++ b/test/atom_test.cpp
@@ -0,0 +1,22 @@
+#include "raul/Atom.hpp"
+
+using namespace std;
+using namespace Raul;
+
+int
+main()
+{
+ static const size_t buf_size = 9;
+ char buf[buf_size] = "atomtest";
+
+
+ Atom nil_atom();
+ Atom int_atom(42);
+ Atom float_atom(42.0f);
+ Atom bool_atom(true);
+ Atom string_atom("hello");
+ Atom blob_atom("http://example.org/atomtype", buf_size, buf);
+
+ return 0;
+}
+