brintos

brintos / llvm-project-archived public Read only

0
0
Text · 787 B · ce354b3 Raw
34 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// REQUIRES: locale.en_US.UTF-810 11// <locale>12 13// basic_string<char> name() const;14 15#include <locale>16#include <cassert>17 18#include "test_macros.h"19#include "platform_support.h" // locale name macros20 21int main(int, char**)22{23    {24        std::locale loc;25        assert(loc.name() == "C");26    }27    {28        std::locale loc(LOCALE_en_US_UTF_8);29        assert(loc.name() == LOCALE_en_US_UTF_8);30    }31 32  return 0;33}34