1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
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>
19 // Not a portable test
25 #include "count_new.h"
27 #include "test_macros.h"
31 globalMemCounter
.reset();
32 assert(globalMemCounter
.checkOutstandingNewEq(0));
34 typedef std::codecvt_utf16
<wchar_t> 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));