Commit Graph

7 Commits (400fd82972f8dbfaedb78ffabcee32bfe1f8a550)

Author SHA1 Message Date
Seppo Takalo bdc355f873 Astyle fixes 2018-11-19 15:31:31 +02:00
Michal Paszta 392bccf835 Add unit tests for TLSSocket and TLSSocketWrapper
This also includes their Datagram counterparts: DTLSSocket and DTLSSocketWrapper.
Coverage missing for timer-related functionality, but this would require more advanced stub development.
The extra (d)tls_test_config.h is necessary for successful compilation without HW support for the mbedtls features in unittests.
I reused the mbedtls stub found in features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c and amended it slightly with a few missing functions.
2018-11-19 15:19:49 +02:00
Martin Kojtal 3f289c217f unittest: fix stubs coding style 2018-11-15 10:47:14 +00:00
Seppo Takalo 619bcb5b4e Implement Socket::getpeername() API
This is equivalent of POSIX getpeername() function. It allows to
get remote address associated with the socket.
For example:
socket *s = server.accept();
SocketAddress remote;
s->getpeername(&remote);
2018-11-13 11:02:51 +02:00
Martin Kojtal 3a5ef5ee24 unittests: fix astyle 2018-10-25 09:58:18 +01:00
Michal Paszta 5a74481a2a unittests: improved coverage for UDPSocket and TCPSocket
Add functional and line coverage for UDPSocket and TCPSocket. The EventFlagsstub and NetworkStackstub classes are allowed to store multiple return values to allow running internal loops multiple times.
2018-09-21 14:23:05 +03:00
Lari-Matias Orjala 4dde13db6d Add unit testing framework 2018-08-27 14:32:35 +03:00