]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.dlang/primitive-types.exp
7b284bad2f02189440305ab3f3302e09f72f4872
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.dlang / primitive-types.exp
1 # Copyright (C) 2014-2023 Free Software Foundation, Inc.
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 require allow_d_tests
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 clean_restart
53
54 if [set_lang_d] {
55 test_builtin_d_types_accepted
56 } else {
57 warning "D type tests suppressed."
58 }