7222-env.cc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // { dg-require-namedlocale "" }
  2. // 2000-09-13 Benjamin Kosnik <bkoz@redhat.com>
  3. // Copyright (C) 2000-2022 Free Software Foundation, Inc.
  4. //
  5. // This file is part of the GNU ISO C++ Library. This library is free
  6. // software; you can redistribute it and/or modify it under the
  7. // terms of the GNU General Public License as published by the
  8. // Free Software Foundation; either version 3, or (at your option)
  9. // any later version.
  10. // This library is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. // You should have received a copy of the GNU General Public License along
  15. // with this library; see the file COPYING3. If not see
  16. // <http://www.gnu.org/licenses/>.
  17. // 22.1.1.2 locale constructors and destructors [lib.locale.cons]
  18. #include <cwchar> // for mbstate_t
  19. #include <locale>
  20. #include <stdexcept>
  21. #include <testsuite_hooks.h>
  22. // libstdc++/7222
  23. void test02()
  24. {
  25. std::locale loc_1 = std::locale("");
  26. std::locale loc_2 = std::locale("");
  27. VERIFY( loc_1 == loc_2 );
  28. }
  29. int main()
  30. {
  31. test02();
  32. return 0;
  33. }