diff options
| author | Billy O'Neal <bion@microsoft.com> | 2021-02-04 10:15:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-04 10:15:44 -0800 |
| commit | aa60b7efa56a83ead743718941d8b320ef4a05af (patch) | |
| tree | db9f9ebd6fa37598b2f5f2ad564eb858cdeddcb0 /toolsrc/src/vcpkg-test/chrono.cpp | |
| parent | f226416d2eafc495dd03572cb61542fb1670ffdc (diff) | |
| download | vcpkg-aa60b7efa56a83ead743718941d8b320ef4a05af.tar.gz vcpkg-aa60b7efa56a83ead743718941d8b320ef4a05af.zip | |
[vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (#15474)
This reduces bootstrap cost for Windows customers, resolving the issue initially submitted as #12502 .
The `toolsrc` tree was extracted to https://github.com/microsoft/vcpkg-tool. `bootstrap.sh` was changed to download the right source tarball, extract, and build it. This was chosen over the previous attempt, a submodule, over concerns of accidentally destroying people's local modifications.
Diffstat (limited to 'toolsrc/src/vcpkg-test/chrono.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg-test/chrono.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/toolsrc/src/vcpkg-test/chrono.cpp b/toolsrc/src/vcpkg-test/chrono.cpp deleted file mode 100644 index fb8a0dee9..000000000 --- a/toolsrc/src/vcpkg-test/chrono.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include <catch2/catch.hpp> - -#include <vcpkg/base/chrono.h> - -namespace Chrono = vcpkg::Chrono; - -TEST_CASE ("parse time", "[chrono]") -{ - auto timestring = "1990-02-03T04:05:06.0Z"; - auto maybe_time = Chrono::CTime::parse(timestring); - - REQUIRE(maybe_time.has_value()); - REQUIRE(maybe_time.get()->to_string() == timestring); -} - -TEST_CASE ("parse blank time", "[chrono]") -{ - auto maybe_time = Chrono::CTime::parse(""); - - REQUIRE_FALSE(maybe_time.has_value()); -} - -TEST_CASE ("difference of times", "[chrono]") -{ - auto maybe_time1 = Chrono::CTime::parse("1990-02-03T04:05:06.0Z"); - auto maybe_time2 = Chrono::CTime::parse("1990-02-10T04:05:06.0Z"); - - REQUIRE(maybe_time1.has_value()); - REQUIRE(maybe_time2.has_value()); - - auto delta = maybe_time2.get()->to_time_point() - maybe_time1.get()->to_time_point(); - - REQUIRE(std::chrono::duration_cast<std::chrono::hours>(delta).count() == 24 * 7); -} |
