diff options
| author | Stefan Boberg <[email protected]> | 2026-03-27 12:03:02 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-27 12:03:02 +0100 |
| commit | fa3b5090e94ee1386ca6ed6c4ddf886fa46dca54 (patch) | |
| tree | c574405fc12dd2af9fcb02353df10adb29587f6c /thirdparty/cpr/test/version_tests.cpp | |
| parent | idle deprovision in hub (#895) (diff) | |
| download | zen-fa3b5090e94ee1386ca6ed6c4ddf886fa46dca54.tar.xz zen-fa3b5090e94ee1386ca6ed6c4ddf886fa46dca54.zip | |
remove CPR HTTP client backend (#894)
CPR is no longer needed now that HttpClient has fully transitioned to raw libcurl. This removes the CPR library, its build integration, implementation files, and all conditional compilation guards, leaving curl as the sole HTTP client backend.
Diffstat (limited to 'thirdparty/cpr/test/version_tests.cpp')
| -rw-r--r-- | thirdparty/cpr/test/version_tests.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/thirdparty/cpr/test/version_tests.cpp b/thirdparty/cpr/test/version_tests.cpp deleted file mode 100644 index 4c589d298..000000000 --- a/thirdparty/cpr/test/version_tests.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include <cctype> -#include <cpr/cpr.h> -#include <cstddef> -#include <gtest/gtest.h> -#include <string> - - -TEST(VersionTests, StringVersionExists) { -#ifndef CPR_VERSION - EXPECT_TRUE(false); -#endif // CPR_VERSION -} - -TEST(VersionTests, StringVersionValid) { - EXPECT_TRUE(CPR_VERSION != nullptr); - std::string version = CPR_VERSION; - - // Check if the version string is: '\d+\.\d+\.\d+' - bool digit = true; - size_t dotCount = 0; - for (size_t i = 0; i < version.size(); i++) { - if (i == 0) { - EXPECT_TRUE(std::isdigit(version[i])); - } else if (digit) { - if (version[i] == '.') { - digit = false; - dotCount++; - continue; - } - } - EXPECT_TRUE(std::isdigit(version[i])); - digit = true; - } - EXPECT_EQ(dotCount, 2); -} - -TEST(VersionTests, VersionMajorExists) { -#ifndef CPR_VERSION_MAJOR - EXPECT_TRUE(false); -#endif // CPR_VERSION_MAJOR -} - -TEST(VersionTests, VersionMinorExists) { -#ifndef CPR_VERSION_MINOR - EXPECT_TRUE(false); -#endif // CPR_VERSION_MINOR -} - -TEST(VersionTests, VersionPatchExists) { -#ifndef CPR_VERSION_PATCH - EXPECT_TRUE(false); -#endif // CPR_VERSION_PATCH -} - -TEST(VersionTests, VersionNumExists) { -#ifndef CPR_VERSION_NUM - EXPECT_TRUE(false); -#endif // CPR_VERSION_NUM -} - - -int main(int argc, char** argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} |