4684ddb6aa
- import libcxx - reduce targets to the one when compiled as a tools Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
// Source Licenses. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// <locale>
|
|
|
|
// class locale::id
|
|
// {
|
|
// public:
|
|
// id();
|
|
// void operator=(const id&) = delete;
|
|
// id(const id&) = delete;
|
|
// };
|
|
|
|
// This test isn't portable
|
|
|
|
#include <locale>
|
|
#include <cassert>
|
|
|
|
std::locale::id id0;
|
|
std::locale::id id2;
|
|
std::locale::id id1;
|
|
|
|
int main()
|
|
{
|
|
long id = id0.__get();
|
|
assert(id0.__get() == id+0);
|
|
assert(id0.__get() == id+0);
|
|
assert(id0.__get() == id+0);
|
|
assert(id1.__get() == id+1);
|
|
assert(id1.__get() == id+1);
|
|
assert(id1.__get() == id+1);
|
|
assert(id2.__get() == id+2);
|
|
assert(id2.__get() == id+2);
|
|
assert(id2.__get() == id+2);
|
|
assert(id0.__get() == id+0);
|
|
assert(id0.__get() == id+0);
|
|
assert(id0.__get() == id+0);
|
|
assert(id1.__get() == id+1);
|
|
assert(id1.__get() == id+1);
|
|
assert(id1.__get() == id+1);
|
|
assert(id2.__get() == id+2);
|
|
assert(id2.__get() == id+2);
|
|
assert(id2.__get() == id+2);
|
|
}
|