187d2adbcSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
387d2adbcSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
487d2adbcSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
587d2adbcSAndrew Rist  * distributed with this work for additional information
687d2adbcSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
787d2adbcSAndrew Rist  * to you under the Apache License, Version 2.0 (the
887d2adbcSAndrew Rist  * "License"); you may not use this file except in compliance
987d2adbcSAndrew Rist  * with the License.  You may obtain a copy of the License at
1087d2adbcSAndrew Rist  *
1187d2adbcSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
1287d2adbcSAndrew Rist  *
1387d2adbcSAndrew Rist  * Unless required by applicable law or agreed to in writing,
1487d2adbcSAndrew Rist  * software distributed under the License is distributed on an
1587d2adbcSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1687d2adbcSAndrew Rist  * KIND, either express or implied.  See the License for the
1787d2adbcSAndrew Rist  * specific language governing permissions and limitations
1887d2adbcSAndrew Rist  * under the License.
1987d2adbcSAndrew Rist  *
2087d2adbcSAndrew Rist  *************************************************************/
2187d2adbcSAndrew Rist 
2287d2adbcSAndrew 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 
32*63d99982SDamjan Jovanovic #include "gtest/gtest.h"
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 
45*63d99982SDamjan Jovanovic 	class tests : public ::testing::Test
46cdf0e10cSrcweir 	{
47cdf0e10cSrcweir 	public:
48cdf0e10cSrcweir     };
49cdf0e10cSrcweir 
TEST_F(tests,test_001)50*63d99982SDamjan Jovanovic     TEST_F(tests, test_001)
51*63d99982SDamjan Jovanovic         {
52*63d99982SDamjan Jovanovic             // _osl_getFullQualifiedDomainName( );
53*63d99982SDamjan Jovanovic             oslSocketResult aResult;
54*63d99982SDamjan Jovanovic             rtl::OUString suHostname = osl::SocketAddr::getLocalHostname(&aResult);
55*63d99982SDamjan Jovanovic             ASSERT_TRUE(aResult == osl_Socket_Ok) << "getLocalHostname failed";
56*63d99982SDamjan Jovanovic         }
57cdf0e10cSrcweir }
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 
60cdf0e10cSrcweir // -----------------------------------------------------------------------------
61cdf0e10cSrcweir 
62cdf0e10cSrcweir // this macro creates an empty function, which will called by the RegisterAllFunctions()
63cdf0e10cSrcweir // to let the user the possibility to also register some functions by hand.
64cdf0e10cSrcweir 
65cdf0e10cSrcweir /*#if (defined LINUX)
66cdf0e10cSrcweir 
67cdf0e10cSrcweir void RegisterAdditionalFunctions( FktRegFuncPtr _pFunc )
68cdf0e10cSrcweir {
69cdf0e10cSrcweir 	// for cover lines in _osl_getFullQualifiedDomainName( )
70cdf0e10cSrcweir 	// STAR_OVERRIDE_DOMAINNAME is more an internal HACK for 5.2, which should remove from sal
71cdf0e10cSrcweir 	setenv( "STAR_OVERRIDE_DOMAINNAME", "PRC.Sun.COM", 0 );
72cdf0e10cSrcweir }
73cdf0e10cSrcweir 
74cdf0e10cSrcweir #else*/
75cdf0e10cSrcweir 
main(int argc,char ** argv)76*63d99982SDamjan Jovanovic int main(int argc, char **argv)
77*63d99982SDamjan Jovanovic {
78*63d99982SDamjan Jovanovic     ::testing::InitGoogleTest(&argc, argv);
79*63d99982SDamjan Jovanovic     return RUN_ALL_TESTS();
80*63d99982SDamjan Jovanovic }
81cdf0e10cSrcweir 
82cdf0e10cSrcweir //#endif
83