From fb8197839c0bebc20fd68ee3f280da934c49c473 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 22 Dec 2017 21:16:02 +0000 Subject: Removing editor and refactoring code. --- tests/active/test.cpp | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/active/test.cpp (limited to 'tests/active/test.cpp') diff --git a/tests/active/test.cpp b/tests/active/test.cpp new file mode 100644 index 00000000..3d561283 --- /dev/null +++ b/tests/active/test.cpp @@ -0,0 +1,46 @@ +/** --------------------------------------------------------------------------- + * @file: activetest.cpp + * + * Copyright (c) 2017 Yann Herklotz Grave + * MIT License, see LICENSE file for more details. + * ---------------------------------------------------------------------------- + */ + +#include + +#include + +using namespace yage; + +void print_random() +{ + std::cout << "hello world" + << "\n"; +} + +void print_h() +{ + std::cout << "Helllllllo" + << "\n"; +} + +void flush() +{ + std::cout << "flush" << std::endl; +} + +int main() +{ + auto a = Active::create(); + + a->send(print_random); + a->send(print_h); + a->send(flush); + + std::cout << std::endl; + + for (int i = 0; i < 1000000; i++) { + } + + std::cout << std::endl; +} -- cgit