[libcxx-commits] [libcxx] r357181 - [libc++] Remove unnecessary <iostream> #includes in tests
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 28 09:38:15 PDT 2019
Author: ldionne
Date: Thu Mar 28 09:38:15 2019
New Revision: 357181
URL: http://llvm.org/viewvc/llvm-project?rev=357181&view=rev
Log:
[libc++] Remove unnecessary <iostream> #includes in tests
Some tests #include <iostream> but they don't use anything from the
header. Those are probably artifacts of when the tests were developped.
Modified:
libcxx/trunk/test/libcxx/containers/unord/next_pow2.pass.cpp
libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp
libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp
libcxx/trunk/test/std/re/re.results/re.results.form/form2.pass.cpp
libcxx/trunk/test/std/re/re.results/re.results.form/form3.pass.cpp
libcxx/trunk/test/std/re/re.results/re.results.form/form4.pass.cpp
libcxx/trunk/test/std/strings/string.conversions/stold.pass.cpp
libcxx/trunk/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp
libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp
libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp
libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp
libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp
libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp
libcxx/trunk/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp
libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp
libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp
libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp
libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp
libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp
Modified: libcxx/trunk/test/libcxx/containers/unord/next_pow2.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/containers/unord/next_pow2.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/containers/unord/next_pow2.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/containers/unord/next_pow2.pass.cpp Thu Mar 28 09:38:15 2019
@@ -22,7 +22,6 @@
#include <unordered_map>
#include <cassert>
-#include <iostream>
bool
is_power_of_two(unsigned long n)
Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_iter_iter.pass.cpp Thu Mar 28 09:38:15 2019
@@ -13,7 +13,6 @@
#include <vector>
#include <algorithm>
#include <cassert>
-#include <iostream>
#include "test_macros.h"
#include "min_allocator.h"
#include "asan_testing.h"
Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/assign_size_value.pass.cpp Thu Mar 28 09:38:15 2019
@@ -13,7 +13,6 @@
#include <vector>
#include <algorithm>
#include <cassert>
-#include <iostream>
#include "min_allocator.h"
#include "asan_testing.h"
Modified: libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp Thu Mar 28 09:38:15 2019
@@ -8,7 +8,6 @@
#include <limits>
#include <sstream>
-#include <iostream>
#include <cassert>
#include <iostream>
Modified: libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp Thu Mar 28 09:38:15 2019
@@ -19,7 +19,6 @@
#include <cassert>
#include <streambuf>
#include <sstream>
-#include <iostream>
#include "test_iterators.h"
#include "test_macros.h"
Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.pconst/ctor_init_func.pass.cpp Thu Mar 28 09:38:15 2019
@@ -16,8 +16,6 @@
// piecewise_constant_distribution(initializer_list<result_type> bl,
// UnaryOperation fw);
-#include <iostream>
-
#include <random>
#include <cassert>
Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_func.pass.cpp Thu Mar 28 09:38:15 2019
@@ -15,8 +15,6 @@
// piecewise_linear_distribution(size_t nw, result_type xmin,
// result_type xmax, UnaryOperation fw);
-#include <iostream>
-
#include <random>
#include <cassert>
Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/ctor_init_func.pass.cpp Thu Mar 28 09:38:15 2019
@@ -16,8 +16,6 @@
// piecewise_linear_distribution(initializer_list<result_type> bl,
// UnaryOperation fw);
-#include <iostream>
-
#include <random>
#include <cassert>
Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp Thu Mar 28 09:38:15 2019
@@ -15,8 +15,6 @@
// template<class _URNG> result_type operator()(_URNG& g);
-#include <iostream>
-
#include <random>
#include <algorithm>
#include <vector>
Modified: libcxx/trunk/test/std/re/re.results/re.results.form/form2.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/re/re.results/re.results.form/form2.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/re/re.results/re.results.form/form2.pass.cpp (original)
+++ libcxx/trunk/test/std/re/re.results/re.results.form/form2.pass.cpp Thu Mar 28 09:38:15 2019
@@ -15,8 +15,6 @@
// format(OutputIter out, const basic_string<char_type, ST, SA>& fmt,
// regex_constants::match_flag_type flags = regex_constants::format_default) const;
-#include <iostream>
-
#include <regex>
#include <cassert>
Modified: libcxx/trunk/test/std/re/re.results/re.results.form/form3.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/re/re.results/re.results.form/form3.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/re/re.results/re.results.form/form3.pass.cpp (original)
+++ libcxx/trunk/test/std/re/re.results/re.results.form/form3.pass.cpp Thu Mar 28 09:38:15 2019
@@ -15,8 +15,6 @@
// format(const basic_string<char_type, ST, SA>& fmt,
// regex_constants::match_flag_type flags = regex_constants::format_default) const;
-#include <iostream>
-
#include <regex>
#include <cassert>
Modified: libcxx/trunk/test/std/re/re.results/re.results.form/form4.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/re/re.results/re.results.form/form4.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/re/re.results/re.results.form/form4.pass.cpp (original)
+++ libcxx/trunk/test/std/re/re.results/re.results.form/form4.pass.cpp Thu Mar 28 09:38:15 2019
@@ -14,8 +14,6 @@
// format(const char_type* fmt,
// regex_constants::match_flag_type flags = regex_constants::format_default) const;
-#include <iostream>
-
#include <regex>
#include <cassert>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/strings/string.conversions/stold.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/string.conversions/stold.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/string.conversions/stold.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/string.conversions/stold.pass.cpp Thu Mar 28 09:38:15 2019
@@ -16,8 +16,6 @@
// libc++abi.dylib and exceptions are not caught properly.
// XFAIL: with_system_cxx_lib=macosx10.7
-#include <iostream>
-
#include <string>
#include <cmath>
#include <cassert>
Modified: libcxx/trunk/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp Thu Mar 28 09:38:15 2019
@@ -13,7 +13,6 @@
#include <string_view>
#include <cassert>
-#include <iostream>
#include "test_macros.h"
Modified: libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp Thu Mar 28 09:38:15 2019
@@ -21,8 +21,6 @@
#include <cstdlib>
#include <cassert>
-#include <iostream>
-
std::mutex m;
typedef std::chrono::system_clock Clock;
Modified: libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp Thu Mar 28 09:38:15 2019
@@ -19,8 +19,6 @@
#include <cstdlib>
#include <cassert>
-#include <iostream>
-
std::recursive_mutex m;
typedef std::chrono::system_clock Clock;
Modified: libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp Thu Mar 28 09:38:15 2019
@@ -19,8 +19,6 @@
#include <cstdlib>
#include <cassert>
-#include <iostream>
-
std::timed_mutex m;
typedef std::chrono::system_clock Clock;
Modified: libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp Thu Mar 28 09:38:15 2019
@@ -21,8 +21,6 @@
#include <cstdlib>
#include <cassert>
-#include <iostream>
-
std::recursive_timed_mutex m;
typedef std::chrono::system_clock Clock;
Modified: libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp Thu Mar 28 09:38:15 2019
@@ -14,7 +14,6 @@
#include <memory>
#include <cassert>
#include <cstddef> // for std::max_align_t
-#include <iostream>
#include "test_macros.h"
#include "count_new.hpp"
Modified: libcxx/trunk/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp Thu Mar 28 09:38:15 2019
@@ -19,8 +19,6 @@
// Otherwise the value returned is unspecified.
// [Example: January - February == months{11}. âend example]
-extern "C" int printf(const char *, ...);
-
#include <chrono>
#include <type_traits>
#include <cassert>
@@ -42,8 +40,6 @@ constexpr bool testConstexpr()
return true;
}
-#include <iostream>
-
int main(int, char**)
{
using month = std::chrono::month;
Modified: libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp Thu Mar 28 09:38:15 2019
@@ -20,8 +20,6 @@
#include "test_macros.h"
-#include <iostream>
-
constexpr bool test_constexpr ()
{
std::chrono::year_month_day ym0{std::chrono::year{1234}, std::chrono::January, std::chrono::day{12}};
Modified: libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp Thu Mar 28 09:38:15 2019
@@ -27,8 +27,6 @@
#include "test_macros.h"
-#include <iostream>
-
constexpr bool testConstexprYears (std::chrono::year_month_day_last ymdl)
{
std::chrono::year_month_day_last ym1 = ymdl - std::chrono::years{10};
Modified: libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp Thu Mar 28 09:38:15 2019
@@ -23,7 +23,6 @@
#include "test_macros.h"
-#include <iostream>
constexpr bool testConstexprYears ()
{
Modified: libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp Thu Mar 28 09:38:15 2019
@@ -11,7 +11,7 @@
// class year_month_weekday_last;
// constexpr operator sys_days() const noexcept;
-// Returns: If ok() == true, returns a sys_days that represents the last weekday()
+// Returns: If ok() == true, returns a sys_days that represents the last weekday()
// of year()/month(). Otherwise the returned value is unspecified.
#include <chrono>
@@ -20,7 +20,6 @@
#include "test_macros.h"
-#include <iostream>
int main(int, char**)
{
@@ -41,21 +40,21 @@ int main(int, char**)
{ // Last Tuesday in Jan 1970 was the 27th
constexpr year_month_weekday_last ymwdl{year{1970}, January, weekday_last{Tuesday}};
constexpr sys_days sd{ymwdl};
-
+
static_assert(sd.time_since_epoch() == days{26}, "");
}
{ // Last Tuesday in Jan 2000 was the 25th
constexpr year_month_weekday_last ymwdl{year{2000}, January, weekday_last{Tuesday}};
constexpr sys_days sd{ymwdl};
-
+
static_assert(sd.time_since_epoch() == days{10957+24}, "");
}
{ // Last Tuesday in Jan 1940 was the 30th
constexpr year_month_weekday_last ymwdl{year{1940}, January, weekday_last{Tuesday}};
constexpr sys_days sd{ymwdl};
-
+
static_assert(sd.time_since_epoch() == days{-10958+29}, "");
}
Modified: libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp?rev=357181&r1=357180&r2=357181&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp Thu Mar 28 09:38:15 2019
@@ -22,7 +22,6 @@
#include "test_macros.h"
-#include <iostream>
constexpr bool testConstexprYears(std::chrono::year_month_weekday_last ym)
{
More information about the libcxx-commits
mailing list