summaryrefslogtreecommitdiff
path: root/test/libapt/stringview_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* Drop APT::StringViewнаб2025-02-141-99/+0
|
* Ensure we can build with APT_PKG_ABI > 601Julian Andres Klode2025-01-051-1/+4
| | | | | There were some references to APT::StringView that don't make much sense anymore.
* Fix expired std::string usage in APT::StringView testcaseDavid Kalnischkies2024-11-221-1/+2
| | | | | | | | The anonymous std::string we were using here to create the view expires after the construction of the view and so the gcc warning | warning: ‘<anonymous>’ may be used uninitialized [-Wmaybe-uninitialized] is correct in that the memory we are pointing to is potentially overridden/reused already, if a bit roundabout in saying so.
* build: test: Silence warnings in GTest codeJulian Andres Klode2024-04-201-1/+1
| | | | | GTest has a lot of broken things with signed vs unsigned, and double integer promotions, let's silence them.
* Avoid overstepping bounds in config file parsingDavid Kalnischkies2021-02-031-0/+8
| | | | | | | Our configuration files are not security relevant, but having a parser which avoids crashing on them even if they are seriously messed up is not a bad idea anyway. It is also a good opportunity to brush up the code a bit avoiding a few small string copies with our string_view.
* Make APT::StringView publicJulian Andres Klode2019-06-111-3/+0
|
* Prevent GTest from flooding us with compiler warningsDavid Kalnischkies2018-05-041-7/+7
| | | | | | | | | | | | | | GTest has a bunch of undefined macros which causes the compiler to spit out warnings for each one on each test file. There isn't much we can do, so we just disable the warning for the testcases. Other warnings like sign-promo and sign-compare we can avoid by being more explicit about our expected integer constants being unsigned. As we are just changing testcases, there is no user visible change which would deserve to be noted in the changelog. Gbp-Dch: Ignore Reported-By: gcc-8
* tests: don't do boundless string compares with data()David Kalnischkies2016-08-121-9/+11
| | | | Git-Dch: Ignore
* string_view: Drop constexpr constructor for standard compatibilityJulian Andres Klode2016-01-151-8/+8
| | | | | | | | | | | | | APT::StringView is supposed to be a temporary measure, until support for the standardized string_view is widely available. Introducing additional unstandardized features just makes porting to the standard version harder. The constexpr constructor also won't have any real effect on most systems, as the compiler will happily optimise the strlen() call away for constant strings. Gbp-Dch: ignore
* provide a constexpr char[] overload for APT::StringViewDavid Kalnischkies2016-01-151-0/+88
The commit also adds a few trivial tests Git-Dch: Ignore