1 /*=========================================================================
2 
3   Library:   CTK
4 
5   Copyright (c) Kitware Inc.
6 
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10 
11       http://www.apache.org/licenses/LICENSE-2.0.txt
12 
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18 
19 =========================================================================*/
20 
21 // QT includes
22 #include <QtGlobal>
23 
24 // CTK includes
25 #include "ctkSingletonTestHelper.h"
26 
27 // STD includes
28 #include <cstdlib>
29 #include <iostream>
30 
31 //-----------------------------------------------------------------------------
ctkSingletonTest1(int argc,char * argv[])32 int ctkSingletonTest1(int argc, char * argv [] )
33 {
34   Q_UNUSED(argc);
35   Q_UNUSED(argv);
36 
37   if (!ctkSingletonTestHelper::instance())
38     {
39     std::cerr << "Problem with ctkSingletonTestHelper::instance()" << std::endl;
40     return EXIT_FAILURE;
41     }
42   ctkSingletonTestHelper::instance()->registerNorthFace();
43   ctkSingletonTestHelper::instance()->registerNorthFace();
44   if (ctkSingletonTestHelper::instance()->northFaceCount() != 2)
45     {
46     std::cerr << "Problem with ctkSingletonTestHelper" << std::endl;
47     return EXIT_FAILURE;
48     }
49   return EXIT_SUCCESS;
50 }
51 
52