summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2010-07-07 05:24:31 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2010-07-07 05:24:31 +0200
commit712b073f95f694f23a070bd43cd0c9e7479142b7 (patch)
tree82eaa888eac197da5a772f4bb88a1be6b7bdba63 /test
parenta6a3c416c77d383f00a723ceb4545e89a2334923 (diff)
downloadeva-712b073f95f694f23a070bd43cd0c9e7479142b7.tar
eva-712b073f95f694f23a070bd43cd0c9e7479142b7.zip
Implemented most types, sending & receiving
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt6
-rw-r--r--test/Test.vala8
2 files changed, 13 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 2c11d3b..bad2b58 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,7 +1,13 @@
+add_definitions(${GEE_CFLAGS} ${GEE_CFLAGS_OTHER} ${GIO_CFLAGS} ${GIO_CFLAGS_OTHER} ${GIO_UNIX_CFLAGS} ${GIO_UNIX_CFLAGS_OTHER} ${ERL_CFLAGS} ${ERL_CFLAGS_OTHER})
+link_libraries(${GEE_LIBRARIES} ${GIO_LIBRARIES} ${GIO_UNIX_LIBRARIES} ${ERL_LIBRARIES})
+link_directories(${GEE_LIBRARY_DIRS} ${GIO_LIBRARY_DIRS} ${GIO_UNIX_LIBRARY_DIRS} ${ERL_LIBRARY_DIRS})
+
vala_precompile(TEST_C
Test.vala
PACKAGES
gee-1.0
+ gio-2.0
+ gio-unix-2.0
erl_interface
CUSTOM_VAPIS
${eva_BINARY_DIR}/src/eva.vapi
diff --git a/test/Test.vala b/test/Test.vala
index ce5da6d..5d71095 100644
--- a/test/Test.vala
+++ b/test/Test.vala
@@ -1,7 +1,13 @@
namespace Eva {
class Test {
public static int main(string[] args) {
- Eva.Long term = new Eva.Long(42);
+ MainLoop main = new MainLoop();
+
+ Eva.PacketHandler handler = new Eva.PacketHandler(new UnixInputStream(3, true), new UnixOutputStream(4, true), 4);
+ handler.received_term.connect((term) => {stdout.printf("%s\n", term.to_string()); handler.send(term); main.quit();});
+ handler.start();
+
+ main.run();
return 0;
}