Commit Graph

11 Commits (1e625e2a54ba6f62f9ab50e3037354e32b51ce40)

Author SHA1 Message Date
adbridge 3aa8d7f906 Revert "Use the parsing status as a way to detect if the IP string represent a valid IPv6 address"
This reverts commit 99aa1dca0a.
This has been moved to 5.11
2018-11-05 12:36:59 +00:00
Michal Paszta e1887a7738 TCPSocket accept refactored to close cleanly and icetea test added
Private constructor called in TCPSocket accept, when creating a new Socket.
Close() method calls moved "up" to InternetSocket.
InternetSocket::close() returns proper error code when no socket available.
Add TcpSocket::accept icetea tests.
Deleting sockets moved to teardown.
2018-11-02 19:49:59 -05:00
Taiki 99aa1dca0a Use the parsing status as a way to detect if the IP string represent a valid IPv6 address 2018-11-02 19:49:54 -05:00
Sławek Piotrowski 50dd1eb950 Fix hard-fault when socket created using accept() is closed
When socket created  using accept() is closed by calling the close()
method, "delete this" is executed which triggers the destructor call
on TCPSocket which in turn calls close() once again. Because _stack
is already 0 this results in a hard-fault.

Add a check that skips the rest of the close() method is the _stack
is already 0.
2018-10-19 11:46:55 +01:00
Michal Paszta 8c72bd5c0b unittests: Added tests for netsocket classes
New classes covered with unit tests: SocketAddress, EthernetInterface, EMACInterface, WiFiAccessPoint.
Also added missing namespace in front of mbed::Callback usages.
EMACInterface is covered by the EthernetInterface unit tests.
2018-10-19 11:46:55 +01:00
Michal Paszta 77fc6a0347 unittests: InternetSocket class coverage improved.
Added more tests, improved the existing ones. setblocking tests were not checking anything, so they were removed and these functions are called in TCPSocket tests instead.
2018-10-08 15:18:50 +01:00
Lari-Matias Orjala b6b331f94d add auto-naming of unit test suites 2018-10-08 15:18:50 +01:00
Antti Kauppila fc97b2aca0 Rebased & fixed 2018-10-08 15:18:50 +01:00
Seppo Takalo b1ebb42d6b Fix SocketAddress unittests
Add ip4tos() and stoip4() into unittests.
NOTE: Probably should have been stubbed but this way we can also
test these helper functions.
2018-09-17 21:42:55 -05:00
Brian Daniels c2f6de6dbe Moving all unit tests to use hyphenated test name 2018-09-17 21:42:55 -05:00
Lari-Matias Orjala 4dde13db6d Add unit testing framework 2018-08-27 14:32:35 +03:00