[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / localization / locale.stdcvt / codecvt_utf8.pass.cpp
blobeffd8d5317eadd34ce5f6f4aabb1068832627d69
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-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <codecvt>
11 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT
13 // template <class Elem, unsigned long Maxcode = 0x10ffff,
14 // codecvt_mode Mode = (codecvt_mode)0>
15 // class codecvt_utf8
16 // : public codecvt<Elem, char, mbstate_t>
17 // {
18 // // unspecified
19 // };
21 // XFAIL: no-wide-characters
23 // Not a portable test
25 #include <codecvt>
26 #include <cstdlib>
27 #include <cassert>
29 #include "count_new.h"
31 #include "test_macros.h"
33 int main(int, char**)
35 globalMemCounter.reset();
36 assert(globalMemCounter.checkOutstandingNewEq(0));
38 typedef std::codecvt_utf8<wchar_t> C;
39 C c;
40 assert(globalMemCounter.checkOutstandingNewEq(0));
43 typedef std::codecvt_utf8<wchar_t> C;
44 std::locale loc(std::locale::classic(), new C);
45 assert(globalMemCounter.checkOutstandingNewNotEq(0));
47 assert(globalMemCounter.checkOutstandingNewEq(0));
49 return 0;