From 9b585b48d826ba0e035a73cb5e9673c975c04821 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 2 Feb 2010 00:18:19 +0000 Subject: 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 --- test/atom_test.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/atom_test.cpp (limited to 'test') 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; +} + -- cgit v1.2.1