X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Ftools_test.c;fp=test%2Ftools_test.c;h=eac19a6de2c08e109b5e62789612e96432f72447;hb=8790bf0c4f4f08fd05853afa67e211112b344a42;hp=a29c0e253b5571d9c614805ed65ad302599b661c;hpb=ae8e63b75e4c5e754c1f3c2d4a600100a05225a0;p=ric-plt%2Flib%2Frmr.git diff --git a/test/tools_test.c b/test/tools_test.c index a29c0e2..eac19a6 100644 --- a/test/tools_test.c +++ b/test/tools_test.c @@ -1,14 +1,14 @@ // : vi ts=4 sw=4 noet : /* ================================================================================== - Copyright (c) 2019 Nokia - Copyright (c) 2018-2019 AT&T Intellectual Property. + Copyright (c) 2019 Nokia + Copyright (c) 2018-2019 AT&T Intellectual Property. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -55,10 +55,10 @@ struct uta_ctx { route_table_t* new_rtable; // route table under construction if_addrs_t* ip_list; // list manager of the IP addresses that are on our known interfaces void* mring; // ring where msgs are queued while waiting for a call response msg - + char* rtg_addr; // addr/port of the route table generation publisher int rtg_port; // the port that the rtg listens on - + wh_mgt_t* wormholes; // management of user opened wormholes //epoll_stuff_t* eps; // epoll information needed for the rcv with timeout call @@ -80,7 +80,7 @@ int main( ) { uta_ctx_t ctx; // context for uta_lookup test void* if_list; - + // ------------------ tokenise tests ----------------------------------------------------------- dbuf = strdup( buf ); i = uta_tokenise( dbuf, tokens, 127, ',' ); @@ -106,7 +106,7 @@ int main( ) { j = uta_has_str( buf, "Mrs. Slate", ',', 27 ); errors += fail_if_true( j >= 0, "has string not found Mrs. Slate" ); - + // ------------ host name 2 ip tests --------------------------------------------------------- hname = uta_h2ip( "192.168.1.2" ); errors += fail_not_equal( strcmp( hname, "192.168.1.2" ), 0, "h2ip did not return IP address when given address" ); @@ -121,7 +121,7 @@ int main( ) { // ------------ rtg lookup test ------------------------------------------------------------- ctx.rtg_port = 0; ctx.rtg_addr = NULL; - + i = uta_lookup_rtg( NULL ); // ensure it handles a nil context errors += fail_if_true( i, "rtg lookup returned that it found something when not expected to (nil context)" );