Author: Wim Lavrijsen <[email protected]>
Branch: reflex-support
Changeset: r56244:d988ba734507
Date: 2012-07-19 23:26 -0700
http://bitbucket.org/pypy/pypy/changeset/d988ba734507/
Log: add needed test files for io tests
diff --git a/pypy/module/cppyy/test/iotypes.cxx
b/pypy/module/cppyy/test/iotypes.cxx
new file mode 100644
--- /dev/null
+++ b/pypy/module/cppyy/test/iotypes.cxx
@@ -0,0 +1,7 @@
+#include "iotypes.h"
+
+const IO::Floats_t& IO::SomeDataObject::get_floats() { return m_floats; }
+const IO::Tuples_t& IO::SomeDataObject::get_tuples() { return m_tuples; }
+
+void IO::SomeDataObject::add_float(float f) { m_floats.push_back(f); }
+void IO::SomeDataObject::add_tuple(const std::vector<float>& t) {
m_tuples.push_back(t); }
diff --git a/pypy/module/cppyy/test/iotypes.h b/pypy/module/cppyy/test/iotypes.h
new file mode 100644
--- /dev/null
+++ b/pypy/module/cppyy/test/iotypes.h
@@ -0,0 +1,28 @@
+#include <vector>
+
+namespace IO {
+
+typedef std::vector<float> Floats_t;
+typedef std::vector<std::vector<float> > Tuples_t;
+
+class SomeDataObject {
+public:
+ const Floats_t& get_floats();
+ const Tuples_t& get_tuples();
+
+public:
+ void add_float(float f);
+ void add_tuple(const std::vector<float>& t);
+
+private:
+ Floats_t m_floats;
+ Tuples_t m_tuples;
+};
+
+struct SomeDataStruct {
+ Floats_t Floats;
+ char Label[3];
+ int NLabel;
+};
+
+} // namespace IO
diff --git a/pypy/module/cppyy/test/iotypes.xml
b/pypy/module/cppyy/test/iotypes.xml
new file mode 100644
--- /dev/null
+++ b/pypy/module/cppyy/test/iotypes.xml
@@ -0,0 +1,3 @@
+<lcgdict>
+<!-- empty -->
+</lcgdict>
diff --git a/pypy/module/cppyy/test/iotypes_LinkDef.h
b/pypy/module/cppyy/test/iotypes_LinkDef.h
new file mode 100644
--- /dev/null
+++ b/pypy/module/cppyy/test/iotypes_LinkDef.h
@@ -0,0 +1,16 @@
+#ifdef __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+using namespace std;
+#pragma link C++ class vector<vector<float> >+;
+#pragma link C++ class vector<vector<float> >::iterator;
+#pragma link C++ class vector<vector<float> >::const_iterator;
+
+#pragma link C++ namespace IO;
+#pragma link C++ class IO::SomeDataObject+;
+#pragma link C++ class IO::SomeDataStruct+;
+
+#endif
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit