1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 // <locale> 11 12 // class locale::id 13 // { 14 // public: 15 // id(); 16 // void operator=(const id&) = delete; 17 // id(const id&) = delete; 18 // }; 19 20 // This test isn't portable 21 22 #include <locale> 23 #include <cassert> 24 25 std::locale::id id0; 26 std::locale::id id2; 27 std::locale::id id1; 28 main()29int main() 30 { 31 long id = id0.__get(); 32 assert(id0.__get() == id+0); 33 assert(id0.__get() == id+0); 34 assert(id0.__get() == id+0); 35 assert(id1.__get() == id+1); 36 assert(id1.__get() == id+1); 37 assert(id1.__get() == id+1); 38 assert(id2.__get() == id+2); 39 assert(id2.__get() == id+2); 40 assert(id2.__get() == id+2); 41 assert(id0.__get() == id+0); 42 assert(id0.__get() == id+0); 43 assert(id0.__get() == id+0); 44 assert(id1.__get() == id+1); 45 assert(id1.__get() == id+1); 46 assert(id1.__get() == id+1); 47 assert(id2.__get() == id+2); 48 assert(id2.__get() == id+2); 49 assert(id2.__get() == id+2); 50 } 51