Hey Gaetano,
2011/2/1 Gaetano Mendola <[email protected]>:
> I had the need to test two instances of my application (they share
> something behind
> the scene), as first shot instead to start two different threads and
> then create my application
> instance inside the thread body I did it that way.
Actually, the attached variant works (you cannot share an environment
with two applications).
Regards,
koen
#include <Wt/Test/WTestEnvironment>
#include <Wt/WApplication>
class CustomInterface : public Wt::WApplication {
public:
CustomInterface(const Wt::WEnvironment& env)
:Wt::WApplication(env)
{}
};
int main(int argc, char** argv) {
const Wt::Test::WTestEnvironment myEnv1;
CustomInterface myInterfaceA(myEnv1);
const Wt::Test::WTestEnvironment myEnv2;
CustomInterface myInterfaceB(myEnv2);
}
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest