1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 //------------------------------------------------------------------------
22 //------------------------------------------------------------------------
23 #include <sal/types.h>
24 #include <osl_Socket_Const.h>
26 #include <cppunit/TestFixture.h>
27 #include <cppunit/extensions/HelperMacros.h>
28 #include <cppunit/plugin/TestPlugIn.h>
29 #include <osl/socket.hxx>
30 //------------------------------------------------------------------------
32 //------------------------------------------------------------------------
34 //------------------------------------------------------------------------
35 // tests cases begins here
36 //------------------------------------------------------------------------
41 class tests
: public CppUnit::TestFixture
47 // _osl_getFullQualifiedDomainName( );
48 oslSocketResult aResult
;
49 rtl::OUString suHostname
= osl::SocketAddr::getLocalHostname(&aResult
);
50 CPPUNIT_ASSERT_MESSAGE("getLocalHostname failed", aResult
== osl_Socket_Ok
);
53 CPPUNIT_TEST_SUITE( tests
);
54 CPPUNIT_TEST( test_001
);
55 CPPUNIT_TEST_SUITE_END();
58 CPPUNIT_TEST_SUITE_REGISTRATION(osl_Socket::tests
);
62 // -----------------------------------------------------------------------------
64 // this macro creates an empty function, which will called by the RegisterAllFunctions()
65 // to let the user the possibility to also register some functions by hand.
69 void RegisterAdditionalFunctions( FktRegFuncPtr _pFunc )
71 // for cover lines in _osl_getFullQualifiedDomainName( )
72 // STAR_OVERRIDE_DOMAINNAME is more an internal HACK for 5.2, which should remove from sal
73 setenv( "STAR_OVERRIDE_DOMAINNAME", "PRC.Sun.COM", 0 );
78 CPPUNIT_PLUGIN_IMPLEMENT();
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */