summaryrefslogtreecommitdiff
path: root/test/tcpnsockstream_test.cpp
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-06 10:05:16 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-11-06 10:05:16 +0100
commit91434613c7355fd3a4901bf3a27cc74825db5a86 (patch)
treecf8897c9abbb7fae594736bee92db5adf8da8714 /test/tcpnsockstream_test.cpp
parent8645a7dc4e5f7dd614661b21b551aa18039fe452 (diff)
parent1473b84ceed2be98006bf0e9e7a0487dfa42f034 (diff)
Merge tag 'upstream/1.0.0'
Upstream version 1.0.0
Diffstat (limited to 'test/tcpnsockstream_test.cpp')
-rw-r--r--test/tcpnsockstream_test.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/tcpnsockstream_test.cpp b/test/tcpnsockstream_test.cpp
index 028832f..1cad1e7 100644
--- a/test/tcpnsockstream_test.cpp
+++ b/test/tcpnsockstream_test.cpp
@@ -187,14 +187,20 @@ void tcpnsockstream_test::test_accept_addr() {
void tcpnsockstream_test::test_bind_addr_fail() {
// tcp socket stream
- tcpnsockstream ss;
+ tcpnsockstream ss, ssf;
// network address to bind to
- nsockaddr naddr( NSOCK_NODE, NSOCK_BIND_SERVICE );
+ nsockaddr naddr( NSOCK_NODE, NSOCK_BIND_SERVICE + 1 );
+
+ try {
+ ss.bind( &naddr, true );
+ } catch ( sockexception &e ) {
+ CPPUNIT_FAIL( e.what() );
+ return;
+ }
// bind - this should fail with address already in use error
- // because of test_accept_addr()
- CPPUNIT_ASSERT_THROW( ss.bind( &naddr ), sockexception );
+ CPPUNIT_ASSERT_THROW( ssf.bind( &naddr ), sockexception );
}