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// test type_info
11
12#include <typeinfo>
13#include <cstring>
14#include <cassert>
15
16int main()
17{
18    const std::type_info& t1 = typeid(int);
19    const std::type_info& t2 = typeid(int);
20    const std::type_info& t3 = typeid(short);
21    assert(t1.hash_code() == t2.hash_code());
22    assert(t1.hash_code() != t3.hash_code());
23}
24