diff options
| author | Michael Bebenita <[email protected]> | 2010-09-10 01:21:29 -0700 |
|---|---|---|
| committer | Michael Bebenita <[email protected]> | 2010-09-10 14:38:31 -0700 |
| commit | a493350eb5ab38ba8a6563f3eb4a090d257b0d3a (patch) | |
| tree | dc984eaa28a55de9f05db0b961a0e67f80ca35ef /src/rt/test/rust_test_runtime.h | |
| parent | Added lock_and_signal::signal_all(), and made the rust_kernel::join() use wai... (diff) | |
| download | rust-a493350eb5ab38ba8a6563f3eb4a090d257b0d3a.tar.xz rust-a493350eb5ab38ba8a6563f3eb4a090d257b0d3a.zip | |
Cleanup, refactoring, and some runtime tests.
Diffstat (limited to 'src/rt/test/rust_test_runtime.h')
| -rw-r--r-- | src/rt/test/rust_test_runtime.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/rt/test/rust_test_runtime.h b/src/rt/test/rust_test_runtime.h new file mode 100644 index 00000000..8d4f38ec --- /dev/null +++ b/src/rt/test/rust_test_runtime.h @@ -0,0 +1,51 @@ +#include "../rust_internal.h" + +#ifndef RUST_TEST_RUNTIME_H +#define RUST_TEST_RUNTIME_H + +class rust_test_runtime { +public: + rust_test_runtime(); + virtual ~rust_test_runtime(); +}; + + +class rust_domain_test : public rust_test { +public: + class worker : public rust_thread { + public: + rust_kernel *kernel; + worker(rust_kernel *kernel) : kernel(kernel) { + // Nop. + } + void run(); + }; + bool run(); + const char *name() { + return "rust_domain_test"; + } +}; + +class rust_task_test : public rust_test { +public: + rust_test_suite *suite; + rust_task_test(rust_test_suite *suite) : suite(suite) { + // Nop. + } + class worker : public rust_thread { + public: + rust_kernel *kernel; + rust_task_test *parent; + worker(rust_kernel *kernel, rust_task_test *parent) : + kernel(kernel), parent(parent) { + // Nop. + } + void run(); + }; + bool run(); + const char *name() { + return "rust_task_test"; + } +}; + +#endif /* RUST_TEST_RUNTIME_H */ |