bump product version to 5.0.4.1
[LibreOffice.git] / sal / qa / osl / socket / osl_Socket_tests.cxx
blob2262f40177b37403bb76a0a1d30263eb63db496a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 // include files
22 #include <sal/types.h>
23 #include <osl_Socket_Const.h>
25 #include <cppunit/TestFixture.h>
26 #include <cppunit/extensions/HelperMacros.h>
27 #include <cppunit/plugin/TestPlugIn.h>
28 #include <osl/socket.hxx>
30 // helper functions
32 // tests cases begins here
34 namespace osl_Socket
37 class tests : public CppUnit::TestFixture
39 public:
41 void test_001()
43 // _osl_getFullQualifiedDomainName( );
44 oslSocketResult aResult;
45 rtl::OUString suHostname = osl::SocketAddr::getLocalHostname(&aResult);
46 CPPUNIT_ASSERT_MESSAGE("getLocalHostname failed", aResult == osl_Socket_Ok);
49 CPPUNIT_TEST_SUITE( tests );
50 CPPUNIT_TEST( test_001 );
51 CPPUNIT_TEST_SUITE_END();
54 CPPUNIT_TEST_SUITE_REGISTRATION(osl_Socket::tests);
57 // this macro creates an empty function, which will called by the RegisterAllFunctions()
58 // to let the user the possibility to also register some functions by hand.
60 /*#if (defined LINUX)
62 void RegisterAdditionalFunctions( FktRegFuncPtr _pFunc )
64 // for cover lines in _osl_getFullQualifiedDomainName( )
65 // STAR_OVERRIDE_DOMAINNAME is more an internal HACK for 5.2, which should remove from sal
66 setenv( "STAR_OVERRIDE_DOMAINNAME", "PRC.Sun.COM", 0 );
69 #else*/
71 CPPUNIT_PLUGIN_IMPLEMENT();
73 //#endif
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */