Commit Graph

246 Commits (78b7a05426c15e346254c395a7da88c67d5560cb)

Author SHA1 Message Date
Martin Kojtal b9927e5f27
Merge pull request #8795 from TeemuKultala/cellular_connect_status_fix
cellular: registration status change fix
2018-11-30 14:32:34 +01:00
deepikabhavnani c272377a81 Make sure no memory overhead if statistics are disabled 2018-11-26 09:42:45 -06:00
deepikabhavnani 117eb0bc87 Add socketstats stub functions for unittest and addressed reviews 2018-11-26 09:42:50 -06:00
Teemu Kultala af534f592e cellular: registration status change astyle fix 2018-11-26 11:20:21 +02:00
Teemu Kultala a1b1d7c4bd cellular: registration status change fix 2018-11-26 11:20:21 +02:00
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
Teppo Järvelin 24213b4601 astyles fixes for UNITESTS. 2018-11-16 13:14:38 +02:00
Teppo Järvelin e5c3024849 Cellular: adding unit tests for new class CellularContext and changed classes. 2018-11-16 13:14:38 +02:00
Martin Kojtal 3f289c217f unittest: fix stubs coding style 2018-11-15 10:47:14 +00:00
Martin Kojtal 53c427735c filehandle test: fix coding style 2018-11-15 07:20:12 +00:00
Anna Bridge 4d07bcbd6e
Merge pull request #8579 from jarvte/cellular_context
Major refactoring: changing Network inheritance from CellularNetwork to new class CellularContext
2018-11-14 14:37:19 +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
Teppo Järvelin 1a047efade Cellular: review fixes, added missing fixes from master. 2018-11-11 14:13:05 +02:00
Teppo Järvelin 9fb83024ea Changed CellularContext to inherit from CellularBase instead of NetworkInterface. \n Changed Device constructor to take Filehandle instead of eventqueue. 2018-11-11 14:13:05 +02:00
Teppo Järvelin 43e08a0adf Cellular: fixing unit test after refactor. 2018-11-11 14:12:49 +02:00
Mirela Chirica c8f2ed3d30 Cellular: ATHandler to reset match URC generated errors and continue response handling 2018-10-29 13:33:11 +02:00
Mirela Chirica f016d1126f Cellular: AT handler to support only one callback per URC/prefix 2018-10-29 13:32:15 +02:00
Martin Kojtal 6efa4f293c unittest: fix style for empty functions 2018-10-25 09:58:19 +01:00
Martin Kojtal 3a5ef5ee24 unittests: fix astyle 2018-10-25 09:58:18 +01:00
Kimmo Vaisanen 963bf8146d Cellular: Refactor basic AT command stop and response reading into own method
This reduces ROM usage by few hundred bytes.
2018-10-22 09:44:12 +03:00
Hasnain Virk 9c3f73b8ed Unit test fix for cancel_send()
PR 8299 went in but correct unit tests were not there.
This commit is adding proper unittests for 8299.
2018-10-16 19:14:51 +03:00
Hasnain Virk 3bfef7f43f Unit Test Fixes for LoRaWAN
Missing methods are added.
Logic was broken at various places which needed to be fixed.
2018-10-16 12:23:21 +03:00
Kevin Bracey 1ef213ec89 Clean up Thread deprecation warnings
Static Thread methods and signal methods have been deprecated. Remove
all references in the main code, and most of the tests. Some tests of
the deprecated APIs themselves remain.
2018-10-12 14:57:13 +03:00
Mirela Chirica ffb9cdb4b3 Cellular: Registration parameters as struct 2018-10-09 10:49:47 +03:00
Cruz Monrreal b15d09173e
Merge pull request #8315 from kivaisan/fix_cellular_unittests
Fix cellular unittests
2018-10-08 10:24:31 -05:00
Kimmo Vaisanen b57bc3d044 Cellular: Fix ATHandler_stub compiler warnings 2018-10-03 14:46:45 +03:00
Antti Kauppila 48e2ccd006 equeue_stub updated and code fixed accordingly 2018-09-27 12:26:48 +03:00
Antti Kauppila f6ecb319d0 LoRaMac unittested 2018-09-27 11:30:52 +03:00
Antti Kauppila bd9066431f LoRaWANStack unit tested 2018-09-27 11:30:52 +03:00
Antti Kauppila e07940d5e7 LoRaMacCrypto unittested 2018-09-27 10:49:07 +03:00
Antti Kauppila f3d402f70e LoRaPHY unittested, small fixed done during tests 2018-09-27 10:49:07 +03:00
Antti Kauppila 0f8cfd8631 LoRa regions unittested, stubs licences revisited 2018-09-27 10:49:07 +03:00
Antti Kauppila b6848c4ea4 Unit test for LorawanInterface 2018-09-27 10:49:07 +03:00
Antti Kauppila 595caf6699 LorawanInterface unit test added 2018-09-27 10:49:07 +03:00
Antti Kauppila 0f83f08043 More lorawan unit tests added 2018-09-27 10:49:07 +03:00
Antti Kauppila b6465340b5 Lorawan unittests 2018-09-27 10:49:07 +03:00
Michal Paszta 72233b01dd unittests: Add tests for NetworkStack class.
Improved the stubs for event queue and nsapi_dns, to allow checking if callback are handled correctly. This involves some memory allocation and deallocation.
The NetworkStackWrapper is not covered as it seems to be deprecated code.
2018-09-21 14:23:06 +03: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
Antti Kauppila 4f97eaee67 CellularDevice_stub added 2018-09-19 10:30:43 +03:00
Antti Kauppila 2b7a087849 Rebased & fixed 2018-09-17 12:07:43 +03:00
Antti Kauppila a6b4938844 Small improvements for test cases 2018-09-17 12:07:43 +03:00
Antti Kauppila adc4ce4385 Old Cellular UNITTESTS removed 2018-09-17 12:07:43 +03:00
Antti Kauppila 9f9aa4a210 cellular unittests ported to googletest framework 2018-09-17 12:07:43 +03:00
Lari-Matias Orjala 4b042271d6 fix mutex stub for unit tests 2018-09-05 13:41:35 +03:00
Lari-Matias Orjala 4dde13db6d Add unit testing framework 2018-08-27 14:32:35 +03:00