[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / localization / locale.stdcvt / codecvt_utf16.pass.cpp
blob40f8ae299206a8ba56e28f75b319261ec020d311
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 // template <class Elem, unsigned long Maxcode = 0x10ffff,
12 // codecvt_mode Mode = (codecvt_mode)0>
13 // class codecvt_utf16
14 // : public codecvt<Elem, char, mbstate_t>
15 // {
16 // // unspecified
17 // };
19 // Not a portable test
21 #include <codecvt>
22 #include <cstdlib>
23 #include <cassert>
25 #include "count_new.h"
27 #include "test_macros.h"
29 int main(int, char**)
31 globalMemCounter.reset();
32 assert(globalMemCounter.checkOutstandingNewEq(0));
34 typedef std::codecvt_utf16<wchar_t> C;
35 C c;
36 assert(globalMemCounter.checkOutstandingNewEq(0));
39 typedef std::codecvt_utf16<wchar_t> C;
40 std::locale loc(std::locale::classic(), new C);
41 assert(globalMemCounter.checkOutstandingNewNotEq(0));
43 assert(globalMemCounter.checkOutstandingNewEq(0));
45 return 0;