1*87d2adbcSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*87d2adbcSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*87d2adbcSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*87d2adbcSAndrew Rist  * distributed with this work for additional information
6*87d2adbcSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*87d2adbcSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*87d2adbcSAndrew Rist  * "License"); you may not use this file except in compliance
9*87d2adbcSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*87d2adbcSAndrew Rist  *
11*87d2adbcSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*87d2adbcSAndrew Rist  *
13*87d2adbcSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*87d2adbcSAndrew Rist  * software distributed under the License is distributed on an
15*87d2adbcSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*87d2adbcSAndrew Rist  * KIND, either express or implied.  See the License for the
17*87d2adbcSAndrew Rist  * specific language governing permissions and limitations
18*87d2adbcSAndrew Rist  * under the License.
19*87d2adbcSAndrew Rist  *
20*87d2adbcSAndrew Rist  *************************************************************/
21*87d2adbcSAndrew Rist 
22*87d2adbcSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sal.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir //------------------------------------------------------------------------
28cdf0e10cSrcweir // include files
29cdf0e10cSrcweir //------------------------------------------------------------------------
30cdf0e10cSrcweir #include <osl_Socket_Const.h>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <testshl/simpleheader.hxx>
33cdf0e10cSrcweir #include <osl/socket.hxx>
34cdf0e10cSrcweir //------------------------------------------------------------------------
35cdf0e10cSrcweir // helper functions
36cdf0e10cSrcweir //------------------------------------------------------------------------
37cdf0e10cSrcweir 
38cdf0e10cSrcweir //------------------------------------------------------------------------
39cdf0e10cSrcweir // tests cases begins here
40cdf0e10cSrcweir //------------------------------------------------------------------------
41cdf0e10cSrcweir 
42cdf0e10cSrcweir namespace osl_Socket
43cdf0e10cSrcweir {
44cdf0e10cSrcweir 
45cdf0e10cSrcweir 	class tests : public CppUnit::TestFixture
46cdf0e10cSrcweir 	{
47cdf0e10cSrcweir 	public:
48cdf0e10cSrcweir 
49cdf0e10cSrcweir 		void test_001()
50cdf0e10cSrcweir             {
51cdf0e10cSrcweir                 // _osl_getFullQualifiedDomainName( );
52cdf0e10cSrcweir                 oslSocketResult aResult;
53cdf0e10cSrcweir                 rtl::OUString suHostname = osl::SocketAddr::getLocalHostname(&aResult);
54cdf0e10cSrcweir                 CPPUNIT_ASSERT_MESSAGE("getLocalHostname failed", aResult == osl_Socket_Ok);
55cdf0e10cSrcweir             }
56cdf0e10cSrcweir 
57cdf0e10cSrcweir 		CPPUNIT_TEST_SUITE( tests );
58cdf0e10cSrcweir 		CPPUNIT_TEST( test_001 );
59cdf0e10cSrcweir 		CPPUNIT_TEST_SUITE_END();
60cdf0e10cSrcweir     };
61cdf0e10cSrcweir 
62cdf0e10cSrcweir     CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Socket::tests, "osl_SocketTest");
63cdf0e10cSrcweir }
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 
66cdf0e10cSrcweir // -----------------------------------------------------------------------------
67cdf0e10cSrcweir 
68cdf0e10cSrcweir // this macro creates an empty function, which will called by the RegisterAllFunctions()
69cdf0e10cSrcweir // to let the user the possibility to also register some functions by hand.
70cdf0e10cSrcweir 
71cdf0e10cSrcweir /*#if (defined LINUX)
72cdf0e10cSrcweir 
73cdf0e10cSrcweir void RegisterAdditionalFunctions( FktRegFuncPtr _pFunc )
74cdf0e10cSrcweir {
75cdf0e10cSrcweir 	// for cover lines in _osl_getFullQualifiedDomainName( )
76cdf0e10cSrcweir 	// STAR_OVERRIDE_DOMAINNAME is more an internal HACK for 5.2, which should remove from sal
77cdf0e10cSrcweir 	setenv( "STAR_OVERRIDE_DOMAINNAME", "PRC.Sun.COM", 0 );
78cdf0e10cSrcweir }
79cdf0e10cSrcweir 
80cdf0e10cSrcweir #else*/
81cdf0e10cSrcweir 
82cdf0e10cSrcweir NOADDITIONAL;
83cdf0e10cSrcweir 
84cdf0e10cSrcweir //#endif
85