]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/duration/literals/values.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / duration / literals / values.cc
index f55c32f024059bc1c86983770539380a7d341d71..b12ab472c2abf8172f3f0120068fc382a640a7db 100644 (file)
@@ -1,7 +1,6 @@
-// { dg-do run }
-// { dg-options "-std=gnu++1y" }
+// { dg-do run { target c++14 } }
 
-// Copyright (C) 2013-2014 Free Software Foundation, Inc.
+// Copyright (C) 2013-2024 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -56,6 +55,12 @@ test03()
   VERIFY( workday == std::chrono::hours(8) );
   auto fworkday = 8.0h;
   VERIFY( (fworkday == std::chrono::duration<long double, std::ratio<3600,1>>(8.0L)) );
+  auto immediate = 0s;
+  VERIFY( immediate == std::chrono::seconds(0) );
+  auto minute_ago = -1min;
+  VERIFY( minute_ago == std::chrono::minutes(-1) );
+  auto separated = 1'000'000s;
+  VERIFY( separated == std::chrono::seconds(1'000'000) );
 }
 
 int