Commit Graph

9 Commits

Author SHA1 Message Date
Ryan Prichard
2bb1ca205d Improve RemoteWorker and Event ctors.
* Allow creating a RemoteWorker object without spawning a new worker.
   It can be used like so:

   {
       Worker w(Worker::DoNotSpawn);
       if (...) {
           w = ...;
       } else {
           w = ...;
       }
   }

 * Remove the weird RemoteWorker(std::string) ctor.  The computation of the
   worker name should be inside the ctor.

 * It now becomes possible to initialize a RemoteWorker using syntax like:
      Worker w({ true, 0 });
   However, these are still ambiguous:
      Worker w({})  // could be move-init from a default-init Worker
      Worker w({1}) // could be move-init from a Worker(SpawnParams{1})

 * Make the Event ctor explicit.  The SpawnParams ctor needs to be
   non-explicit so it can be used with the braced initializer list.
2015-10-23 23:26:59 -05:00
Ryan Prichard
0264277bcd Move more things from tests into the test harness. 2015-10-22 18:39:33 -05:00
Ryan Prichard
fb7a19c4f1 Split TestCommon -> Remote{Worker,Handle} and add TestCommon.h uber-header
* TestCommon.h is a convenience header for the test cases.  It aliases
   Remote{Worker,Handle} back to {Worker,Handle}, and it includes many
   basic C/C++ headers, as well as the parts of the harness suitable for
   test cases.
2015-10-22 18:16:47 -05:00
Ryan Prichard
fdeb2e5cb5 Add a comment to TestHandleInheritance 2015-10-22 17:34:06 -05:00
Ryan Prichard
2b7df627eb Expand the Test_AttachConsole_And_CreateProcess_Inheritance test a little 2015-10-22 03:18:46 -05:00
Ryan Prichard
a697017eb7 Allow Worker user to override CREATE_NEW_CONSOLE; reduce verbosity 2015-10-22 03:18:46 -05:00
Ryan Prichard
cb1341b0ef Add a test for GetConsoleTitleW 2015-10-21 19:56:12 -05:00
Ryan Prichard
3575c55c8c Expand console handle testing for XP through Windows 7.
* The tests are mostly wrong for Windows 8 and up.
2015-10-21 19:56:06 -05:00
Ryan Prichard
3bf4703f6a Add tests of screen buffer handles. 2015-10-19 23:32:08 -05:00