X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Frt_static_test.c;h=710c75e92038a505343b998b2904abe29d543937;hb=refs%2Fchanges%2F84%2F84%2F1;hp=26f81b77bf1d7be90164929d9033917bb861cc21;hpb=d710957ed5d73bf2da2ceea3f5a1a3c509275c30;p=ric-plt%2Flib%2Frmr.git diff --git a/test/rt_static_test.c b/test/rt_static_test.c index 26f81b7..710c75e 100644 --- a/test/rt_static_test.c +++ b/test/rt_static_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, @@ -228,5 +228,15 @@ static int rt_test( ) { } */ + state = uta_link2( "worm", NULL, NULL ); + errors += fail_if_true( state, "link2 did not return false when given nil pointers" ); + + state = uta_epsock_rr( rt, 122, 0, NULL, NULL ); + errors += fail_if_true( state, "uta_epsock_rr returned bad state when given nil socket pointer" ); + + rt = uta_rt_init( ); // get us a route table + state = uta_epsock_rr( rt, 0, -1, NULL, &nn_sock ); + errors += fail_if_true( state, "uta_epsock_rr returned bad state (true) when given negative group number" ); + return !!errors; // 1 or 0 regardless of count }