summaryrefslogtreecommitdiff
path: root/cpp/test/Slice/macros/Client.cpp
blob: 4ca23172398a9cfd25c29bef3313f03f6cdb4bb1 (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
36
37
38
39
// **********************************************************************
//
// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

#include <Ice/Ice.h>
#include <TestCommon.h>
#include <Test.h>

using namespace Test;
using namespace std;

int
main(int argc, char* argv[])
{
    int status = EXIT_SUCCESS;
    try
    {
        cout << "testing Slice predefined macros... " << flush;
        DefaultPtr d = new Default();
        test(d->x == 10);
        test(d->y == 10);

        CppOnlyPtr c = new CppOnly();
        test(c->lang == "cpp");
        test(c->version == ICE_INT_VERSION);
        cout << "ok" << endl;
    }
    catch(const Ice::Exception& ex)
    {
        cerr << ex << endl;
        status = EXIT_FAILURE;
    }
    return status;
}