Commit | Line | Data |
---|---|---|
618f726f | 1 | # Copyright (C) 2014-2016 Free Software Foundation, Inc. |
94b1b47e IB |
2 | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 3 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
15 | ||
16 | # Test basic builtin types. | |
17 | # NOTE: The tests here intentionally do not require a D compiler. | |
18 | ||
19 | load_lib "d-support.exp" | |
20 | ||
21 | if { [skip_d_tests] } { continue } | |
22 | ||
23 | proc test_builtin_d_types_accepted {} { | |
24 | # Test types are recognised. | |
25 | ||
26 | gdb_test "ptype void" "type = void" | |
27 | gdb_test "ptype bool" "type = bool" | |
28 | gdb_test "ptype byte" "type = byte" | |
29 | gdb_test "ptype ubyte" "type = ubyte" | |
30 | gdb_test "ptype short" "type = short" | |
31 | gdb_test "ptype ushort" "type = ushort" | |
32 | gdb_test "ptype int" "type = int" | |
33 | gdb_test "ptype uint" "type = uint" | |
34 | gdb_test "ptype long" "type = long" | |
35 | gdb_test "ptype ulong" "type = ulong" | |
36 | gdb_test "ptype cent" "type = cent" | |
37 | gdb_test "ptype ucent" "type = ucent" | |
38 | gdb_test "ptype float" "type = float" | |
39 | gdb_test "ptype double" "type = double" | |
40 | gdb_test "ptype real" "type = real" | |
41 | gdb_test "ptype ifloat" "type = ifloat" | |
42 | gdb_test "ptype idouble" "type = idouble" | |
43 | gdb_test "ptype ireal" "type = ireal" | |
44 | gdb_test "ptype cfloat" "type = cfloat" | |
45 | gdb_test "ptype cdouble" "type = cdouble" | |
46 | gdb_test "ptype creal" "type = creal" | |
47 | gdb_test "ptype char" "type = char" | |
48 | gdb_test "ptype wchar" "type = wchar" | |
49 | gdb_test "ptype dchar" "type = dchar" | |
50 | } | |
51 | ||
52 | # Start with a fresh gdb. | |
53 | ||
54 | gdb_exit | |
55 | gdb_start | |
56 | ||
57 | if [set_lang_d] { | |
58 | test_builtin_d_types_accepted | |
59 | } else { | |
60 | warning "D type tests suppressed." | |
61 | } |