blob: 44ad8ca54b74113eb7a4efb6764734940dc0db7d [file] [log] [blame]
# Copyright (C) 2014-2021 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test basic builtin types.
# NOTE: The tests here intentionally do not require a D compiler.
load_lib "d-support.exp"
if { [skip_d_tests] } { continue }
proc test_builtin_d_types_accepted {} {
# Test types are recognised.
gdb_test "ptype void" "type = void"
gdb_test "ptype bool" "type = bool"
gdb_test "ptype byte" "type = byte"
gdb_test "ptype ubyte" "type = ubyte"
gdb_test "ptype short" "type = short"
gdb_test "ptype ushort" "type = ushort"
gdb_test "ptype int" "type = int"
gdb_test "ptype uint" "type = uint"
gdb_test "ptype long" "type = long"
gdb_test "ptype ulong" "type = ulong"
gdb_test "ptype cent" "type = cent"
gdb_test "ptype ucent" "type = ucent"
gdb_test "ptype float" "type = float"
gdb_test "ptype double" "type = double"
gdb_test "ptype real" "type = real"
gdb_test "ptype ifloat" "type = ifloat"
gdb_test "ptype idouble" "type = idouble"
gdb_test "ptype ireal" "type = ireal"
gdb_test "ptype cfloat" "type = cfloat"
gdb_test "ptype cdouble" "type = cdouble"
gdb_test "ptype creal" "type = creal"
gdb_test "ptype char" "type = char"
gdb_test "ptype wchar" "type = wchar"
gdb_test "ptype dchar" "type = dchar"
}
# Start with a fresh gdb.
gdb_exit
gdb_start
if [set_lang_d] {
test_builtin_d_types_accepted
} else {
warning "D type tests suppressed."
}