Add proper catch2 support:
- add catch2 as a submodule
- add cmake function to add test easily
- discover each test in test binary
- remove copies of catch.hpp
- do not try to process tests for rt1051
Do not test internals of utf8, only public interface (nasty bugs could
occur otherwise).
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Introduced format aware phone number comparison to allow improved
matching phone numbers with contacts.
Phone numbers are also displayed formatted on a phonebook/calllog
list view and on detailed contact info view.
Entered and e164 number are verified to match each other during
processing db request.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Convert utf8 tests which were written with gtest help to catch2
framework.
Fix broken index operator test (index operator decodes to UTF-32).
Remove dead gtest dependency
Fix empty calllog title when number comes in national format. The
problem was caused by:
1. making assumption that every number from cellular network comes in
e164 format which is not true,
2. using e164 number when looking for contact matching calllog entry
without checking if e164 exists for calllog entry.
Fix problem by:
a.d.1 - replacing `PhoneNumber::viewFromE164` with less strict
`PhoneNumber::Parse` method which basically is a convenience method
which creates `PhoneNumber` entity and uses it to create a `View`.
a.d.2 - instead of fetching e164 directly introduce `getNonEmpty` method
of a View, which returns e164 number if it is present and entered number
otherwise.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Bugs:
- invalid number validation
- no `const` qualifier in comparison operators
- lack of comparison operator for PhoneNumber::View
Add appropriate unit tests.
* VFS: support .boot.ini and "current" and "previous" os types
* fixes for first batch of comments
- moved crc32 functions to a seperate file
- changed naming of constant with _
- removed one magic number
- crc methods now cross platform
* using smart pointer for buffer management
* created a simple USER_FILE macro for database names
* removed commented-out code
* style fixes
* Updated crc32 version
* Update module-vfs/vfs-utils.cpp
Co-Authored-By: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
* Update module-vfs/vfs-utils.cpp
Co-Authored-By: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
* renamed USER_FILE to USER_PATH macro, this was also
bromen and was returning incorrect paths, std::filesystem::path
behavior is causing these issues.
* VFS: remove method changed
* fixed path for assets copy
* UNITTEST: vfs test fixed
* VFS: changed computeCRC32 return type to void
* Max supported partition to 2 (was 1)
* EOL in vfs.cpp
* nullptr check in computeCRC32
include for log.hpp fixed
* flash_eMMC merged properly
* CRC32 commit update
* testBuild
* fix newline at start of smsdb.cpp
removed test from cmake
* no user/ folder on the root of emmc causes sqlite3 to fault
this adds a create empty user call for rt1051
* flash script fixes
- do not use build-*/sys
- common.sh contains a static list of iles that land on the flash
Co-authored-by: Alek Rudnik <54846206+alekrudnik@users.noreply.github.com>
Use specialized class to to pass phone number between apps and services
instead of ambigious std::string. Introduced class (utils::PhoneNumber)
wraps calls to libphonenumber providing more convienient interface.
However using libphonenumber directly may be resource hungry in terms
of stack, heap and cpu usage, so helper class has been introduced to
pass information about phone numbers (utils::PhoneNumber::View). It is
designed to maintain integrity thus can be created from an instance of
utils::PhoneNumber only or moved/copied to.
Add new field to the calllog db holding e164 formatted number. Both
entered and e164 numbers will be needed to be able to match with
contacts correctly.
Add constexpr information about country codes (utils::country).
Add thread safety based on the RTOS wrapper and FreeRTOS mutex. The
mutex protects regexp cache only so additional safety on regexp level is
needed.
Add method to get currently running thread - needed by thread checker
class in libphonenumber.
Add libphonumber support:
- no thread safety support (disabled mutexes, etc.)
- use re2 regexes instead of ICU's
- don't normalize utf8 decimals - use ASCII decimals only
* [GED-2539] Timestamp : changed buffer to heap one
[EGD-2539] implemented 1st version of Duration class
[EGD-2539] added autoformating of the output
[EGD-2539] clean up
[EGD-2539] used duration in call and calllog
added Duration operators
[EGD-2539] add better duartions to calllog.db
[EGD-2539] format file
* [EGD-2539] fixes after rebase
* [EGD-2539] displayed format follows design guidline
* [EGD-2539] added UT for duration class and necessary FW fixes
* [EGD-2539] fixed tim_conversion UT
* [EGD-2539] PR fixes
* [EGD-2539] added move constructor to UTF8 class
* [EGD-2539] added checking for nullptr in fillContactData
* [EGD-2539] PR fixes