blob: c8da41bf746270a1a590e8f276b7a74c2626f4e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
#include <Ice/Ice.h>
#include <Controller.h>
#include <TestHelper.h>
using namespace std;
using namespace Ice;
using namespace Test;
class Control final : public Test::TestHelper
{
public:
void run(int, char**) override;
};
void
Control::run(int argc, char** argv)
{
Ice::CommunicatorHolder communicator = initialize(argc, argv);
if(argc < 2)
{
ostringstream os;
os << "Usage: " << argv[0] << " proxy";
throw invalid_argument(os.str());
}
auto control = uncheckedCast<ControllerPrx>(communicator->stringToProxy(argv[1]));
control->stop();
}
DEFINE_TEST(Control)
|