diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2014-08-09 00:01:05 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-08-09 13:00:58 +1000 |
| commit | edc9191921a9ef8ff8438a10b5f315ae9190e48c (patch) | |
| tree | ee5731df5eda2b73d0d522c864fe2b6ef604aade /src/librustuv/lib.rs | |
| parent | c3284733e3effa92cff2f87b7a38c27ac781411e (diff) | |
| download | rust-edc9191921a9ef8ff8438a10b5f315ae9190e48c.tar.gz rust-edc9191921a9ef8ff8438a10b5f315ae9190e48c.zip | |
testsuite: implement #[reexport_test_harness_name] to get access to the
default entrypoint of the --test binary. This allows one to, e.g., run tests under libgreen by starting it manually, passing in the test entrypoint.
Diffstat (limited to 'src/librustuv/lib.rs')
| -rw-r--r-- | src/librustuv/lib.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/librustuv/lib.rs b/src/librustuv/lib.rs index 24b8c297858..dd80ab3ee78 100644 --- a/src/librustuv/lib.rs +++ b/src/librustuv/lib.rs @@ -48,6 +48,8 @@ via `close` and `delete` methods. #![deny(unused_result, unused_must_use)] #![allow(visible_private_types)] +#![reexport_test_harness_main = "test_main"] + #[cfg(test)] extern crate green; #[cfg(test)] extern crate debug; #[cfg(test)] extern crate realrustuv = "rustuv"; @@ -76,13 +78,9 @@ pub use self::timer::TimerWatcher; pub use self::tty::TtyWatcher; // Run tests with libgreen instead of libnative. -// -// FIXME: This egregiously hacks around starting the test runner in a different -// threading mode than the default by reaching into the auto-generated -// '__test' module. #[cfg(test)] #[start] fn start(argc: int, argv: *const *const u8) -> int { - green::start(argc, argv, event_loop, __test::main) + green::start(argc, argv, event_loop, test_main) } mod macros; |
